Hi Jason,
On Sun, Jan 14, 2018 at 8:23 PM, Jason Biggs <jasondbi...@gmail.com> wrote:
> Two question about mol file conformer reading:
>
> Looking through the .mol files included for testing, and chose
> "Code/GraphMol/Depictor/test_data/7UPJ_spread.mol" at random.
>
> When I read in this file using the RDKit::MolFileToMol function, and then
> query its conformer's is3D() method, it returns true even though it is
> definitely a 2D depiction in the file. I'm not totally familiar with the
> MDL file specifications, so is there some flag I'm missing in the file?
>
There is an optional flag that can be present on the second line of the Mol
file to indicate whether a set of coordinates is 2D or 3D.
Here are two examples:
In [22]: print(Chem.MolToMolBlock(m,confId=0))
RDKit 2D
5 4 0 0 0 0 0 0 0 0999 V2000
1.5000 -0.0000 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5000 0.0000 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 1.5000 0.0000 Br 0 0 0 0 0 0 0 0 0 0 0 0
-0.0000 -1.5000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
2 3 1 0
2 4 1 0
2 5 1 0
M END
In [23]: print(Chem.MolToMolBlock(m,confId=1))
RDKit 3D
5 4 0 0 0 0 0 0 0 0999 V2000
-0.1605 1.2383 -0.7086 F 0 0 0 0 0 0 0 0 0 0 0 0
-0.0476 0.1120 0.0663 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.3542 -1.0307 -0.3007 Cl 0 0 0 0 0 0 0 0 0 0 0 0
1.6975 -0.6868 -0.2044 Br 0 0 0 0 0 0 0 0 0 0 0 0
-0.1352 0.3672 1.1474 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
2 3 1 0
2 4 1 0
2 5 1 0
M END
The RDKit assumes that the conformations it reads are 3D unless that flag
is set to "2D".
>
> Second question,
>
> When I read in a file with a 3D conformer, and then later use
> compute2DCoords, followed by WedgeMolBonds, it adds wedges to non-chiral
> atoms. Is this by design?
>
No, this definitely should not happen. If it does, it's a bug.
I'm guessing that's what you're seeing is the wedges that were originally
present in your mol file (at least in the example you provide below)
> It definitely does serve to convey 3D information from the file in the
> depiction, but I'd also like to know how to disable it if possible. Would
> running assignStereochemistry fix the issue.
>
Yes, if you ensure that the "cleanIt" argument is set.
The fact that this isn't happening for you indicates that you are reading
the molecules in without sanitizing them - the mol file parser calls
assignStereochemistry() by default if you sanitize. Are you sure that you
should be disabling sanitization?
-greg
>
> The mol file for the second question is pasted below, and here is the
> generated depiction,
>
> [image: Inline image 2]
>
>
> aspirin.mol
>
> 21 21 0 0 0
> -2.2240 -1.4442 -0.4577 C 0 0 0 0 0
> -2.1657 -0.0545 -0.5349 C 0 0 0 0 0
> -0.9916 0.6085 -0.1694 C 0 0 0 0 0
> 0.1471 -0.0738 0.2764 C 0 0 0 0 0
> 0.0751 -1.4832 0.3390 C 0 0 0 0 0
> -1.1052 -2.1532 -0.0188 C 0 0 0 0 0
> 1.2412 -2.2934 0.7925 C 0 0 0 0 0
> 2.4223 -1.7619 1.1727 O 0 0 0 0 0
> 1.1650 -3.5162 0.8364 O 0 0 0 0 0
> 1.2795 0.6233 0.5954 O 0 0 0 0 0
> 1.1005 1.7577 1.3258 C 0 0 0 0 0
> 2.4429 2.3635 1.6825 C 0 0 0 0 0
> 0.0255 2.2041 1.6578 O 0 0 0 0 0
> -3.1430 -1.9775 -0.7500 H 0 0 0 0 0
> -3.0382 0.5167 -0.8915 H 0 0 0 0 0
> -0.9608 1.7083 -0.2479 H 0 0 0 0 0
> -1.1740 -3.2520 0.0315 H 0 0 0 0 0
> 2.9869 -2.5132 1.4166 H 0 0 0 0 0
> 2.3142 3.3967 2.0773 H 0 0 0 0 0
> 3.1051 2.4141 0.7884 H 0 0 0 0 0
> 2.9391 1.7459 2.4657 H 0 0 0 0 0
> 1 2 2 0 0 0
> 1 6 1 0 0 0
> 1 14 1 0 0 0
> 2 3 1 0 0 0
> 2 15 1 0 0 0
> 3 4 2 0 0 0
> 3 16 1 0 0 0
> 4 5 1 0 0 0
> 4 10 1 0 0 0
> 5 6 2 0 0 0
> 5 7 1 0 0 0
> 6 17 1 0 0 0
> 7 8 1 0 0 0
> 7 9 2 0 0 0
> 8 18 1 0 0 0
> 10 11 1 1 0 0
> 11 12 1 0 0 0
> 11 13 2 0 0 0
> 12 19 1 0 0 0
> 12 20 1 6 0 0
> 12 21 1 1 0 0
> M END
>
>
> Thanks,
>
> Jason
>
> ------------------------------------------------------------
> ------------------
> 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