Public Method Details |
Science_Chemistry_Molecule |
public object Science_Chemistry_Molecule Science_Chemistry_Molecule( string $name, [ string $atoms ] )
|
|
Constructor for the class, requires a molecule name
and an optional array of Science_Chemistry_Atom objects
|
Parameter |
|
|
|
|
Returns |
object Science_Chemistry_Molecule |
See Also |
$name, initMolecule() |
|
initMolecule |
public boolean initMolecule( array $atoms )
|
|
Initializes the array of Science_Chemistry_Atom objects
|
Parameter |
|
|
Returns |
boolean |
See Also |
$num_atoms, $atoms, addAtom() |
|
addAtom |
public boolean addAtom( object Science_Chemistry_Atom $atom )
|
|
Adds a Science_Chemistry_Atom object to the list of atoms in the molecule
|
Parameter |
|
object Science_Chemistry_Atom |
$atom |
|
|
|
|
Returns |
boolean |
See Also |
initMolecule() |
|
getAtoms |
public array getAtoms( )
|
|
Returns an array of Atom objects
|
Returns |
array |
See Also |
$atoms |
|
isMolecule |
public boolean isMolecule( object Science_Chemistry_Molecule $obj )
|
|
Checks if the object is an instance of Science_Chemistry_Molecule
|
Parameter |
|
object Science_Chemistry_Molecule |
$obj |
|
|
|
|
Returns |
boolean |
|
toString |
public string toString( )
|
|
Returns a string representation of the molecule
as a 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 |
= >>"molecule"<< |
|
|
|
|
|
|
boolean |
$connect |
|
|
Warning: documentation is missing. |
|
Returns |
string |
|
setBondCutoff |
public boolean setBondCutoff( float $cutoff )
|
|
Sets the distance cutoff for bond determination
|
Parameter |
|
|
Returns |
boolean |
See Also |
$BONDCUTOFF, getBondCutoff(), calcConnectionTable() |
|
getBondCutoff |
public float getBondCutoff( )
|
|
Returns the bond cutoff uses to determine bonds
|
Returns |
float |
See Also |
$BONDCUTOFF, setBondCutoff(), calcConnectionTable() |
|
calcDistanceMatrix |
public boolean calcDistanceMatrix( )
|
|
Calculates the atom-atom distance matrix in Angstroms
|
Returns |
boolean |
|
printDistanceMatrix |
public string printDistanceMatrix( )
|
|
Prints the atom-atom distance matrix
|
Returns |
string |
|
getDistanceMatrix |
public array getDistanceMatrix( )
|
|
Returns the atom-atom distance matrix
|
Returns |
array |
|
calcConnectionTable |
public boolean calcConnectionTable( )
|
|
Calculates the connection table for the molecule
|
Returns |
boolean |
|
printConnectionTable |
public boolean printConnectionTable( )
|
|
Prints the molecule's connection table
|
Returns |
boolean |
|
getConnectionTable |
public array getConnectionTable( )
|
|
Returns an array of connected atoms and their bond distance
e.g. array ( array ($atomobj1, $atomobj2, $distance ), ... )
|
Returns |
array |
|