Very helpful - thanks.

I think incorporating this functionality in future OpenBabel releases
would be very useful...
Found a number of posts online of people (e.g.
http://blueobelisk.shapado.com/questions/how-to-split-large-sdf-files-into-series-of-smaller-files)
of people wanting to do this...


On 3 June 2011 19:02, Craig A. James <cja...@emolecules.com> wrote:
> On 6/3/11 12:56 AM, JP wrote:
>>
>> Hi there,
>>
>> Using OpenBabel 2.3.0, is there a way how to split a molecule file
>> (e.g. sdf) into chunks?
>>
>> I can imagine two different modes of action:
>>
>> 0) split molecule file in n chunks
>> 1) split molecule file in chunks of (at most) n molecules
>>
>> The use case for this is that sometimes you want to work with smaller
>> files (e.g. when submitting multiple jobs on a cluster), or for
>> testing of products.
>
> Attached is a Perl program that we developed for this.  We find it pretty
> useful.
>
> Usage: split_sdf.pl [N] [-skip N] [-do N] [file.sdf]
>  N is number of SD records per file
>  -skip N   Skip N records before starting output
>  -do N     Do N records and then quit
>  -zap_extra_lf  Zap extra linefeed between records
>
>  Files will be named with numeric suffix, e.g. "split_sdf.pl foo.sdf"
>  will generate files like these:
>    foo_1.sdf
>    foo_2.sdf
>    ... etc.
>
> Craig
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to