Hi,

You could try --append in openbabel to add the ID_STRUCTURE to the title of the 
molecule sdf?

https://openbabel.org/docs/dev/Command-line_tools/babel.html#append-property-values-to-the-title
 
<https://openbabel.org/docs/dev/Command-line_tools/babel.html#append-property-values-to-the-title>

Chris

> On 14 Jan 2022, at 12:03, pymol-users-requ...@lists.sourceforge.net wrote:
> 
> Send PyMOL-users mailing list submissions to
>       pymol-users@lists.sourceforge.net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/pymol-users
> or, via email, send a message with subject or body 'help' to
>       pymol-users-requ...@lists.sourceforge.net
> 
> You can reach the person managing the list at
>       pymol-users-ow...@lists.sourceforge.net
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyMOL-users digest..."
> 
> 
> Today's Topics:
> 
>   1. conversion of the small molecules from sdf to mol2
>      (Enrico Martinez)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 13 Jan 2022 16:23:53 +0100
> From: Enrico Martinez <jmsstarli...@gmail.com>
> To: pymol-users <pymol-users@lists.sourceforge.net>
> Subject: [PyMOL] conversion of the small molecules from sdf to mol2
> Message-ID:
>       <CAALQopyYfQGuLwsde74=stbv+_kzl2ukgv09xmvxwd1fswf...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> Dear Pymol users, dear Friends!
> 
> I have a question regarding file conversion of the small organic
> molecules, which is not directly related to pymol but I believe that I
> may use it for the solution.
> 
> I am dealing with the conversion of SDF file (2d formulas) to mol2
> format (3d coordinates)
> Usually I use it in one line command with babel
> obabel --gen3d -isdf ligands.sdf -omol2 > ligands.mol2
> 
> It creates a multi-model mol2 file, that I may open in pymol and split
> the molecules manually using split_states command:
> pymol ligands.mol2
> cmd.split_states('ligands', 'prefix=conf')
> This creates several separate objects conf0001, conf0002 etc that I
> may save as the individual mol2.
> Alternatively I may obtain individual mol2 filles for each model of the SDF:
> obabel ./ligands.sdf -O ./babel/conf.mol2 --gen3d -m
> which creates separate files conf1.mol2 , conf2.mol2 .. confN.mol2
> that I may load in pymol in one command from terminal
> pymol ./babel/conf*.mol2
> 
> The problem that the name of the initial model stored in the initial sdf, as:
> <ID_STRUCTURE>
> name_of_the_ligand
> 
> always lost during conversion from sdf to mol2 (regardless of the way
> of the conversion). So the mol2 files always lack their initials
> defined from sdf :-)
> 
> Could you suggest some trick to associate the name of the model (From
> initial sdf) to the corresponding object loaded in pymol or
> alternatively keep them during the conversion?
> Many thanks in advance!
> Enrico
> 
> 
> 
> ------------------------------
> 
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
> 
> ------------------------------
> 
> End of PyMOL-users Digest, Vol 188, Issue 11
> ********************************************

_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to