Hi,

This works fine,


Many Thanks

Chris
On 16 Nov 2010, at 09:46, Fredrik Wallner wrote:

> Hi,
> 
> Would --title mol --addoutindex suffice? I think it was added in 2.3.0 (btw, 
> the documentation at 
> http://openbabel.org/docs/dev/Command-line_tools/babel.html states that the 
> option should be called --addindex, but that didn't work on my machine at 
> least). That way the name would be "mol 1" and so on.
> 
> Kind regards,
> Fredrik
> 
> 16 nov 2010 kl. 09.27 skrev christophersw...@btconnect.com:
> 
>> Hi Noel,
>> 
>> I did something similar in Applescript but I wondered if it could be done 
>> within OB, it seems like it would be a useful feature.
>> 
>> Cheers
>> 
>> Chris
>> On 15 Nov 2010, at 21:58, Noel O'Boyle wrote:
>> 
>>> Hi Chris,
>>> 
>>> I think that right now it's not possible. The ability to access a
>>> molecule's number would also be useful for filtering too.
>>> 
>>> In the meanwhile, you'll have to have to use Python or something similar:
>>> 
>>> import pybel
>>> output = pybel.Outputfile("sdf", "myoutput.sdf")
>>> for mol_num, mol in enumerate(pybel.readfile("sdf", "myfile.sdf")):
>>> mol.title = "mol" + str(mol_num+1)
>>> output.write(mol)
>>> output.close()
>>> 
>>> - Noel
>>> 
>>> On 15 November 2010 20:57, christophersw...@btconnect.com
>>> <christophersw...@btconnect.com> wrote:
>>>> I have sdf that contains only structures, I'd like each to have a unique 
>>>> title is this possible? Adding mol1, mol2, mol3 would be sufficient.
>>>> 
>>>> Cheers
>>>> 
>>>> Chris
>>>> ------------------------------------------------------------------------------
>>>> Centralized Desktop Delivery: Dell and VMware Reference Architecture
>>>> Simplifying enterprise desktop deployment and management using
>>>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
>>>> client virtualization framework. Read more!
>>>> http://p.sf.net/sfu/dell-eql-dev2dev
>>>> _______________________________________________
>>>> OpenBabel-discuss mailing list
>>>> OpenBabel-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Beautiful is writing same markup. Internet Explorer 9 supports
>> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
>> Spend less time writing and  rewriting code and more time creating great
>> experiences on the web. Be a part of the beta today
>> http://p.sf.net/sfu/msIE9-sfdev2dev
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to