Thank you Paolo, that's very useful.
But does that file work for you?
>>> import rdkit
>>> from rdkit import Chem
>>> ms = [x for x in Chem.SDMolSupplier('example.sdf')]
[21:04:24]
****
Post-condition Violation
Element '' not found
Violation occurred on line 91 in file
/Users/pemsley/autobuild/b-e-l/rdkit-Release_2015_03_1/Code/GraphMol/PeriodicTable.h
Failed Expression: anum>-1
****
[21:04:24] Unexpected error hit on line 5
Comparing the heads:
% head Ligands_noHydrogens.sdf
1CX2_S58_A_701
RCSB PDB01141507103D
Coordinates from PDB:1CX2:A:701 Model:1 without hydrogens
26 28 0 0 0 0 999 V2000
27.5570 21.7340 16.8580 C 0 0 0 0 0 0 0 0 0 0 0 0
26.3220 22.0290 16.3660 C 0 0 0 0 0 0 0 0 0 0 0 0
27.3340 21.1490 18.2120 C 0 0 0 0 0 0 0 0 0 0 0 0
28.3530 20.7370 19.2320 C 0 0 0 0 0 0 0 0 0 0 0 0
24.0280 21.4680 17.1130 C 0 0 0 0 0 0 0 0 0 0 0 0
23.4160 20.4550 17.8620 C 0 0 0 0 0 0 0 0 0 0 0 0
% head S58_ideal.sdf
S58
-ISIS- 3D
37 39 0 0 0 0 0 0 0 0 0
1.3830 0.0050 -2.9870 C 0 0 0 0 0
0.8620 0.0130 -1.7240 C 0 0 0 0 0
0.3190 -0.0060 -3.8900 C 0 0 0 0 0
0.4400 -0.0140 -5.3920 C 0 0 0 0 0
-1.4220 -0.0020 -0.7940 C 0 0 0 0 0
-2.5780 0.7620 -0.8830 C 0 0 0 0 0
The element column has shifted rightwards 2 spaces in Ligands_noHydrogens.sdf.
Weird? From
this output and presuming that if RDKit can't read it then it's wrong, it seems
to me that
RCSB are distributing non-conformant sdf files.
Do you agree?
Paul.
On 10/09/2016 18:58, Paolo Tosco wrote:
> Hi Paul,
>
> SDF files in the RCSB database do store PDB atom names, have a look at
>
> http://www.rcsb.org/pdb/download/downloadLigandFiles.do?ligandIdList=S58&structIdList=1CX2&instanceType=all&excludeUnobserved=false&includeHydrogens=false
>
>
> for an example.
>
> Atom names stored in this fashion are read in by the RDKit and can be
> accessed as the
> "molFileAlias" atom property; they can also be stored accordingly. See
>
> https://gist.github.com/ptosco/6e4468350f0fff183e4507ef24f092a1#file-pdb_atom_names-ipynb
>
> for an example.
>
> Cheers,
> p.
>
> On 10/09/2016 18:33, Paul Emsley wrote:
>> Hi RDKiters,
>>
>> Is it possible to store (PDB) atom names in sdf files? If so, how is this
>> done? (It was not
>> clear to me after reading CTFile.pdf.)
>>
>> (I hope that this question is allowed.)
>>
>> Thanks,
>>
>> Paul.
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Rdkit-discuss mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss