Oh, I see, I've been reading the API Documentation more and I think I
understand, but I still cannot get it to work. Here is the exact code I
tried in Python:
import openbabel
mol = openbabel.OBMol()
obc = openbabel.OBConversion()
obc.SetInAndOutFormats("mol", "mol")
obc.ReadFile(mol, 'filename.mol')
obff = openbabel.OBForceField.FindForceField("MMFF94")
obff.Setup(mol)
obff.ConjugateGradientsInitialize(20, 1e-5)
obc.WriteFile(mol, 'filenameout.mol')
for i in range(20):
obff.ConjugateGradientsTakeNSteps(1)
obc.WriteFile(mol, 'filename.%d.out' % i)
But the issue that I am having is that the ConjugateGradients method
doesn't actually change any coordinates, it seems not to be doing any
actual minimization. The file I am using is a completely unminimized
geometry so it cannot be that it is converging quickly I think.
Any tips?
-- Raj
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss