Instance methods
<=>(other : self) : Int32
The comparison operator.
Returns -1, 0 or 1 depending on whether self precedes
rhs, equals to rhs or comes after rhs. The comparison is
done based on atom serial.
atoms = Structure.read("peptide.pdb").atoms
atoms[0] <=> atoms[1] # => -1
atoms[1] <=> atoms[1] # => 0
atoms[2] <=> atoms[1] # => 1
Source===(atom_t : Templates::Atom) : Bool
Case equality. This is equivalent to #matches?.
structure = Structure.read "peptide.pdb"
desc = case structure.dig('A', 5, "CA")
when Templates::Atom("C") then "carbonyl carbon"
when Templates::Atom("CA") then "alpha carbon"
when Templates::Atom("CB") then "beta carbon"
when Templates::Atom("CG") then "gamma carbon"
when Templates::Atom("CD") then "delta carbon"
when PeriodicTable::C then "carbon"
else "non-carbon"
end
desc # => "alpha carbon"
Source===(element : Element) : Bool
Case equality. Returns true if atom's element is element,
otherwise false.
structure = Structure.read "peptide.pdb"
desc = case structure.dig('A', 5, "CK")
when Templates::Atom("C") then "carbonyl carbon"
when Templates::Atom("CA") then "alpha carbon"
when Templates::Atom("CB") then "beta carbon"
when Templates::Atom("CG") then "gamma carbon"
when Templates::Atom("CD") then "delta carbon"
when PeriodicTable::C then "carbon"
else "non-carbon"
end
desc # => "non-carbon"
Sourceactinium?
Returns true if the atom's element is "Actinium", else
false.
Sourcealuminum?
Returns true if the atom's element is "Aluminum", else
false.
Sourceamericium?
Returns true if the atom's element is "Americium", else
false.
Sourceantimony?
Returns true if the atom's element is "Antimony", else
false.
Sourceargon?
Returns true if the atom's element is "Argon", else
false.
Sourcearsenic?
Returns true if the atom's element is "Arsenic", else
false.
Sourceastatine?
Returns true if the atom's element is "Astatine", else
false.
Sourceatomic_number(*args, **options)
Sourceatomic_number(*args, **options, &)
Sourcebarium?
Returns true if the atom's element is "Barium", else
false.
Sourceberkelium?
Returns true if the atom's element is "Berkelium", else
false.
Sourceberyllium?
Returns true if the atom's element is "Beryllium", else
false.
Sourcebismuth?
Returns true if the atom's element is "Bismuth", else
false.
Sourcebohrium?
Returns true if the atom's element is "Bohrium", else
false.
Sourcebonded?(to other : self) : Bool
Sourceboron?
Returns true if the atom's element is "Boron", else
false.
Sourcebromine?
Returns true if the atom's element is "Bromine", else
false.
Sourcecadmium?
Returns true if the atom's element is "Cadmium", else
false.
Sourcecalcium?
Returns true if the atom's element is "Calcium", else
false.
Sourcecalifornium?
Returns true if the atom's element is "Californium", else
false.
Sourcecarbon?
Returns true if the atom's element is "Carbon", else
false.
Sourcecerium?
Returns true if the atom's element is "Cerium", else
false.
Sourcecesium?
Returns true if the atom's element is "Cesium", else
false.
Sourcechain(*args, **options, &)
Sourcechlorine?
Returns true if the atom's element is "Chlorine", else
false.
Sourcechromium?
Returns true if the atom's element is "Chromium", else
false.
Sourcecobalt?
Returns true if the atom's element is "Cobalt", else
false.
Sourceconstraint=(constraint : Constraint | Nil)
Sourcecoords=(coords : Spatial::Vec3)
Sourcecopernicium?
Returns true if the atom's element is "Copernicium", else
false.
Sourcecopper?
Returns true if the atom's element is "Copper", else
false.
Sourcecovalent_radius(*args, **options)
Sourcecovalent_radius(*args, **options, &)
Sourcecurium?
Returns true if the atom's element is "Curium", else
false.
Sourcedarmstadtium?
Returns true if the atom's element is "Darmstadtium", else
false.
Sourcedegree
Returns the number of bonds.
Sourcedna?
Returns true if the atom belongs to a dna
residue, else false.
Sourcedubnium?
Returns true if the atom's element is "Dubnium", else
false.
Sourcedysprosium?
Returns true if the atom's element is "Dysprosium", else
false.
Sourceeinsteinium?
Returns true if the atom's element is "Einsteinium", else
false.
Sourceelement=(element : Element)
Sourceerbium?
Returns true if the atom's element is "Erbium", else
false.
Sourceeuropium?
Returns true if the atom's element is "Europium", else
false.
Sourcefermium?
Returns true if the atom's element is "Fermium", else
false.
Sourceflerovium?
Returns true if the atom's element is "Flerovium", else
false.
Sourcefluorine?
Returns true if the atom's element is "Fluorine", else
false.
Sourcefrancium?
Returns true if the atom's element is "Francium", else
false.
Sourcegadolinium?
Returns true if the atom's element is "Gadolinium", else
false.
Sourcegallium?
Returns true if the atom's element is "Gallium", else
false.
Sourcegermanium?
Returns true if the atom's element is "Germanium", else
false.
Sourcegold?
Returns true if the atom's element is "Gold", else
false.
Sourcehafnium?
Returns true if the atom's element is "Hafnium", else
false.
Sourcehassium?
Returns true if the atom's element is "Hassium", else
false.
Sourceheavy?(*args, **options)
Sourceheavy?(*args, **options, &)
Sourcehelium?
Returns true if the atom's element is "Helium", else
false.
Sourcehet?
Returns true if the atom belongs to a non-standard (HET)
residue, else false.
Sourceholmium?
Returns true if the atom's element is "Holmium", else
false.
Sourcehydrogen?
Returns true if the atom's element is "Hydrogen", else
false.
Sourceindium?
Returns true if the atom's element is "Indium", else
false.
Sourceiodine?
Returns true if the atom's element is "Iodine", else
false.
Sourceion?
Returns true if the atom belongs to a ion
residue, else false.
Sourceiridium?
Returns true if the atom's element is "Iridium", else
false.
Sourceiron?
Returns true if the atom's element is "Iron", else
false.
Sourcekrypton?
Returns true if the atom's element is "Krypton", else
false.
Sourcelanthanum?
Returns true if the atom's element is "Lanthanum", else
false.
Sourcelawrencium?
Returns true if the atom's element is "Lawrencium", else
false.
Sourcelead?
Returns true if the atom's element is "Lead", else
false.
Sourcelithium?
Returns true if the atom's element is "Lithium", else
false.
Sourcelivermorium?
Returns true if the atom's element is "Livermorium", else
false.
Sourcelutetium?
Returns true if the atom's element is "Lutetium", else
false.
Sourcemagnesium?
Returns true if the atom's element is "Magnesium", else
false.
Sourcemanganese?
Returns true if the atom's element is "Manganese", else
false.
Sourcematches?(atom_t : Templates::Atom) : Bool
Returns true if the atom matches the given template, else
false.
Checking for a match considers both atom name and element.
atom = Structure.read("peptide.pdb").dig 'A', 1, "CA"
atom.match?(Templates::Atom.new("CA")) # => true
atom.match?(Templates::Atom.new("CA", element: "N")) # => false
atom.match?(Templates::Atom.new("ND2")) # => false
TODO: compare topology via Templates::Atom#top_spec
Sourcemax_valence(*args, **options)
Sourcemax_valence(*args, **options, &)
Sourcemeitnerium?
Returns true if the atom's element is "Meitnerium", else
false.
Sourcemembrane?
Returns true if the atom belongs to a membrane
residue, else false.
Sourcemendelevium?
Returns true if the atom's element is "Mendelevium", else
false.
Sourcemercury?
Returns true if the atom's element is "Mercury", else
false.
Sourcemolybdenum?
Returns true if the atom's element is "Molybdenum", else
false.
Sourcemoscovium?
Returns true if the atom's element is "Moscovium", else
false.
Sourceneodymium?
Returns true if the atom's element is "Neodymium", else
false.
Sourceneon?
Returns true if the atom's element is "Neon", else
false.
Sourceneptunium?
Returns true if the atom's element is "Neptunium", else
false.
Sourcenickel?
Returns true if the atom's element is "Nickel", else
false.
Sourcenihonium?
Returns true if the atom's element is "Nihonium", else
false.
Sourceniobium?
Returns true if the atom's element is "Niobium", else
false.
Sourcenitrogen?
Returns true if the atom's element is "Nitrogen", else
false.
Sourcenobelium?
Returns true if the atom's element is "Nobelium", else
false.
Sourceoccupancy=(occupancy : Float64)
Sourceoganesson?
Returns true if the atom's element is "Oganesson", else
false.
Sourceosmium?
Returns true if the atom's element is "Osmium", else
false.
Sourceother?
Returns true if the atom belongs to a other
residue, else false.
Sourceoxygen?
Returns true if the atom's element is "Oxygen", else
false.
Sourcepalladium?
Returns true if the atom's element is "Palladium", else
false.
Sourcepartial_charge=(partial_charge : Float64)
Sourcephosphorus?
Returns true if the atom's element is "Phosphorus", else
false.
Sourceplatinum?
Returns true if the atom's element is "Platinum", else
false.
Sourceplutonium?
Returns true if the atom's element is "Plutonium", else
false.
Sourcepolonium?
Returns true if the atom's element is "Polonium", else
false.
Sourcepotassium?
Returns true if the atom's element is "Potassium", else
false.
Sourcepraseodymium?
Returns true if the atom's element is "Praseodymium", else
false.
Sourceproactinium?
Returns true if the atom's element is "Proactinium", else
false.
Sourcepromethium?
Returns true if the atom's element is "Promethium", else
false.
Sourceprotein?
Returns true if the atom belongs to a protein
residue, else false.
Sourceradium?
Returns true if the atom's element is "Radium", else
false.
Sourceradon?
Returns true if the atom's element is "Radon", else
false.
Sourceresidue=(new_res : Residue) : Residue
Sourcerhenium?
Returns true if the atom's element is "Rhenium", else
false.
Sourcerhodium?
Returns true if the atom's element is "Rhodium", else
false.
Sourceroentgenium?
Returns true if the atom's element is "Roentgenium", else
false.
Sourcerubidium?
Returns true if the atom's element is "Rubidium", else
false.
Sourceruthenium?
Returns true if the atom's element is "Ruthenium", else
false.
Sourcerutherfordium?
Returns true if the atom's element is "Rutherfordium", else
false.
Sourcesamarium?
Returns true if the atom's element is "Samarium", else
false.
Sourcescandium?
Returns true if the atom's element is "Scandium", else
false.
Sourceseaborgium?
Returns true if the atom's element is "Seaborgium", else
false.
Sourceselenium?
Returns true if the atom's element is "Selenium", else
false.
Sourcesilicon?
Returns true if the atom's element is "Silicon", else
false.
Sourcesilver?
Returns true if the atom's element is "Silver", else
false.
Sourcesodium?
Returns true if the atom's element is "Sodium", else
false.
Sourcesolvent?
Returns true if the atom belongs to a solvent
residue, else false.
Sourcespec(io : IO) : Nil
Writes the atom specification to the given IO.
Atom specification is a short string representation encoding atom
information including chain, residue, atom name, and atom number.
Sourcespec
Returns the atom specification.
Atom specification is a short string representation encoding atom
information including chain, residue, atom name, and atom number.
Sourcestrontium?
Returns true if the atom's element is "Strontium", else
false.
Sourcesulfur?
Returns true if the atom's element is "Sulfur", else
false.
Sourcetantalum?
Returns true if the atom's element is "Tantalum", else
false.
Sourcetarget_valence
Returns the target valence based on the effective valence. This is
useful for multi-valent elements (e.g., sulfur, phosphorus).
Sourcetechnetium?
Returns true if the atom's element is "Technetium", else
false.
Sourcetellurium?
Returns true if the atom's element is "Tellurium", else
false.
Sourcetemperature_factor=(temperature_factor : Float64)
Sourcetennessine?
Returns true if the atom's element is "Tennessine", else
false.
Sourceterbium?
Returns true if the atom's element is "Terbium", else
false.
Sourcethallium?
Returns true if the atom's element is "Thallium", else
false.
Sourcethorium?
Returns true if the atom's element is "Thorium", else
false.
Sourcethulium?
Returns true if the atom's element is "Thulium", else
false.
Sourcetin?
Returns true if the atom's element is "Tin", else
false.
Sourcetitanium?
Returns true if the atom's element is "Titanium", else
false.
Sourceto_s(io : IO)
Appends a short String representation of this object
which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Sourcetungsten?
Returns true if the atom's element is "Tungsten", else
false.
Sourcetypename
Atom typename. Usually specifies the atomic parameter set assigned
to this atom within a given force field.
Sourcetypename=(typename : String | Nil)
Atom typename. Usually specifies the atomic parameter set assigned
to this atom within a given force field.
Sourceuranium?
Returns true if the atom's element is "Uranium", else
false.
Sourcevalence
Returns the effective valence. This is equivalent to the sum of
the bond orders.
Sourcevalence_electrons(*args, **options)
Sourcevalence_electrons(*args, **options, &)
Sourcevanadium?
Returns true if the atom's element is "Vanadium", else
false.
Sourcevdw_radius=(vdw_radius : Float64)
Sourcewater?
Returns true if the atom belongs to a water residue, else
false.
Sourcewithin_covalent_distance?(rhs : self) : Bool
Sourcexenon?
Returns true if the atom's element is "Xenon", else
false.
Sourceytterbium?
Returns true if the atom's element is "Ytterbium", else
false.
Sourceyttrium?
Returns true if the atom's element is "Yttrium", else
false.
Sourcezinc?
Returns true if the atom's element is "Zinc", else
false.
Sourcezirconium?
Returns true if the atom's element is "Zirconium", else
false.
Source