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

Class: Science_Chemistry_Atom

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

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

string toString( )

Returns a string representation of the Science_Chemistry_Atom object Alias of toXYZ()

[ Top ]

toXYZ   [line 160]

string toXYZ( )

Returns a XYZ representation of the Science_Chemistry_Atom object

[ Top ]


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