Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/jesus/devel/php/pear/Science/Chemistry/Macromolecule.php
Chemical classes - Science_Chemistry

Science_Chemistry_Macromolecule

Science_Chemistry_Macromolecule

Represents a macromolecule, composed of several

 

public class Science_Chemistry_Macromolecule

Represents a macromolecule, composed of several
Science_Chemistry_Molecule objects

AuthorsJesus M. Castagnetto <jmcastagnetto@php.net>
Version1.0

 
Direct known subclasses: Science_Chemistry_Macromolecule_PDB

Public Method Summary

object Science_Chemistry_Macromolecule

Science_Chemistry_Macromolecule(string $name, [ string $molecules ])

Constructor for the class, requires a macromolecule name
boolean

initMacromolecule(array $molecules)

Initializes the array of Science_Chemistry_Molecule objects
boolean

addMolecule(object Science_Chemistry_Molecule $mol)

Adds a Science_Chemistry_Molecule object to the list of molecules in the macromolecule
array

getMolecules()

Returns an array of Science_Chemistry_Molecule objects
boolean

isMacromolecule(object Science_Chemistry_Macromolecule $obj)

Checks if the object is an instance of Science_Chemistry_Macromolecule
string

toString()

Returns a string representation of the macromolecule
string

toCML([ string $title, string $id ], boolean $connect)

Returns a CML representation of the molecule

Private Field Summary

string

$name

Macromolecule's name
array

$molecules

Array of molecular objects
int

$num_molecules

Number of molecules/subunits

Public Method Details

Science_Chemistry_Macromolecule

public object Science_Chemistry_Macromolecule Science_Chemistry_Macromolecule( string $name, [ string $molecules ] )

  Constructor for the class, requires a macromolecule name
and an optional array of Science_Chemistry_Molecule objects

Parameter
string $name
string $molecules = >>""<<
Returns object Science_Chemistry_Macromolecule

See Also $name, initMacromolecule()

initMacromolecule

public boolean initMacromolecule( array $molecules )

  Initializes the array of Science_Chemistry_Molecule objects

Parameter
array $molecules
Returns boolean

See Also $num_molecules, $molecules, addMolecule()

addMolecule

public boolean addMolecule( object Science_Chemistry_Molecule $mol )

  Adds a Science_Chemistry_Molecule object to the list of molecules in the macromolecule

Parameter
object Science_Chemistry_Molecule $mol
Returns boolean

See Also initMacromolecule()

getMolecules

public array getMolecules( )

  Returns an array of Science_Chemistry_Molecule objects

Returns array

See Also $molecules

isMacromolecule

public boolean isMacromolecule( object Science_Chemistry_Macromolecule $obj )

  Checks if the object is an instance of Science_Chemistry_Macromolecule

Parameter
object Science_Chemistry_Macromolecule $obj
Returns boolean


toString

public string toString( )

  Returns a string representation of the macromolecule
as a multiple molecule XYZ-format file

Returns string


toCML

public string toCML( [ string $title, string $id ], boolean $connect )

  Returns a CML representation of the molecule
Accepts an optional id, and a flag to signalprinting of the connection table

Parameter
string $title = >>"macromolecule"<<
string $id = >>"macromol1"<<
boolean $connect
Warning: documentation is missing.
Returns string


Private Field Details

$name

private string $name

>><<

Macromolecule's name


$molecules

private array $molecules

>><<

Array of molecular objects


$num_molecules

private int $num_molecules

>><<

Number of molecules/subunits



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta