I wrote recently a few lines of python code to manipulate .sdf files
without interpreting the chemical aspect of what is inside.
I had to deal with about 200K molecules in a single file.
The result may be found at https://github.com/nuzillard/SDFrw
without any warranty, as usual.
I hope this can help.
Jean-Marc
Le 15/04/2020 à 20:13, Bennion, Brian via OpenBabel-discuss a écrit :
More context. I have 500K ligands in a single sdf file. The names for each
ligand was found after the sdf file was created. I would like to either
replace the label at the top with the appropriate title or add to a property
value. Unfortunately, I and others at LLNL have never been able to compile
python bindings to obabel.
I am not familiar with pybabel but can look at it.
Due to the source of the sdf files RDKit chokes on about 50% of them so
manipulation is not easy there.
Brian
-----Original Message-----
From: openbabel-discuss-requ...@lists.sourceforge.net
<openbabel-discuss-requ...@lists.sourceforge.net>
Sent: Tuesday, April 14, 2020 6:55 AM
To: openbabel-discuss@lists.sourceforge.net
Subject: OpenBabel-discuss Digest, Vol 167, Issue 10
Send OpenBabel-discuss mailing list submissions to
openbabel-discuss@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
or, via email, send a message with subject or body 'help' to
openbabel-discuss-requ...@lists.sourceforge.net
You can reach the person managing the list at
openbabel-discuss-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific than "Re:
Contents of OpenBabel-discuss digest..."
Today's Topics:
1. Re: Operating on multi molecule sdf files (Geoffrey Hutchison)
2. Structure size scaling in 2D depiction (Bakary N'tji Diallo)
----------------------------------------------------------------------
Message: 1
Date: Tue, 14 Apr 2020 09:53:59 -0400
From: Geoffrey Hutchison <geoff.hutchi...@gmail.com>
To: "Bennion, Brian" <benni...@llnl.gov>
Cc: "openbabel-discuss@lists.sourceforge.net"
<openbabel-discuss@lists.sourceforge.net>
Subject: Re: [Open Babel] Operating on multi molecule sdf files
Message-ID: <ed95515b-3d5f-48a4-89eb-dad0a2adf...@gmail.com>
Content-Type: text/plain; charset="utf-8"
After reading the docs I think that adding individual properties to individual
molecules in a multi molecule sdf files is probably not possible?
I have an sdf file with 500k molecules and I would like to add a little unique
identifier that isn?t a supported descriptor to each molecule and then write
out the altered sdf file.
Personally, I'd do this with a quick Python script, since a Pybel molecule has
a data property:
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python_PybelAPI.html#pybel.Molecule.data
<https://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python_PybelAPI.html#pybel.Molecule.data>
-Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Mon, 13 Apr 2020 21:07:56 +0200
From: "Bakary N'tji Diallo" <diallobaka...@gmail.com>
To: "openbabel-discuss@lists.sourceforge.net mailinglist"
<openbabel-discuss@lists.sourceforge.net>
Subject: [Open Babel] Structure size scaling in 2D depiction
Message-ID:
<CABWhgwRcq0kT1451K=JUeiH8=bu1xjo+qwsjkoj6hpjfwyg...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Dear all,
I have the following depiction for a structure file. As you can see the first
compound is scaled up.
[image: image.png]
Is there way to maintain a uniform structure size.
I am using the following command: "obabel structure.smi -O out.svg -xC -xe -d"
Thanks
Best regards
--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France
Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss