In [ ]:
import openchemistry as oc
In [ ]:
mol = oc.import_structure('CCO', gen3d=False)
If the molecule doesn't have a 3D structure, it can be generated via open babel
In [ ]:
mol.structure.generate_3d(forcefield='mmff94', steps=150)
View the structure
In [ ]:
mol.structure.show()
View the cjson
In [ ]:
mol.structure.data()
In [ ]:
image_name = 'openchemistry/torchani:1.2'
input_parameters = {}
result = mol.optimize(image_name, input_parameters)
In [ ]:
result.structure.show()
View the cjson
In [ ]:
result.structure.data()
Get the optimized geometry ID
In [ ]:
ani_optimized_id = result.optimized_geometry_id
In [ ]:
image_name = 'openchemistry/psi4:1.2.1'
input_parameters = {
'theory': 'dft',
'functional': 'b3lyp',
'basis': '6-31g'
}
result = mol.optimize(image_name, input_parameters, geometry_id=ani_optimized_id)
In [ ]:
result.structure.show()
View the cjson
In [ ]:
result.structure.data()
Get the optimized geometry ID
In [ ]:
psi4_optimized_id = result.optimized_geometry_id
In [ ]:
oc.calculate_rmsd(mol, geometry_id1=ani_optimized_id, geometry_id2=psi4_optimized_id, heavy_atoms_only=True)