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 |
$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 |
|
|
| 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 |
|