[MMTK] MMTK and missing atoms

Konrad Hinsen hinsen@cnrs-orleans.fr
20 Oct 2002 21:13:07 +0200


Sabine Beraud <sabine@nmr.clarku.edu> writes:

> configuration = PDBConfiguration(file.pdb)
> monomer = configuration.createPeptideChains()[0]
> 
> But if an atom is missing in file.pdb, the program stops.
> (ex. of message error: "ValueError: position of .Arg5.sidechain.C_delta is 
> undefined")
> I would like to know if there is a way to avoid that.

More than one, but in any case you will end up with undefined atom
positions in your model, which limits its usefulness.

The error message comes from the routine that finds suitable positions
for the hydrogen atoms. If it detects hydrogens that are bound to
other atoms whose positions are undefined as well, it stops.

The method createPeptideChains() is a high-level convenience function
that always does hydrogen construction, so you shouldn't use it.
Instead, you can use the MMTK.Proteins.PeptideChain constructor
directly:

  from MMTK.Proteins import PeptideChain
  configuration = PDBConfiguration('file.pdb')
  monomer = PeptideChain(configuration.peptide_chains[0])

If you can then somehow fix the missing atom positions for non-hydrogens,
you can also call the hydrogen construction explicitly:

  monomer.findHydrogenPositions()

In fact, if you look at the code of createPeptideChains() (PDB.py, line 156),
it does little more than these few lines do.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------