Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal Atoms in PDB not properly recognized #2265

Open
RMeli opened this issue May 21, 2019 · 3 comments

Comments

@RMeli
Copy link
Member

commented May 21, 2019

Expected behavior

I expect

In [1]: import MDAnalysis as mda                                                                                                                                                         
In [2]: u = mda.Universe("example.pdb") 

to work with the PDB file below.

Actual behavior

The following warnings are issued:

/users/lina3015/software/python/mdanalysis-develop/package/MDAnalysis/topology/guessers.py:73: UserWarning: Failed to guess the mass for the following atom types: Ca
  warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))
/users/lina3015/software/python/mdanalysis-develop/package/MDAnalysis/topology/guessers.py:73: UserWarning: Failed to guess the mass for the following atom types: Fe
  warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))
/users/lina3015/software/python/mdanalysis-develop/package/MDAnalysis/topology/guessers.py:73: UserWarning: Failed to guess the mass for the following atom types: Mg
  warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))

The problem comes from the fact that the name of the atoms are Mg, Fe, Ca instead of MG, FE, CA. Open Babel 2.4.1 outputs the name of the elements with the second letter in lower case.

The problem is discussed in Issue #1808.

Code to reproduce the behavior

PDB file:

HEADER Example
SEQRES   1 A  3    SER LYS GLY
ATOM      1  N   SER A   2      13.761  13.879 -11.601  1.00 66.03           N
ATOM      2  HN1 SER A   2      12.949  13.271 -11.831  1.00  0.00           H
ATOM      3  HN2 SER A   2      14.536  13.296 -11.225  1.00  0.00           H
ATOM      4  HN3 SER A   2      13.478  14.583 -10.889  1.00  0.00           H
ATOM      5  CA  SER A   2      14.219  14.576 -12.829  1.00 65.42           C
ATOM      6  HA  SER A   2      14.524  13.844 -13.577  1.00  0.00           H
ATOM      7  C   SER A   2      15.409  15.463 -12.478  1.00 64.57           C
ATOM      8  O   SER A   2      16.554  15.049 -12.613  1.00 64.91           O
ATOM      9  CB  SER A   2      13.078  15.409 -13.424  1.00 66.10           C
ATOM     10  HB1 SER A   2      12.909  16.282 -12.794  1.00  0.00           H
ATOM     11  HB2 SER A   2      12.173  14.803 -13.453  1.00  0.00           H
ATOM     12  OG  SER A   2      13.388  15.841 -14.740  1.00 67.19           O
ATOM     13  HG  SER A   2      12.635  16.375 -15.097  1.00  0.00           H
ATOM     14  N   LYS A   3      15.133  16.673 -12.004  1.00 63.15           N
ATOM     15  H   LYS A   3      14.140  16.965 -11.905  1.00  0.00           H
ATOM     16  CA  LYS A   3      16.189  17.600 -11.619  1.00 61.61           C
ATOM     17  HA  LYS A   3      17.177  17.202 -11.851  1.00  0.00           H
ATOM     18  C   LYS A   3      16.032  17.823 -10.119  1.00 59.63           C
ATOM     19  O   LYS A   3      16.667  17.140  -9.322  1.00 59.93           O
ATOM     20  CB  LYS A   3      16.053  18.916 -12.392  1.00 62.69           C
ATOM     21  HB1 LYS A   3      15.627  18.694 -13.371  1.00  0.00           H
ATOM     22  HB2 LYS A   3      15.374  19.566 -11.841  1.00  0.00           H
ATOM     23  CG  LYS A   3      17.362  19.663 -12.601  1.00 63.33           C
ATOM     24  HG1 LYS A   3      17.713  20.040 -11.641  1.00  0.00           H
ATOM     25  HG2 LYS A   3      18.102  18.976 -13.013  1.00  0.00           H
ATOM     26  CD  LYS A   3      17.183  20.833 -13.559  1.00 64.34           C
ATOM     27  HD1 LYS A   3      16.514  21.561 -13.099  1.00  0.00           H
ATOM     28  HD2 LYS A   3      18.155  21.294 -13.732  1.00  0.00           H
ATOM     29  CE  LYS A   3      16.593  20.409 -14.911  1.00 65.03           C
ATOM     30  HE1 LYS A   3      16.367  21.308 -15.484  1.00  0.00           H
ATOM     31  HE2 LYS A   3      15.672  19.857 -14.725  1.00  0.00           H
ATOM     32  NZ  LYS A   3      17.501  19.548 -15.727  1.00 65.45           N
ATOM     33  HZ1 LYS A   3      18.382  20.064 -15.924  1.00  0.00           H
ATOM     34  HZ2 LYS A   3      17.718  18.678 -15.200  1.00  0.00           H
ATOM     35  HZ3 LYS A   3      17.033  19.304 -16.623  1.00  0.00           H
ATOM     36  N   GLY A   4      15.116  18.721  -9.756  1.00 56.92           N
ATOM     37  H   GLY A   4      14.586  19.222 -10.498  1.00  0.00           H
ATOM     38  CA  GLY A   4      14.827  19.029  -8.362  1.00 53.00           C
ATOM     39  HA1 GLY A   4      14.484  20.063  -8.318  1.00  0.00           H
ATOM     40  HA2 GLY A   4      14.024  18.367  -8.038  1.00  0.00           H
ATOM     41  C   GLY A   4      15.964  18.883  -7.376  1.00 49.65           C
ATOM     42  O   GLY A   4      16.115  17.829  -6.749  1.00 50.49           O
TER
HETATM 5935 MG    MG     1      20.414  28.113  14.934  1.00 25.89          Mg
HETATM 5936  O   HOH     2      20.617  18.139 -10.469  1.00 44.84           O
HETATM 5937  O   HOH     3      19.500  17.550 -12.901  1.00 49.35           O
HETATM 5938  O   HOH     4      13.990  17.613  -4.873  1.00 38.69           O
HETATM 6932 FE    FE     1       7.237 -13.445  41.879  1.00 16.53          Fe
HETATM 6933  O   HOH     2      12.331 -25.176  49.589  1.00 11.03           O
HETATM 6934  O   HOH     3       0.846 -28.056  24.965  1.00  3.98           O
HETATM 6935  O   HOH     4      -1.805 -28.400  30.994  1.00  7.38           O
HETATM 3744 CA    CA     1      18.911  11.652   7.836  1.00  2.33          Ca
HETATM 3745 CA    CA     2      18.013   3.000  21.617  1.00 13.46          Ca
HETATM 3746  O   HOH     3      19.129  20.805   2.497  1.00 13.12           O
HETATM 3747  O   HOH     4      10.694  18.824  22.901  1.00 14.21           O
HETATM 3748  O   HOH     5      24.830  32.697   7.145  1.00 17.46           O
END

Currently version of MDAnalysis

  • Which version are you using? 0.19.3-dev
  • Which version of Python (python -V)? Python 3.7.3
  • Which operating system? Linux Ubuntu 18/macOS 10.14
@orbeckst

This comment has been minimized.

Copy link
Member

commented May 21, 2019

@RMeli would give permission to include the data file above in the MDAnalysis tests under the GPLv2?

@orbeckst orbeckst changed the title UserWarning with Metal Atoms in PDB Metal Atoms in PDB not properly recognized May 21, 2019

@RMeli

This comment has been minimized.

Copy link
Member Author

commented May 21, 2019

@orbeckst The file above is a patchwork of different PDB files coming from the PDBbind dataset (first three residues from one file, HETATMs selected from various different other files). I didn't keep track from which files I took each part, but personally I have no objections including it in MDAnalysis.

@orbeckst

This comment has been minimized.

Copy link
Member

commented May 21, 2019

Thanks – as long as it is usable as a test case and as long as you know that you can give us permission to use it, it's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.