Source for file Macromolecule_PDB.php
Documentation is available at Macromolecule_PDB.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Jesus M. Castagnetto <jmcastagnetto@php.net> |
// +----------------------------------------------------------------------+
require_once "Science/Chemistry/Macromolecule.php";
require_once "Science/Chemistry/Residue_PDB.php";
* Represents a PDB macromolecule, composed of several
* Science_Chemistry_Residue_PDB objects
* @author Jesus M. Castagnetto <jmcastagnetto@php.net>
* @package Science_Chemistry
* Constructor for the class
* @param string $pdb PDB ID of the containing file
* @param array $records Array of lines comprising the macromolecule
* @param object PDBFile $pdbfile reference to the PDB file object
* @return object Science_Chemistry_Macromolecule_PDB
$this->pdbfile = $pdbfile;
$this->parseResidues ($records);
* Makes the array of residues in the macromolecule
* @see Science_Chemistry_Macromolecule_PDB()
function parseResidues ($records) {
$nrecs = count($records);
for ($i=0; $i< $nrecs; $i++ ) {
$res_id = $res_name. ":". $seq_num. ":". $chain;
$res_atoms[$res_id][] = $atomrec;
foreach ($res_atoms as $mol_id => $atoms_list) {
} // end of Science_Chemistry_Macromolecule_PDB
// vim: expandtab: ts=4: sw=4
Documentation generated on Mon, 11 Mar 2019 15:48:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|