<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Scientific.IO.PDB.Structure</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="Scientific-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="http://dirac.cnrs-orleans.fr/ScientificPython/">Scientific Python</a></th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="Scientific-module.html">Package Scientific</a> :: <a href="Scientific.IO-module.html">Package IO</a> :: <a href="Scientific.IO.PDB-module.html">Module PDB</a> :: Class Structure </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >] | <a href="Scientific.IO.PDB.Structure-class.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class Structure</h1><p class="nomargin-top"></p> <p>A high-level representation of the contents of a PDB file</p> <p>The components of a structure can be accessed in several ways ('s' is an instance of this class):</p> <ul> <li> 's.residues' is a list of all PDB residues, in the order in which they occurred in the file. </li> <li> 's.peptide_chains' is a list of PeptideChain objects, containing all peptide chains in the file in their original order. </li> <li> 's.nucleotide_chains' is a list of NucleotideChain objects, containing all nucleotide chains in the file in their original order. </li> <li> 's.molecules' is a list of all PDB residues that are neither amino acid residues nor nucleotide residues, in their original order. </li> <li> 's.objects' is a list of all high-level objects (peptide chains, nucleotide chains, and molecules) in their original order. </li> <li> 's.to_fractional' is the transformation from real-space coordinates to fractional coordinates, as read from the SCALEn records. </li> <li> 's.from_fractional' is the transformation from fractional coordinates to real-space coordinates, the inverse of s.to_fractional. </li> <li> 's.ncs_transformations' is a list of transformations that describe non-crystallographic symmetries, as read from the MTRIXn records. </li> <li> if a CRYST1 record exists, 's.a', 's.b', 's.c', 's.alpha', 's.beta', 's.gamma' are the parameters of the unit cell and 's.space_group' is a string indicating the space group. If no CRYST1 record exists, all those values are None. Furthermore, 's.cs_transformations' is a list of transformations that describe crystallographic symmetries. If no CRYST1 record exists, the list is empty. </li> </ul> <p>An iteration over a Structure instance by a for-loop is equivalent to an iteration over the residue list.</p> <!-- ==================== NESTED CLASSES ==================== --> <a name="section-NestedClasses"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Nested Classes</span></td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Scientific.IO.PDB.Molecule-class.html" class="summary-name">molecule_constructor</a><br /> Molecule in a PDB file </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Scientific.IO.PDB.NucleotideChain-class.html" class="summary-name">nucleotide_chain_constructor</a><br /> Nucleotide chain in a PDB file </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Scientific.IO.PDB.PeptideChain-class.html" class="summary-name">peptide_chain_constructor</a><br /> Peptide chain in a PDB file </td> </tr> </table> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Instance Methods</span></td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">item</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">file_or_filename</span>, <span class="summary-sig-arg">model</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">alternate_code</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code></span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="addMolecule"></a><span class="summary-sig-name">addMolecule</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">molecule</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="deleteHydrogens"></a><span class="summary-sig-name">deleteHydrogens</span>(<span class="summary-sig-arg">self</span>)</span><br /> Remove all hydrogen atoms</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="deleteResidue"></a><span class="summary-sig-name">deleteResidue</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">residue</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="extractData"></a><span class="summary-sig-name">extractData</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">data</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="findSpaceGroupTransformations"></a><span class="summary-sig-name">findSpaceGroupTransformations</span>(<span class="summary-sig-arg">self</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#joinNucleotideChains" class="summary-sig-name">joinNucleotideChains</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">first</span>, <span class="summary-sig-arg">second</span>)</span><br /> Join two nucleotide chains into a single one.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#joinPeptideChains" class="summary-sig-name">joinPeptideChains</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">first</span>, <span class="summary-sig-arg">second</span>)</span><br /> Join two peptide chains into a single one.</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="newChain"></a><span class="summary-sig-name">newChain</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">residue</span>, <span class="summary-sig-arg">chain_data</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="newResidue"></a><span class="summary-sig-name">newResidue</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">residue_data</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="parseFile"></a><span class="summary-sig-name">parseFile</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">file</span>)</span></td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="renumberAtoms"></a><span class="summary-sig-name">renumberAtoms</span>(<span class="summary-sig-arg">self</span>)</span><br /> Renumber all atoms sequentially starting with 1</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#splitNucleotideChain" class="summary-sig-name">splitNucleotideChain</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>, <span class="summary-sig-arg">position</span>)</span><br /> Split a nucleotide chain into two chains</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#splitPeptideChain" class="summary-sig-name">splitPeptideChain</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">number</span>, <span class="summary-sig-arg">position</span>)</span><br /> Split a peptide chain into two chains</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Scientific.IO.PDB.Structure-class.html#writeToFile" class="summary-sig-name">writeToFile</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">file</span>)</span><br /> Write everything to a file</td> <td align="right" valign="top"> </td> </tr> </table> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td align="left" colspan="2" class="table-header"> <span class="table-header">Method Details</span></td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">file_or_filename</span>, <span class="sig-arg">model</span>=<span class="sig-default">0</span>, <span class="sig-arg">alternate_code</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code></span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" > </td> </tr></table> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>file_or_filename</code></strong> (<code>str</code> or <code>file</code>) - the name of the PDB file, or a file object. Compressed files and URLs are accepted, as for class <a href="Scientific.IO.PDB.PDBFile-class.html" class="link">PDBFile</a>.</li> <li><strong class="pname"><code>model</code></strong> (<code>int</code>) - the number of the model to read from a multiple-model file. Only one model can be treated at a time.</li> <li><strong class="pname"><code>alternate_code</code></strong> (single-letter <code>str</code>) - the version of the positions to be read from a file with alternate positions.</li> </ul></dd> </dl> </td></tr></table> </div> <a name="joinNucleotideChains"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">joinNucleotideChains</span>(<span class="sig-arg">self</span>, <span class="sig-arg">first</span>, <span class="sig-arg">second</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Join two nucleotide chains into a single one. The new chain occupies the position of the first chain, the second one is removed from the nucleotide chain list.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>first</code></strong> (<code>int</code>) - the number of the first chain</li> <li><strong class="pname"><code>second</code></strong> (<code>int</code>) - the number of the second chain</li> </ul></dd> </dl> </td></tr></table> </div> <a name="joinPeptideChains"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">joinPeptideChains</span>(<span class="sig-arg">self</span>, <span class="sig-arg">first</span>, <span class="sig-arg">second</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Join two peptide chains into a single one. The new chain occupies the position of the first chain, the second one is removed from the peptide chain list.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>first</code></strong> (<code>int</code>) - the number of the first chain</li> <li><strong class="pname"><code>second</code></strong> (<code>int</code>) - the number of the second chain</li> </ul></dd> </dl> </td></tr></table> </div> <a name="splitNucleotideChain"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">splitNucleotideChain</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>, <span class="sig-arg">position</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Split a nucleotide chain into two chains</p> <p>The two chain fragments remain adjacent in the nucleotide chain list, i.e. the numbers of all following chains increase by one.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>number</code></strong> (<code>int</code>) - the number of the nucleotide chain to be split</li> <li><strong class="pname"><code>position</code></strong> (<code>int</code>) - the residue index at which the chain is split.</li> </ul></dd> </dl> </td></tr></table> </div> <a name="splitPeptideChain"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">splitPeptideChain</span>(<span class="sig-arg">self</span>, <span class="sig-arg">number</span>, <span class="sig-arg">position</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Split a peptide chain into two chains</p> <p>The two chain fragments remain adjacent in the peptide chain list, i.e. the numbers of all following chains increase by one.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>number</code></strong> (<code>int</code>) - the number of the peptide chain to be split</li> <li><strong class="pname"><code>position</code></strong> (<code>int</code>) - the residue index at which the chain is split.</li> </ul></dd> </dl> </td></tr></table> </div> <a name="writeToFile"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">writeToFile</span>(<span class="sig-arg">self</span>, <span class="sig-arg">file</span>)</span> </h3> </td><td align="right" valign="top" > </td> </tr></table> <p>Write everything to a file</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>file</code></strong> (<a href="Scientific.IO.PDB.PDBFile-class.html" class="link">PDBFile</a> or <code>str</code>) - a PDB file object or a filename</li> </ul></dd> </dl> </td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th> <a href="Scientific-module.html">Home</a> </th> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="http://dirac.cnrs-orleans.fr/ScientificPython/">Scientific Python</a></th> </tr></table></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Thu Dec 4 08:05:44 2008 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>