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