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

Class: Science_Chemistry_Atom

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

Class Overview


Base class representing an Atom


Author(s):

Version:

  • 1.0

Methods


Child classes:

Science_Chemistry_Atom_PDB
Represents a PDB atom record and contains a reference to the PDB residue to which it belongs

Inherited Variables

Inherited Methods


Class Details

[line 32]
Base class representing an Atom


[ Top ]


Method Detail

Science_Chemistry_Atom (Constructor)   [line 65]

object Science_Chemistry_Atom Science_Chemistry_Atom( string $element, [optional $coords = ""])

Constructor for the class, requires the element symbol and an optional array of coordinates

Parameters:

string   $element   —  chemical symbol
optional   $coords   —  array $coords array of coordinates (x, y, z)

[ Top ]

distance   [line 119]

float distance( object Science_Chemistry_Atom $atom2)

Calculates the cartesian distance from this atom instance to another
  • Return: distance
  • Access: public

Parameters:

object Science_Chemistry_Atom   $atom2   — 

[ Top ]

getCoordinates   [line 107]

object Science_Chemistry_Coordinates getCoordinates( )

Returns the coordinates object for the atom
  • See: $xyz;
  • Access: public

[ Top ]

getElement   [line 95]

string getElement( )

Returns the chemical symbol for the atom
  • See: $element;
  • Access: public

[ Top ]

isAtom   [line 134]

boolean isAtom( object Science_Chemistry_Atom $obj)

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

Parameters:

object Science_Chemistry_Atom   $obj   — 

[ Top ]

setCoordinates   [line 82]

boolean setCoordinates( array $coords)

Sets the coordinates for the atom object
  • Access: public

Parameters:

array   $coords   —  array of coordinates (x, y, z)

[ Top ]

toCML   [line 160]

string toCML( [optional $id = 1])

Returns a CML representation of the Science_Chemistry_Atom object Accepts an optional id
  • Access: public

Parameters:

optional   $id   —  string $id

[ Top ]

toString   [line 147]

string toString( )

Returns a string representation of the Science_Chemistry_Atom object
  • Access: public

[ Top ]


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