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

Class: Science_Chemistry_Molecule

Source Location: /Science_Chemistry-1.1.2/Science/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 358]

boolean calcConnectionTable( )

Calculates the connection table for the molecule
  • Access: public

[ Top ]

calcDistanceMatrix   [line 297]

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 287]

float getBondCutoff( )

Returns the bond cutoff uses to determine bonds

[ Top ]

getConnectionTable   [line 396]

array getConnectionTable( )

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

[ Top ]

getDistanceMatrix   [line 345]

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 375]

boolean printConnectionTable( )

Prints the molecule's connection table
  • Access: public

[ Top ]

printDistanceMatrix   [line 318]

string printDistanceMatrix( )

Prints the atom-atom distance matrix
  • Access: public

[ Top ]

setBondCutoff   [line 269]

boolean setBondCutoff( float $cutoff)

Sets the distance cutoff for bond determination

Parameters:

float   $cutoff   — 

[ Top ]

toCML   [line 225]

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 193]

string toString( )

Returns a string representation of the molecule as a XYZ-format file Alias of toXYZ()

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 ]

toXYZ   [line 204]

string toXYZ( )

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.