class Atom

==   =~   Atom.check_element   Atom.element_from_string   Atom.new   covalent_bond_dist?   deep_copy   dup   period   proton_number   self.from_array   self.from_coordinate   to_point_charge   to_s  

Initialize

Atom.new(element, x = 0.0, y=0.0, z=0.0, properties = {}) # => Atom

self.from_array(element, array, properties = {}) # => Atom

Constructor reading the coordinates from an array

self.from_coordinate(element, coordinate, properties = {}) # => Atom

Constructor reading the coordinates from Coordinate-like class

Atom.element_from_string(string) # => Symbol

Method used to parse string valid element Symbol. Raises an exception when it is impossible to assign element from known periodic table.

Atom.check_element(symbol) # => nil

Checks whether string is valid element abbreviation, raises exception otherwise

Basics

deep_copy # => Atom

Real copy of the object and all its instance variables

dup # => Atom

Real copy of the object and all its instance variables

Type conversion

to_s(coord_only = false) # => String

Converts basic atom information (element, coordinates, gradient) to string

to_point_charge

Comparison

== (atom) # => true | false

=~ (atom) # => true | false

Loose comparison, difference between each pair of coordinate elements must be smaller than class variable epsilon and the element must be the same

Element-related

proton_number # => integer

Returns proton number of the element. Dummy atom (symbol X) has proton number 0 here.

period # => integer

covalent_bond_dist?(atom, tolerance = 1.1) # => Boolean

Returns true when the two atoms are within covalent bond distance multiplied by tolerance. The reference distance is sum of covalent radii from module PeriodicTable.