allpy
view allpy/pdb.py @ 386:06659228cd6f
fix bug in allpy/pdb.py
author | boris <bnagaev@gmail.com> |
---|---|
date | Wed, 02 Feb 2011 16:21:04 +0300 |
parents | d7fc6865ce58 |
children |
line source
1 """ Functions to get pdb information from fasta id
2 and to generate fasta id from pdb information
4 pdb information: code, chain, model
6 TODO: same for local pdb files
7 """
25 # for pdb-codes
26 re1 = re.compile(r"(^|[^a-z0-9])(?P<code>[0-9][0-9a-z]{3})([^a-z0-9](?P<chain>[0-9a-z ]?)(?P<model>[^a-z0-9]([0-9]{1,3}))?)?", re.I)
44 """Mixin for adding PDB data to a Sequence.
46 Please note: since this is a mixin, no objects of this class should be
47 created. This class is intended to be subclassed together with one of
48 Sequence classes.
50 Attributes:
52 * pdb_chain -- Bio.PDB.Chain
53 * pdb_residues -- {Monomer: Bio.PDB.Residue}
55 ?TODO: global pdb_structures
56 """
59 """ Reads Pdb chain from file
61 and align each Monomer with PDB.Residue (TODO)
62 """
78 """ Delete all pdb-connected links """
82 @classmethod
84 """ Returns Sequence with Monomers with link to Bio.PDB.Residue
86 chain is Bio.PDB.Chain
87 """
104 """ Adds pdb information to each monomer
106 Returns if information has been successfully added
107 TODO: conformity_file
109 id-format lava flow
110 """
134 """ Saves pdb_chain to out_file """
147 """ Iterates Ca-atom of monomers of this sequence """
151 """Mixin to add 3D properties to alignments.
153 Please note: since this is a mixin, no objects of this class should be
154 created. This class is intended to be subclassed together with one of
155 Alignment classes.
156 """
157 pass
160 """Mixin to add 3D properties to blocks.
162 Please note: since this is a mixin, no objects of this class should be
163 created. This class is intended to be subclassed together with one of
164 Block classes.
165 """
170 """ Returns length-sorted list of GCs
171 GC is set of columns
173 * max_delta -- threshold of distance spreading
174 * timeout -- Bron-Kerbosh timeout (then fast O(n ln n) algorithm)
175 * minsize -- min size of each core
176 * ac_new_atoms -- min part or new atoms in new alternative core
177 current GC is compared with each of already selected GCs if
178 difference is less then ac_new_atoms, current GC is skipped
179 difference = part of new atoms in current core
180 * ac_count -- max number of cores (including main core)
181 -1 means infinity
183 cost is calculated as 1 / (delta + 1)
184 delta in [0, +inf) => cost in (0, 1]
185 """
214 break
222 """ Superimpose all pdb_chains in this block """
231 # Apply rotation/translation to the moving atoms
235 """ Save all sequences
237 Returns {(sequence, chain): CHAIN}
238 CHAIN is chain letter in new file
239 """
245 # TODO: read from tmp_file.name
246 # change CHAIN
247 # add to out_file
251 # vim: set ts=4 sts=4 sw=4 et: