Science_Chemistry
[ class tree: Science_Chemistry ] [ index: Science_Chemistry ] [ all elements ]

Class: Science_Chemistry_Molecule

Source Location: /Science_Chemistry-1.0.2/Chemistry/Molecule.php

Class Overview


Base class representing a Molecule


Author(s):

Version:

  • 1.0

Variables

Methods


Child classes:

Science_Chemistry_Molecule_XYZ
Base class representing a Molecule from a XYZ format file
Science_Chemistry_Residue_PDB
Represents a PDB residue

Inherited Variables

Inherited Methods


Class Details

[line 33]
Base class representing a Molecule


[ Top ]


Class Variables

$name =  ""

[line 41]

Molecule name
  • Access: public

Type:   string


[ Top ]

$num_atoms =  0

[line 50]

Number of atoms in the molecule

Type:   integer


[ Top ]



Method Detail

Science_Chemistry_Molecule (Constructor)   [line 101]

object Science_Chemistry_Molecule Science_Chemistry_Molecule( string $name, [optional $atoms = ""])

Constructor for the class, requires a molecule name and an optional array of Science_Chemistry_Atom objects

Parameters:

string   $name   — 
optional   $atoms   —  array $atoms

[ Top ]

addAtom   [line 141]

boolean addAtom( object Science_Chemistry_Atom $atom)

Adds a Science_Chemistry_Atom object to the list of atoms in the molecule

Parameters:

object Science_Chemistry_Atom   $atom   — 

[ Top ]

calcConnectionTable   [line 346]

boolean calcConnectionTable( )

Calculates the connection table for the molecule
  • Access: public

[ Top ]

calcDistanceMatrix   [line 285]

boolean calcDistanceMatrix( )

Calculates the atom-atom distance matrix in Angstroms
  • Access: public

[ Top ]

getAtoms   [line 167]

array getAtoms( )

Returns an array of Atom objects
  • See: $atoms
  • Access: public

[ Top ]

getBondCutoff   [line 275]

float getBondCutoff( )

Returns the bond cutoff uses to determine bonds

[ Top ]

getConnectionTable   [line 384]

array getConnectionTable( )

Returns an array of connected atoms and their bond distance e.g. array ( array ($atomobj1, $atomobj2, $distance ), ... )
  • Access: public

[ Top ]

getDistanceMatrix   [line 333]

array getDistanceMatrix( )

Returns the atom-atom distance matrix
  • Access: public

[ Top ]

initMolecule   [line 121]

boolean initMolecule( array $atoms)

Initializes the array of Science_Chemistry_Atom objects

Parameters:

array   $atoms   — 

[ Top ]

isMolecule   [line 178]

boolean isMolecule( object Science_Chemistry_Molecule $obj)

Checks if the object is an instance of Science_Chemistry_Molecule
  • Access: public

Parameters:


[ Top ]

printConnectionTable   [line 363]

boolean printConnectionTable( )

Prints the molecule's connection table
  • Access: public

[ Top ]

printDistanceMatrix   [line 306]

string printDistanceMatrix( )

Prints the atom-atom distance matrix
  • Access: public

[ Top ]

setBondCutoff   [line 257]

boolean setBondCutoff( float $cutoff)

Sets the distance cutoff for bond determination

Parameters:

float   $cutoff   — 

[ Top ]

toCML   [line 213]

string toCML( [optional $title = "molecule"], [optional $id = "mol1"], [ $connect = false])

Returns a CML representation of the molecule Accepts an optional id, and a flag to signal printing of the connection table
  • Access: public

Parameters:

optional   $title   —  string $id
optional   $id   —  boolean $connect
   $connect   — 

[ Top ]

toString   [line 192]

string toString( )

Returns a string representation of the molecule as a XYZ-format file
  • Access: public

Overridden in child classes as:

Science_Chemistry_Molecule_XYZ::toString()
Generates a string representation of the XYZ molecule Overrides parent Science_Chemistry_Molecule::toString() method

[ Top ]


Documentation generated on Thu, 10 Dec 2015 05:30:55 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.