Package ffx.potential.parameters
Class AtomType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.AtomType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="atom",
clazz=java.lang.String.class,
propertyGroup=PotentialFunctionParameter,
description="[2 integers, name, quoted string, integer, real and integer]\nProvides the values needed to define a single force field atom type.\nThe first two integer modifiers denote the atom type and class numbers.\nIf the type and class are identical, only a single integer value is required.\nThe next modifier is a three-character atom name, followed by an 24-character or less atom description contained in single quotes.\nThe next two modifiers are the atomic number and atomic mass.\nThe final integer modifier is the \"valence\" of the atom, defined as the expected number of attached or bonded atoms.\n")
public final class AtomType
extends BaseType
implements Comparator<String>
The AtomType class represents one molecular mechanics atom type.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionint
Atom class.static final double[]
IUPAC Commission on Isotopic Abundances and Atomic Weights.final int
Atomic Number.final double
Atomic weight.final String
Description of the atom's bonding environment.final String
Short name (ie CH3/CH2 etc).int
Atom type.final int
Valence number for this type. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkAtomicNumberAndMass
(int atomicNumber, double mass) Check if the supplied atomic mass is within 0.1 AMU of the IUPAC value for the given atomic number.static boolean
checkAtomicNumberAndMass
(int atomicNumber, double mass, double tolerance) Check if the supplied atomic mass is within the supplied tolerance (in AMU) of the IUPAC value for the given atomic number.int
boolean
static Element
getXMLAtomTypes
(Document doc, ForceField forceField) Create an AtomType Element.int
hashCode()
static AtomType
Construct an AtomType from an input string.toString()
Write AtomType to OpenMM XML format.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
name
Short name (ie CH3/CH2 etc). -
environment
Description of the atom's bonding environment. -
atomicNumber
public final int atomicNumberAtomic Number. -
atomicWeight
public final double atomicWeightAtomic weight. "An atomic weight (relative atomic weight) of an element from a specified source is the ratio of the average atomicWeight per atom of the element to 1/12 of the atomicWeight of an atom of 12C" -
valence
public final int valenceValence number for this type. -
type
public int typeAtom type. -
atomClass
public int atomClassAtom class. -
atomicMass
public static final double[] atomicMassIUPAC Commission on Isotopic Abundances and Atomic Weights. Retrieved on 1/24/22.
-
-
Constructor Details
-
Method Details
-
parse
Construct an AtomType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- an AtomType instance.
-
compare
- Specified by:
compare
in interfaceComparator<String>
-
equals
- Specified by:
equals
in interfaceComparator<String>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode() -
toString
Basic toString method.
Nicely formatted atom type string.
-
getXMLAtomTypes
Create an AtomType Element.- Parameters:
doc
- the Document instance.forceField
- the ForceField to grab constants from.- Returns:
- the AtomType element.
-
toXML
Write AtomType to OpenMM XML format. -
checkAtomicNumberAndMass
public static boolean checkAtomicNumberAndMass(int atomicNumber, double mass) Check if the supplied atomic mass is within 0.1 AMU of the IUPAC value for the given atomic number.For atomic numbers outside the range 1 to 118, true always is returned.
- Parameters:
atomicNumber
- The atomic number.mass
- The atomic mass.- Returns:
- True if the given mass is within the given tolerance of the IUPAC value for the atomic number.
-
checkAtomicNumberAndMass
public static boolean checkAtomicNumberAndMass(int atomicNumber, double mass, double tolerance) Check if the supplied atomic mass is within the supplied tolerance (in AMU) of the IUPAC value for the given atomic number.For atomic numbers outside the range 1 to 118, true always is returned.
- Parameters:
atomicNumber
- The atomic number.mass
- The atomic mass.tolerance
- The error tolerance in AMU.- Returns:
- True if the given mass is within the given tolerance of the IUPAC value for the atomic number.
-