From: Noel O'B. <bao...@gm...> - 2008-10-11 15:15:45
|
OBMolTorsionIter may not be working correctly. Apart from that, see OBMol::SetTorsion and OBMol::GetTorsion in the C++ documentation (openbabel.org/api) 2008/10/11 Thomas Greve Kristensen <tg...@da...>: > Hi all, > > I'm trying to rotate parts of a molecule around a rotable bond, but I > can't seem to figure out how to do this from python. > My experiments try to rotate the bonds of a ligand to see how the energy > landscape changes. My goal is to experiment with energy minimization > algorithms. > > I appreciate all the help I can get... > > Thomas G. Kristensen > (phd student, Aarhus University, Denmark) > > p.s: This is how far I've gotten so far: > > #!/usr/bin/env python > """ > A (hopefully) small test that will reviel how easy > it is to calculate the energy of a molecule using > the open babel python swig bindings. > """ > import pybel > import openbabel > > forcefield = openbabel.OBForceField.FindForceField("MMFF94") > > if __name__ == "__main__": > for mol in pybel.readfile("mol2", "ligands.mol2"): > obmol = mol.OBMol > forcefield.Setup(obmol) > print forcefield.Energy() > > for bond in openbabel.OBMolBondIter(obmol): > print bond.IsRotor() # I cant ask this object to rotate :( > > for torsion in openbabel.OBMolTorsionIter(obmol): > print torsion # Is not an object, can not be manipulated :( > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |