Hi all I'm trying to design a calculator for use with ASE (Atomic Simulation Environment: https://wiki.fysik.dtu.dk/ase/) which uses openbabel to get energies using UFF and ghemical (for now). For this, I have a couple of questions.
Is it possible to automatically add bonds. In our code, we do not represent bonds as we usually just perform DFT calculations. I know that avogadro/openbabel adds bonds automatically when reading an .xyz file with openbable, so this should be possible. When I set up the force field, I can get the energy with FF.Energy(). Is it possible to get the gradient with respect to nuclear/atomic coordinates. Something like this must be available for use in openbabels internal structure optimizers. And lastly: When doing an optimization, how do I get the new coordinates? My calculation is like: """ import openbabel as ob FF = ob.OBForceField.FindForceField("UFF") mol = ob.OBMol() a = mol.NewAtom() a.SetAtomicNum(1) a.SetVector(0,0,0) b = mol.NewAtom() b.SetAtomicNum(1) b.SetVector(0,0,1) mol.AddBond(1, 2, 1) # atoms indexed from 1 FF.Setup(mol) print FF.Energy(), FF.GetUnit() FF.ConjugateGradients(1000) print FF.Energy(), FF.GetUnit() print FF.GetCoordinates(mol) """ The last line just returns "True" Thanks for your time reading this. Best regards Troels Kofoed Jacobsen ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss