[Open Babel] Adding another molecule to a file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Open Babel] Adding another molecule to a file

drc-2
I can combine files like so

babel /Public/Structures/1.sdf /Public/Structures/2.sdf -osdf /Public/Structures/temp2.sdf
2 molecules converted

However if I cannotto add a molecule to an existing file

babel /Public/Structures/temp.sdf /Public/Structures/1.sdf -osdf /Public/Structures/temp.sdf
1 molecule converted

Am I missing something? again :-)

Thanks,

Chris



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Open Babel] Adding another molecule to a file

Chris Morley-3
[hidden email] wrote:

> I can combine files like so
>
> babel /Public/Structures/1.sdf /Public/Structures/2.sdf -osdf /Public/Structures/temp2.sdf
> 2 molecules converted
>
> However if I cannotto add a molecule to an existing file
>
> babel /Public/Structures/temp.sdf /Public/Structures/1.sdf -osdf /Public/Structures/temp.sdf
> 1 molecule converted
>
> Am I missing something? again :-)
>
OB currently works by simultaneously having streams open
to the input and output files. So if these are the same
file you don't get the answer you expect. (Actually the
problem is two filebufs.)

What you are trying to do looks reasonable from a user's
point of view, so how I'll look into how can it be
accommodated (or at least flagged as an error).

At present it looks as if the best way is to read in the
whole of a contended file at the start and use the memory
copy for reading.

Thanks for another provoking comment.

Chris


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...