def cmd(ana, mc, md, opt): """CLI for libdalton""" input_file_name = fileio.validate_input() # default type of options is string # they not exclusive though if ana: analysis = analyze.Analysis(input_file_name) analysis.run() elif mc: simulation = simulate.MonteCarlo(input_file_name) simulation.run() elif md: simulation = simulate.MolecularDynamics(input_file_name) simulation.run() elif opt: optimization = optimize.Optimization(input_file_name) optimization.optimize()
# -*- coding: utf-8 -*- from libdalton import fileio from libdalton import optimize def run(input_file): optimization = optimize.Optimization(input_file) optimization.optimize() if __name__ == '__main__': input_file_name = fileio.validate_input(__file__) run(input_file_name)