|
|
File: /home/jesus/devel/php/pear/Science/Chemistry/PDBParser.php
Chemical classes - Science_Chemistry
Science_Chemistry_PDBParser
Science_Chemistry_PDBParser
A self-contained class to parse a PDB file into an array of residues
|
public class Science_Chemistry_PDBParser
A self-contained class to parse a PDB file into an array of residues
each containing an array of atoms<br>Useful when dealing with big PDB files, where using the Science_Chemistry_PDBFileclass will generate out of memory errors.
|
|
|
|
|
|
Public Method Details |
Science_Chemistry_PDBParser |
public object PDBParser Science_Chemistry_PDBParser( string $filename, [ boolean $multi, boolean $meta, boolean $full ] )
|
|
Constructor for the class, requires a PDB filename
|
Parameter |
|
string |
$filename |
|
|
PDB filename |
|
|
boolean |
$multi |
= >>false<< |
|
whether to parse all models in a multi-model file |
|
|
boolean |
$meta |
= >>false<< |
|
whether to store the PDB file meta information |
|
|
boolean |
$full |
= >>false<< |
|
whether to store the full set of fields per atom |
|
Returns |
object PDBParser |
See Also |
parseResidues() |
|
getResidueList |
public array getResidueList( integer $macromol, string $resname )
|
|
Returns an array of residues with a particular name
from the indicated macromolecule index
|
Parameter |
|
integer |
$macromol |
|
|
Index of the macromolecule in the $macromolecules array |
|
|
string |
$resname |
|
|
Residue name, e.g. HIS, CYS, etc. |
|
Returns |
array list of residues with the requested name |
See Also |
$macromolecules |
|
|
Private Method Details |
parseResidues |
private void parseResidues( array $records, boolean $full )
|
|
Makes the array of residues in the macromolecule
|
Parameter |
|
|
|
boolean |
$full |
|
|
whether to store the full set of fields per atom |
|
Returns |
void |
See Also |
parseAtom() |
|
parseAtom |
private void parseAtom( string $atomrec, boolean $full, &$atomname )
|
|
Parses an atom record into an associative array
|
Parameter |
|
string |
$atomrec |
|
|
PDB atom record |
|
|
boolean |
$full |
|
|
whether to store the full set of fields per atom |
|
|
|
&$atomname |
|
|
Warning: documentation is missing. |
|
Returns |
void |
See Also |
parseResidues() |
|
|
Private Field Details |
$pdb |
private string $pdb
>> <<
PDB ID
|
|
$file |
private string $file
>> <<
Full path to PDB file
|
|
$date |
private unknown $date
>> <<
PDB file's date
|
|
$class |
private string $class
>> <<
PDB macromolecule(s) class
|
|
$macromolecules |
private array $macromolecules
>> <<
Array of macromolecules
|
|
$num_macromolecules |
private int $num_macromolecules
>> <<
Number of macromolecules
|
|
|
|
|
PHPDoc 1.0beta |