def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('--mol', action='store', default=None, help='Load molecule for live simulation', metavar="FILE") parser.add_argument('--model', action='store', default="ethanol", help='') args = parser.parse_args() if args.mol is None: nuclear_charges = np.array([6, 6, 8, 1, 1, 1, 1, 1, 1]) coordinates = np.array([[0.07230959, 0.61441211, -0.03115568], [-1.26644639, -0.27012846, -0.00720771], [1.11516977, -0.30732869, 0.06414394], [0.10673943, 1.44346835, -0.79573006], [-0.02687486, 1.19350887, 0.98075343], [-2.06614011, 0.38757505, 0.39276693], [-1.68213881, -0.60620688, -0.97804526], [-1.18668224, -1.07395366, 0.67075071], [1.37492532, -0.56618891, -0.83172035]]) else: nuclear_charges, coordinates = rmsd.get_coordinates_xyz(args.mol) nuclear_charges = [cheminfo.convert(x) for x in nuclear_charges] calculator = get_calculator(args.model) constant_energy(nuclear_charges, coordinates, calculator=calculator) return
def main(calculator): calc = get_calculator(calculator) if calc is None: click.echo("Calculator `{}' not found.".format) return calc.start()
def main(): calculator = calculators.get_calculator("_deploy_", debug=False) atom_labels, coordinates = rmsd.get_coordinates_xyz("examples/ethanol.xyz") molecule = ase.Atoms(atom_labels, coordinates) molecule.set_calculator(calculator) dyn = BFGS(molecule) dyn.run(fmax=0.3) dump_xyz(molecule, "_tmp_molecule_optimize.xyz") return
def main_md(): calculator = calculators.get_calculator("_deploy_", debug=False) atom_labels, coordinates = rmsd.get_coordinates_xyz("examples/ethanol.xyz") molecule = ase.Atoms(atom_labels, coordinates) molecule.set_calculator(calculator) energy = molecule.get_potential_energy() print(energy) dyn = BFGS(molecule) dyn.run(fmax=0.5) dump_xyz(molecule, "_tmp_molecule_optimize.xyz") return