Counting rotors

View: New views
2 Messages — Rating Filter:   Alert me  

Counting rotors

by Richard West-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


My understanding now is that OBMol.NumRotors() counts the number of  
rotors that lead to different conformers. Rotating about either of the  
two C-C bonds in propane does not yield any different conformers, and  
thus I get
 >>> propane = pybel.readstring('smi','CCC')
 >>> propane.OBMol.NumRotors()
0

butane however gives 1
 >>> pybel.readstring('smi','CCCC').OBMol.NumRotors()
1


However, in terms of statistical mechanics, both C-C bonds in propane  
are internal rotors, and I would want a rotor count of 2. For straight-
chain alkanes it's tempting to just add 2 to the NumRotors() answer.
However, this will not work in general. Neopentane should gave 4  
internal rotors.
 >>> neopentane = pybel.readstring('smi','CC(C)(C)C')
 >>> neopentane.OBMol.NumRotors()
0


I can find another way (count the number of non-terminal non-cyclic  
single bonds in non-linear molecules) but is this re-inventing the  
wheel? (i.e. is there an open-babel function to count the number of  
rotors in a statistical mechanics sense?)

Also, is there documentation for NumRotors that I overlooked? It took  
me a little while to realise that this is not what I wanted and why.


Thanks

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
OpenBabel-scripting mailing list
OpenBabel-scripting@...
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting

Re: Counting rotors

by Geoffrey Hutchison-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 16, 2009, at 6:54 PM, Richard West wrote:

> (i.e. is there an open-babel function to count the number of
> rotors in a statistical mechanics sense?)

No, it counts the number of rotors in a cheminformatics (i.e., quick-
and-dirty) way.

You can also try this, which finds rotatable bonds based on SMARTS  
patterns:
       OpenBabel::OBRotorList rl;
       OpenBabel::OBMol obmol = m_molecule->OBMol();
       rl.Setup(obmol);
       cout << "# of Rotors" << rl.Size();

Hope that helps,
-Geoff

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
OpenBabel-scripting mailing list
OpenBabel-scripting@...
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting