According to Google, this has come up on the list before:

http://www.mail-archive.com/openbabel-discuss@lists.sourceforge.net/msg02727.html

HTH,

- Noel

On 22 November 2013 09:32, Pascal Muller <pascal.jm.mul...@gmail.com> wrote:
> Hi,
>
>
>
>
>> I have some multi-molecule SDF files from ZINC and simply want to filter
>> them down to keep only those with a molecular weight < 1000 and rotatable
>> bonds < 20.
>
>
> I use a python script for this. If it suits you, adjust for the file name
> and file format you are using:
>
> #!/usr/bin/python
> import pybel
>
> outputFilename = "output.smi"
> output = open(outputFilename,"w")
> for mol in pybel.readfile("smi", "test.smi"):
>     rotBonds = mol.OBMol.NumRotors()
>     if rotBonds < 3:
>         output.write(mol.write("smi"))
>
>
> (needs to compile python bindings. Could include the mass filter too:
> mw = mol.molwt ).
>
> Regards,
> Pascal
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to