Re: [Rdkit-discuss] Plotting values next to atoms

2018-11-09 Thread John Mayfield
Well since someone suggested hacking B factors and using Pymol... not using
RDKit but

CCCOCC |$_AV:;;;3.14$|

AV=Atom Value, round tripped through MOLfile and ChemAxon extended SMILES.

[image: image.png]

Live Depiction:
https://www.simolecule.com/cdkdepict/depict/bow/svg?smi=CCCOCC%20%7C%24_AV%3A%3B%3B%3B3.14%24%7C=on=bridgehead=false=1.6=atomvalue

John

On Tue, 6 Nov 2018 at 02:01, Francois Berenger  wrote:

> On 03/11/2018 04:27, Greg Landrum wrote:
> > Hi Eric,
> >
> > On Fri, Nov 2, 2018 at 2:00 PM Eric Jonas  wrote:
> >
> >> Hello! I'm trying to figure out if there's any known or sane way to
> >> automatically plot numerical values adjacent to atoms using the
> >> rdkit drawing machinery. Ideally I'd like to annotate certain atoms
> >> programmatically with values. I think the conventional way this is
> >> done for publication is post-hoc editing in illustrator but it would
> >> be great if there was an automatic or supported mechanism.
>
> Hi Eric,
>
> One hackish way is to export your molecules in 3D in the PDB format.
> Then shove your numeric value into the B-factor field.
> Then, color your molecules by B-factor using your favorite viewer
> (Chimera, pymol, etc.).
> For this to work correctly, you may have to scale your values so that
> they become in the same
> range than B-factors.
>
> Wit a little programming, you could also export your molecules (in 3D,
> still) directly
> as balls in the BILD format of UCSF Chimera, and look at them into
> Chimera.
>
> https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/bild.html
>
> Regards,
> Francois.
>
> > Doing this correctly is on the list of high-priority things to do, and
> > I really hope to have something done for the 2019.03 release, but
> > there's no way I can guarantee that (it's a hard problem).
> >
> > In the meantime, there's a way to at least do something that is,
> > hopefully, better than nothing:
> > https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [1]
> >
> > displayed here:
> >
> https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [2]
> >
> >
> > Links:
> > --
> > [1]
> > https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [2]
> >
> https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> >
> > ___
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] [ext] online sdf to mol2 converter

2018-09-24 Thread John Mayfield
The joy of aromaticity models. Via Noel if you're running the (dev/master)
version of OpenBabel you can specify *-aa* to take the aromaticity from the
input. For example

>obabel -:o11 -omol2 -aa
> @MOLECULE
> *
>  5 5 0 0 0
> SMALL
> GASTEIGER
> @ATOM
>   1 O   0.0.0. O.2 1  UNL1 -0.4473
>   2 C   0.0.0. C.ar 1
> UNL10.1798
>   3 C   0.0.0. C.ar 1
> UNL10.0439
>   4 C   0.0.0. C.ar 1
> UNL10.0439
>   5 C   0.0.0. C.ar 1
> UNL10.1798
> @BOND
>  1 1 2   ar
>  2 2 3   ar
>  3 3 4   ar
>  4 4 5   ar
>  5 1 5   ar
> 1 molecule converted
> >obabel -:O1C=CC=C1 -omol2 -aa
> @MOLECULE
> *
>  5 5 0 0 0
> SMALL
> GASTEIGER
> @ATOM
>   1 O   0.0.0. O.2 1  UNL1 -0.4473
>   2 C   0.0.0. C.2 1 UNL10.1798
>   3 C   0.0.0. C.2 1 UNL10.0439
>   4 C   0.0.0. C.2 1 UNL10.0439
>   5 C   0.0.0. C.2 1 UNL10.1798
> @BOND
>  1 1 21
>  2 2 32
>  3 3 41
>  4 4 52
>  5 1 51
> 1 molecule converted


However Mol2 support is still not likely to be great.

On Mon, 24 Sep 2018 at 16:14, Volkamer, Andrea 
wrote:

> Maybe try NAOMI from Matthias Rarey's group (
> https://www.zbh.uni-hamburg.de/forschung/amd/software/naomi.html)
>
> Best, Andrea
>
> 
>
> Prof. Dr. Andrea Volkamer
>
> In-silico Toxicology Group
> ,
> Institute of Physiology, Charité Universitätsmedizin Berlin
>
> Campus Mitte: Virchowweg 6, 10117 Berlin
>
> Phone: +49 30 - 450 528 504
> E-Mail: andrea.volka...@charite.de
> --
> *Von:* Thomas Evangelidis [teva...@gmail.com]
> *Gesendet:* Montag, 24. September 2018 16:37
> *An:* RDKit Discuss
> *Betreff:* [ext] [Rdkit-discuss] online sdf to mol2 converter
>
> Greetings,
>
> Is anybody aware of a good sdf to mol2 file converter that is not based
> on OpenBabel? I want to avoid problems like the following, which I
> currently solve with Maestro. Basically, the problem is with O40 which
> -according to antechamber from AmberTools- should be sp3 within a
> non-aromatic pentameric ring, as opposed to OpenBabel which wants it to
> be sp2 within an aromatic pentameric ring.
>
> OpenBabel (AmberTools complain about the valence of O40):
>
> @MOLECULE
> BACE7
>  98 102 0 0 0
> SMALL
> GASTEIGER
>
> @ATOM
>   1 C   4.49061.0444  -22.8214 C.3 1  LIG1
>  -0.0624
>   2 C   4.89220.9339  -21.3406 C.3 1  LIG1
>  -0.0421
>   3 C   4.7328   -0.5268  -20.8573 C.3 1  LIG1
>  -0.0504
>   4 C   5.8712   -1.4883  -21.3104 C.3 1  LIG1
>  -0.0528
>   5 C   5.8678   -2.8681  -20.5852 C.3 1  LIG1
>  -0.0516
>   6 C   5.7796   -2.6627  -19.0768 C.3 1  LIG1
>  -0.0371
>   7 C   6.0082   -3.8328  -18.1147 C.3 1  LIG1
> 0.0156
>   8 N   5.0491   -3.7436  -16.9811 N.am1  LIG1
>  -0.2907
>   9 C   5.3910   -3.1904  -15.7259 C.2 1  LIG1
> 0.2471
>  10 O   4.9860   -3.7155  -14.6679 O.2 1  LIG1
>  -0.2700
>  11 C   6.1926   -1.9707  -15.7016 C.ar1  LIG1
> 0.0384
>  12 C   7.2723   -1.8151  -14.8219 C.ar1  LIG1
>  -0.0373
>  13 C   8.0748   -0.6639  -14.8950 C.ar1  LIG1
> 0.0383
>  14 C   7.75940.3295  -15.8386 C.ar1  LIG1
>  -0.0373
>  15 C   6.65290.1798  -16.6946 C.ar1  LIG1
> 0.0381
>  16 C   5.9088   -0.9874  -16.6449 C.ar1  LIG1
>  -0.0375
>  17 C   6.37581.1928  -17.7374 C.2 1  LIG1
> 0.2444
>  18 O   7.35751.7202  -18.3089 O.2 1  LIG1
>  -0.2702
>  19 N   5.05411.4981  -18.2116 N.am1  LIG1
>  -0.3060
>  20 C   4.83152.5154  -19.2554 C.3 1  LIG1
> 0.0508
>  21 C   4.04791.9160  -20.4590 C.3 1  LIG1
>  -0.0295
>  22 C   4.12783.7525  -18.6377 C.3 1  LIG1
> 0.0859
>  23 C   4.96604.3781  -17.5041 C.3 1  LIG1
> 0.0240
>  24 N   4.28425.5876  -17.0101 N.3 1  LIG1
>  -0.3095
>  25 C   5.17776.6776  -16.6101 C.3 1  LIG1
> 0.0213
>  26 C   6.01187.1928  -17.7645 C.ar1  LIG1
>  -0.0333
>  27 C   7.41347.0911  -17.6697 C.ar1  LIG1
>  -0.0573
>  28 C   8.23017.5127  -18.7170 C.ar1  LIG1
>  -0.0612
>  29 C   7.6590

Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread John Mayfield
InChI is an identifier and not a representation, you should not read
InChIs... but we are beyond hope there so...

The InChI string is correct and is the same if you roundtrip your preferred
one with charge separated bonds and the 5 valent one.

All toolkits will use the InChI library to read/write InChIs and it
generates the representation with 5v nitrogens, cactus is either applying
normalisation after reading or in this case (since it's the name resolved)
doing a identifier lookup from an original SMILES used to generate this
InChI:

echo
> 'InChI=1S/C16H10N6O2/c23-21(15-9-17-11-5-1-3-7-13(11)19-15)22(24)16-10-18-12-6-2-4-8-14(12)20-16/h1-10H'
> | inchi -STDIO -inChi2Struct -OutputSDF | obabel -imol -osmi

c1ccc2c(c1)ncc(n2)N(=N(=O)c1cnc2c2n1)=O Structure #1

SDF also attached without going though Open Babel.

- John


inchioutput.sdf
Description: chemical/mdl-sdfile
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Question about WedgeMolBonds

2017-02-25 Thread John Mayfield
>
> Is there something that the compute2DCoords() is doing that makes it a
> dependency for WedgeMolBonds()


Yes, calculating 2D coordinates. Look at these two molecules, they are the
same but the atoms have been positioned differently in 2D and hence the
wedging needs to be different. Therefore you need 2D coordinates before you
can (re)assign wedges.
[image: Inline images 3]
In truth since the two (2D layout and wedging) are dependant I'd probably
make the layout call the wedging automatically

John

On 25 February 2017 at 03:39, Shubbey McBean 
wrote:

> Hi, I am using WedgeMolBonds() to label converted 3D->2D conformations,
> roughly:
>
>   // ... read in 3D mol
>   assignChiralTypesFrom3D(mol);
>   assignStereochemistry(mol,true,true);
>   WedgeMolBonds(mol,());
>   compute2DCoords(...)
>
> However, this does not produce an accurate result.  In order to "fix"
> this, I need to reverse the last two calls (calling the 3D->2D _before_
> WedgeMolBonds). This seems counter-intuitive to me.  Is there something
> that the compute2DCoords() is doing that makes it a dependency for
> WedgeMolBonds()?  Or am I going about this the wrong way?  The specifics of
> my situation make it preferable to order things as stated, but it's not a
> deal-breaker.  Mostly I am just a bit stuck as to what is going on here.
>
> Thanks!
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss