The following code
1. energy-minizes a molecule and computes the energy
2. writes to coordinates to an sdf file,
3. reads it in and re-computes the energy

But the two energies are off by 4 kcal/mol

Any idea what I am doing wrong?

Best regards, Jan

from rdkit import Chem
from rdkit.Chem import AllChem

smiles = "O=C(Nc1ccc(OCC(O)CNC(C)C)c(c1)C(=O)C)CCC"
m = Chem.MolFromSmiles(smiles)
m = Chem.AddHs(m)

prop = AllChem.MMFFGetMoleculeProperties(m, mmffVariant="MMFF94")
ff =AllChem.MMFFGetMoleculeForceField(m,prop)
print ff.CalcEnergy()

file = "e_test.sdf"

new_m = Chem.MolFromMolFile(file)
#new_m = Chem.SDMolSupplier(file)[0]

prop = AllChem.MMFFGetMoleculeProperties(new_m, mmffVariant="MMFF94")
ff =AllChem.MMFFGetMoleculeForceField(new_m,prop)
print ff.CalcEnergy()
Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Rdkit-discuss mailing list

Reply via email to