Giter Site home page Giter Site logo

Comments (2)

martimunicoy avatar martimunicoy commented on June 12, 2024

Support

List of features to check in the input PDB:

  • All atom names need to be unique. Otherwise raise Exception('Ligand in input PDB has no unique atom names')
  • All residue ids must match. Otherwise raise Exception('A single ligand with immutable residue ids is expected')
  • All residue names must match. Otherwise raise Exception('A single ligand with immutable residue names is expected')
  • Check for at least one CONECT line. Otherwise output a warning: 'Input PDB has no information about the connectivity and this could result in an unexpected bond assignment')

from peleffy.

laumalo avatar laumalo commented on June 12, 2024

Implementation

The function _PDB_chekup(path) has been included in the class Molecule.
And it runs prior running the parametrization, here.

#Validate PDB
self._PDB_checkup(path)

Tests

PDBs that test the three posible errors and one warning: pdb_errors.zip

  • For the following PDB file in which the atom name C1 is repeated:
HETATM    1  C1  UNK     1       0.634  -0.083   0.007  1.00  0.00           C  
HETATM    2  C1  UNK     1      -0.671   0.098  -0.007  1.00  0.00           C  
HETATM    3  H1  UNK     1       1.354   0.739   0.049  1.00  0.00           H  
HETATM    4  H2  UNK     1       1.082  -1.071  -0.022  1.00  0.00           H  
HETATM    5  H3  UNK     1      -1.096   1.088   0.022  1.00  0.00           H  
HETATM    6  H4  UNK     1      -1.302  -0.770  -0.049  1.00  0.00           H  
CONECT    1    2    2    3    4
CONECT    2    5    6
END

It raises the exception:

Exception: Ligand in input PDB has no unique atom names
  • For the following PDB file in which the residue id for the atom H3 does not match:
HETATM    1  C1  UNK     1       0.634  -0.083   0.007  1.00  0.00           C  
HETATM    2  C2  UNK     1      -0.671   0.098  -0.007  1.00  0.00           C  
HETATM    3  H1  UNK     1       1.354   0.739   0.049  1.00  0.00           H  
HETATM    4  H2  UNK     1       1.082  -1.071  -0.022  1.00  0.00           H  
HETATM    5  H3  UNK     2      -1.096   1.088   0.022  1.00  0.00           H  
HETATM    6  H4  UNK     1      -1.302  -0.770  -0.049  1.00  0.00           H  
CONECT    1    2    2    3    4
CONECT    2    5    6
END

It raises the exception:

Exception: A single ligand with immutable residue ids is expected
  • For the following PDB file in which the residue name for the atom H1 does not match:
HETATM    1  C1  UNK     1       0.634  -0.083   0.007  1.00  0.00           C  
HETATM    2  C2  UNK     1      -0.671   0.098  -0.007  1.00  0.00           C  
HETATM    3  H1  UNN     1       1.354   0.739   0.049  1.00  0.00           H  
HETATM    4  H2  UNK     1       1.082  -1.071  -0.022  1.00  0.00           H  
HETATM    5  H3  UNK     1      -1.096   1.088   0.022  1.00  0.00           H  
HETATM    6  H4  UNK     1      -1.302  -0.770  -0.049  1.00  0.00           H  
CONECT    1    2    2    3    4
CONECT    2    5    6
END

It raises the exception:

Exception: A single ligand with immutable residue names is expected

Unit tests here.

from peleffy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.