FYI The obabel -m option you've used separates molecules in multi-mol2 file - the molecules must already be in separate molecule blocks.
---- Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2015-11-10 19:54 GMT+01:00 Filip Stefaniak <stefan...@gmail.com>: > Hi Maciek, > > Maciek Wójcikowski pisze: > > Hi Filip, > > > > OBMol has a Separate method, which does exactly what you'd > > like. > http://openbabel.org/dev-api/classOpenBabel_1_1OBMol.shtml#a1e5c6955a32c0ec2317a8de12ab7ba5a > > > > import pybel > > mol = pybel.readfile('mol2', 'ligand.mol2').next() > > for m in mol.OBMol.Separate(): > > print m > > > > > > Note that m is an OBMol object, so to get pybel molecule you need to > > initiate it via Molecule class: > > > > for m in mol.OBMol.Separate(): > > print pybel.Molecule(m) > > Thanks for that tip. I will try it. > > best regards, > Filip > > > -- > Filip Stefaniak > Uptime: 13079 dni 19 godzin > W lodówce ma 10.8stC, na działce w sadku 16.7stC > > > ------------------------------------------------------------------------------ > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >
------------------------------------------------------------------------------
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss