Re: [Open Babel] OpenBabel-discuss Digest, Vol 167, Issue 10

2020-04-15 Thread Bennion, Brian via OpenBabel-discuss
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 
 
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 
To: "Bennion, Brian" 
Cc: "openbabel-discuss@lists.sourceforge.net"

Subject: Re: [Open Babel] Operating on multi molecule sdf files
Message-ID: 
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
 


-Geoff

-- next part --
An HTML attachment was scrubbed...

--

Message: 2
Date: Mon, 13 Apr 2020 21:07:56 +0200
From: "Bakary N'tji Diallo" 
To: "openbabel-discuss@lists.sourceforge.net mailinglist"

Subject: [Open Babel] Structure size scaling in 2D depiction
Message-ID:

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
-- 

Bakary N?tji DIALLO

PhD Student (Bioinformatics) , Research 
Unit in Bioinformatics (RUBi) 

Mail: diallobaka...@gmail.com |  Skype: diallobakary4

Tel:  +27798233845 | +223 74 56 57 22 | +223 97 39 77 14
-- next part --
An HTML attachment was scrubbed...
-- next part --
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 33868 bytes
Desc: not available

--



--

Subject: Digest Footer

___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--

End of OpenBabel-discuss Digest, Vol 167, Issue 10
**


___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] OpenBabel-discuss Digest, Vol 167, Issue 10

2020-04-16 Thread Noel O'Boyle
Hi Brian,

(Note that it's a good idea to edit the subject when replying to a digest.)

Let's get you set up with the Python bindings. Try it again from a clean
build, and report what you find. Note that the 3.0 release requires that
you have Swig and pass -DRUN_SWIG=TRUE (an oversight on our part).

Regards,
- Noel

On Wed, 15 Apr 2020 at 19:14, Bennion, Brian via OpenBabel-discuss <
openbabel-discuss@lists.sourceforge.net> wrote:

> 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 
> To: "Bennion, Brian" 
> Cc: "openbabel-discuss@lists.sourceforge.net"
> 
> Subject: Re: [Open Babel] Operating on multi molecule sdf files
> Message-ID: 
> 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" 
> To: "openbabel-discuss@lists.sourceforge.net mailinglist"
> 
> Subject: [Open Babel] Structure size scaling in 2D depiction
> Message-ID:
>  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
> --
>
> Bakary N?tji DIALLO
>
> PhD Student (Bioinformatics) ,
> Research Unit in Bioinformatics (RUBi) 
>
> Mail: diallobaka...@gmail.com |  Skype: diallobakary4
>
> Tel:  +27798233845 | +223 74 56 57 22 | +223 97 39 77 14
> -- next part --
> An HTML attachment was scrubbed...
> -- next part --
> A non-text attachment was scrubbed...
> Name: image.png
> Type: image/png
> Size: 33868 bytes
> Desc: not available
>
> --
>
>
>
> --
>
> Subject: Digest Footer
>
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
> --
>
> End of OpenBabel-discuss Digest, Vol 167, Issue 10
> **
>
>
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
___
OpenBabel-dis

Re: [Open Babel] OpenBabel-discuss Digest, Vol 167, Issue 10

2020-04-16 Thread Francois Berenger

Maybe try this:

convert the SDF file to SMILES.

$ obabel input.sdf -O output.smi

Then, add the names in the SMILES file with some unix commands (provided 
you
have the list of names in the same order than the molecules in your SDF 
file,

then convert back to SDF).
Note that this will loose the 3D coordinates, if you have them in the 
input SDF file.


Then, back to sdf:

$ obabel output_w_names.smi -O input_w_names.sdf

I think I have done something like this in the past,
and openbabel was placing the name as the first line in each
SDF block (which is what I expect, and is more useful
than a name property with I don't know what tag someone gave it,
and tag name always changing depending on which software generated the 
SDF file)...


Regards,
F.

On 16/04/2020 03:13, Bennion, Brian via OpenBabel-discuss wrote:

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

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 
To: "Bennion, Brian" 
Cc: "openbabel-discuss@lists.sourceforge.net"

Subject: Re: [Open Babel] Operating on multi molecule sdf files
Message-ID: 
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


-Geoff

-- next part --
An HTML attachment was scrubbed...

--

Message: 2
Date: Mon, 13 Apr 2020 21:07:56 +0200
From: "Bakary N'tji Diallo" 
To: "openbabel-discuss@lists.sourceforge.net mailinglist"

Subject: [Open Babel] Structure size scaling in 2D depiction
Message-ID:

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
--

Bakary N?tji DIALLO

PhD Student (Bioinformatics) ,
Research Unit in Bioinformatics (RUBi) 

Mail: diallobaka...@gmail.com |  Skype: diallobakary4

Tel:  +27798233845 | +223 74 56 57 22 | +223 97 39 77 14
-- next part --
An HTML attachment was scrubbed...
-- next part --
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 33868 bytes
Desc: not available

--



--

Subject: Digest Footer

___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--

End of OpenBabel-discuss Digest, Vol 167, Issue 10
**


___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss




Re: [Open Babel] OpenBabel-discuss Digest, Vol 167, Issue 10

2020-04-21 Thread Jean-Marc Nuzillard

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 

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 
To: "Bennion, Brian" 
Cc: "openbabel-discuss@lists.sourceforge.net"

Subject: Re: [Open Babel] Operating on multi molecule sdf files
Message-ID: 
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
 


-Geoff

-- next part --
An HTML attachment was scrubbed...

--

Message: 2
Date: Mon, 13 Apr 2020 21:07:56 +0200
From: "Bakary N'tji Diallo" 
To: "openbabel-discuss@lists.sourceforge.net mailinglist"

Subject: [Open Babel] Structure size scaling in 2D depiction
Message-ID:

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