On 28/03/2013 12:17, Pascal Muller wrote:
> Hi,
>
>> Is there a way to append ROTATABLE_BOND as a descriptor in openbabel, If
is
>> there any then please help me.
>
> http://forums.openbabel.org/number-of-rotatable-bonds-td959206.html
>
> Should be easy to add the corresponding line in
> openbabel-2.3.1/tools/obprop.cpp, recompile, and run obprop, if that
> is what you want.
>
> Or just run e.g.
>
> #!/usr/bin/python
> import pybel
> for mol in pybel.readfile("smi", "file.smi"):
>     print mol.OBMol.NumRotors(), "\t", mol.OBMol.GetTitle()

If you would prefer the number of rotatable bonds as a descriptor and
without having to recompile, add the following item to
data/plugindefines.txt

SmartsDescriptor
rotors
[!$(*#*)&!D1]-!@[!$(*#*)&!D1]
Number of rotatable bonds\n
 From
http://www.daylight.com/dayhtml_tutorials/languages/smarts/smarts_examples.html#ROTATE

Use like:
obabel mols.xxx -O out.yyy --append rotors
obabel mols.xxx -O out.yyy --sort rotors+
obabel mols.xxx -O out.yyy --filter "rotors>2"
obabel mols.xxx -O out.yyy --largest 3 rotors+

I have tried both ways, as suggested by Mr. Muller & Mr. Morley, and I
found Mr. Morley's method easier and it worked in a single attempt.

Thanks to both of you for your help.


On Thu, Mar 28, 2013 at 10:46 AM, Chris Morley <c.mor...@gaseq.co.uk> wrote:

> On 28/03/2013 12:17, Pascal Muller wrote:
> > Hi,
> >
> >> Is there a way to append ROTATABLE_BOND as a descriptor in openbabel,
> If is
> >> there any then please help me.
> >
> > http://forums.openbabel.org/number-of-rotatable-bonds-td959206.html
> >
> > Should be easy to add the corresponding line in
> > openbabel-2.3.1/tools/obprop.cpp, recompile, and run obprop, if that
> > is what you want.
> >
> > Or just run e.g.
> >
> > #!/usr/bin/python
> > import pybel
> > for mol in pybel.readfile("smi", "file.smi"):
> >     print mol.OBMol.NumRotors(), "\t", mol.OBMol.GetTitle()
>
> If you would prefer the number of rotatable bonds as a descriptor and
> without having to recompile, add the following item to
> data/plugindefines.txt
>
> SmartsDescriptor
> rotors
> [!$(*#*)&!D1]-!@[!$(*#*)&!D1]
> Number of rotatable bonds\n
>  From
>
> http://www.daylight.com/dayhtml_tutorials/languages/smarts/smarts_examples.html#ROTATE
>
> Use like:
> obabel mols.xxx -O out.yyy --append rotors
> obabel mols.xxx -O out.yyy --sort rotors+
> obabel mols.xxx -O out.yyy --filter "rotors>2"
> obabel mols.xxx -O out.yyy --largest 3 rotors+
>
> Chris
>
>
>
>
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>



-- 
Regards,

Rajeev Ranjan Roy
Project Assistant
Prof. A. Surolia's Laboratory
Molecular Biophysics Unit (MBU)
Indian Institute of Sciences , Bangalore
M.Sc, [Biotechnology], (2010-12)
Department of Bio Sciences & Bio Engineering
Indian Institute of Technology, Bombay
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to