chemaxon.struc
Class MolAtom

java.lang.Object
  extended by chemaxon.struc.MolAtom
All Implemented Interfaces:
CNode, StereoConstants, java.io.Serializable
Direct Known Subclasses:
SgroupAtom

public class MolAtom
extends java.lang.Object
implements StereoConstants, java.io.Serializable, CNode

Atom object and the properties of the elements. Atom objects are identified by their reference values. Atom object can contain general properties (property value - property key pairs). The following methods are available to handle general atom properties:

Version:
5.3, 09/26/2009
Author:
Peter Csizmadia, Ferenc Csizmadia, Gabor Bartha, Tamas Vertse, Szabolcs Csepregi, Erika Biro, Szilveszter Juhos
See Also:
Serialized Form

Field Summary
static int AAMAP_MASK
          Atom map mask in flags.
static int AAMAP_MAX
          Maximum atom-atom mapping number.
static int AAMAP_OFF
          Atom map offset in flags.
static int ALIPHATIC
          Aliphatic query atom.
static int ALL_H
          Include any Hydrogen atom.
static int ANY
          "Atomic number" of the any atom A.
static int AROMATIC
          Aromatic query atom.
static int AROMATIC_OR_ALIPHATIC
          Aromatic or aliphatic query atom.
static int ATOM_TYPE_COUNT
          Number of atom types in the elements array
static int ATOM_TYPE_MAX
          Maximum atom number.
static int ATTACH_BOTH
          S-group attachment point on first and second site.
static int ATTACH_NONE
          There is no S-group attachment point setting on this atom.
static int ATTACH1
          S-group attachment point on first site.
static int ATTACH2
          S-group attachment point on second site.
protected  int bondCount
          Number of bonds.
static int BRIDGEHEAD_H
          Hydrogen atom which is connected to a bridgehead atom.
static int CHARGED_H
          Include charged Hydrogen atom(s).
static int CTSPECIFIC_H
          Deprecated. graph invariants are checked by default when calculating CIS/TRANS stereo, so this option is out of use
static int ELEMENT_COUNT
          Number of elements in the periodic system
static int EMPTY
          Empty atom type.
static int FIX_CHARGE
          Valence checking will replace radicals with charges if this flag is set.
static int HCONNECTED_H
          Hydrogen atom(s) connected to another hydrogen only.
static int HETERO
          "Atomic number" of the hetero any atom Q.
static int HS_S
          S hybridization state.
static int HS_SP
          SP hybridization state.
static int HS_SP2
          SP2 hybridization state.
static int HS_SP3
          SP3 hybridization state.
static int HS_UNKNOWN
          Unknown hybridization state.
static int ISOTOPE_H
          Include Hydrogen isotope(s).
static int LDIR_ABOVE
          Implicit Hydrogen(s) are above the element symbol.
static int LDIR_BELOW
          Implicit Hydrogen(s) are below the element symbol.
static int LDIR_LEFT
          Implicit Hydrogen(s) are left to element symbol.
static int LDIR_RIGHT
          Implicit Hydrogen(s) are right to element symbol.
static int LIST
          "Atomic number" of the inclusive atom list.
static int LONELY_H
          Include lonely Hydrogen atom(s).
static int LP
          "Atomic number" of the lone pair.
static int MAPPED_H
          Mapped Hydrogen atom(s).
static int MULTICENTER
          "Atomic number" of a central atom of a MulticenterSgroup.
static int NOTLIST
          "Atomic number" of the exclusive atom list.
static int POLYMERENDGROUP_H
          Hydrogen atom which have a neighbor that is in an Sgroup (not DataSgroup or SuperatomSgroup) and the H is not in the same sgroup should be kept.
static int PSEUDO
          "Atomic number" of a pseudoatom.
static int RAD_COUNT_MASK
          Radical's free electron count bits in flags for valid radical values.
static int RAD_MASK
          Radical value bits in flags.
static int RAD_OFF
          Radical value offset in flags.
static int RAD1
          Monovalent radical center.
static int RAD2
          Divalent radical center.
static int RAD2_SINGLET
          Divalent radical center with singlet electronic configuration.
static int RAD2_TRIPLET
          Divalent radical center with triplet electronic configuration.
static int RAD3
          Trivalent radical center.
static int RAD3_DOUBLET
          Trivalent radical center with doublet electronic configuration.
static int RAD3_QUARTET
          Trivalent radical center with quartet electronic configuration.
static int RAD4
          Invalid value for radical center for students.
static char RADICAL_CHAR
           
static int RADICAL_H
          Include radical Hydrogen atom(s).
static int RESSEQ_MAX
          Maximum residue sequence number is currently 8191.
static int RESTYPE_MAX
          Maximum residue type is currently 63.
static int RGROUP
          "Atomic number" of the Rgroup query "atom".
static int RGROUP_ATTACHMENT
          "Atomic number" of an ordered R-group attachment point.
static int RGROUP_MAX
          Maximum R-group index (32767).
static int RXNSTEREO_INVERSION
          The stereo configuration of the atom is inverted during the reaction.
static int RXNSTEREO_NONE
          The stereo configuration of the atom is not considered during the reaction.
static int RXNSTEREO_RETENTION
          The stereo configuration of the atom is retained during the reaction.
static int SETSEQ_MAX
          Maximum atom set sequence number is currently 63.
static int SGROUP
          "Atomic number" of an Sgroup.
static int SGROUP_H
          Hydrogen atom which is the only atom in an Sgroup.
static int SGROUPEND_H
          Hydrogen atom which have a neighbor that is in a SuperatomSgroup.
static int SMARTS_H_DAYLIGHT_COMP_MODE
          Option flag to express daylight-type smarts atom parsing of H.
static int SMARTS_H_MARVIN_COMP_MODE
          Option flag to express marvin-pre-3.5-type smarts atom parsing of H.
static int STAR
          "Atomic number" of the star atom.
static int SYM_CX
          Atom symbol string for CxSMILES export.
static int SYM_EXPLH
          Atom symbol string contains explicit H count if this flag is set.
static int SYM_IMPLH
          Atom symbol string contains implicit H count is shown flag is set.
static int SYM_MOLEX
          Atom symbol string for Molfile export.
static int SYM_NEUTRAL
          Atom symbol string does not contain the charge if this flag is set.
static int SYM_SMARTS
          Atom symbol string for SMILES export.
static int SYM_SQBRACKETS
          Atom symbol is shown in square brackets if this flag is set.
protected  MolBond[] theBonds
          The bonds.
static int UNSPECIFIED_AROMATICITY
          Atom aromaticity is not specified explicitly.
static int VALENCE_CHECKED
          Valence checked if this flag is set.
static int VALENCE_ERROR
          The atom has valence error if this flag is set.
static int VALENCEERROR_H
          Hydrogen atom(s) connected to an atom which have valence error.
static int WEDGED_H
          Hydrogen atom(s) with wedge bonds.
protected  double xCoordinate
          X coordinate.
protected  double yCoordinate
          Y coordinate.
protected  double zCoordinate
          Z coordinate.
 
Fields inherited from interface chemaxon.struc.StereoConstants
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
 
Constructor Summary
MolAtom(double x, double y)
          Construct a carbon atom at the specified location.
MolAtom(int z)
          Construct an atom of the specified type at the origin.
MolAtom(int zZ, double x, double y, double z)
          Construct an atom.
 
Method Summary
protected  boolean add(MolBond b)
          Add a bond if it had not been already added.
 MolAtom addRgroupAttachmentPoint(int order, int bondtype)
          Attaches a new R-group attachment point to this atom by a bond of a specified type.
 void bondweights(double[] w, CTransform3D t)
          Calculates the average of the bond unit vectors pointing out of this atom.
static boolean checkAtno(int z)
          Check if the given atomic number is positive and less then atomic type maximum value.
 void clear()
          Clear query properties, charge, and hcount.
 void clearExtraLabel()
          Clears the extra label.
 void clearProperties()
          Removes all properties from this atom.
 void clearQProps()
          Clears query props.
 java.lang.Object clone()
          Clones the atom.
 boolean containsPropertyKey(java.lang.String key)
          Returns true if this atom has a mapping for the specified property key.
protected  int countAllAtoms()
          Counts all atoms represented by this atom.
static double covalentRadiusOf(int z, int t)
          Gets the covalent radius in C-C bond length units.
 int decQProp(java.lang.String name)
          Decrements the value of a query property.
 int decValenceProp()
          Decrements the value of the valence property.
static int electronegOf(int z)
          Gets 10 times the electronegativity value for the specified element.
 java.lang.String getAliasstr()
          Gets the alias string or pseudo atom type string for pseudo atoms.
 int getAtno()
          Gets the atomic number.
static int getAtomicNumber(java.lang.String element)
          Deprecated. As of Marvin 5.9, replaced by a similar method PeriodicSystem.findAtomicNumber(String).
 int getAtomMap()
          Gets the atom-atom mapping number.
 java.lang.String getAtomSymbol(int opts, int aflags, int[] lcenter, CTransform3D preTransform)
          Gets the string representation of the atom symbol.
 int getAttach()
          Gets the S-group attachment point information.
 Sgroup getAttachParentSgroup()
          Gets the parent S-group of an S-group attachment point atom.
 chemaxon.struc.BicycloStereoDescriptor[] getBicycloStereo()
          Gets the bicyclo stereo information of this atom.
 MolBond getBond(int i)
          Gets the i-th bond.
 int getBondCount()
          Gets the number of bonds/ligands.
 MolBond getBondTo(MolAtom other)
          Finds the bond that connects this atom to another atom.
 int getCharge()
          Gets the charge.
static int getColumn(int z)
          The column or group of an element in the periodic system.
 MolBond getEdge(int i)
          Deprecated. As of Marvin 5.3, replaced by getBond(int).
 int getEdgeCount()
          Deprecated. As of Marvin 5.3, replaced by getBondCount().
 MolBond getEdgeTo(MolAtom other)
          Deprecated. As of Marvin 5.3, replaced by getBondTo(MolAtom).
 int getElectronProp()
          Returns the number of lone pairs on this atom.
 int getExplicitHcount()
          Gets number of hydrogen connections.
 java.lang.String getExtraLabel()
          Gets the label string (also called atom value): "result" or "result1|result2".
 long getExtraLabelColor()
          Gets the extra label color(s): lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).
 int getExtraLabelColor(int i)
          Gets the extra label color: (alpha<<24 + red<<16 + green<<8 + blue).
static int getExtraLabelColor(long rgbs, int i)
          Gets extra label color from composed color value.
 int getExtraLabelSetSeq()
           
 int getFlags()
          Gets flags.
 int getHybridizationState()
          Gets the hybridization state.
 int getImplicitHcount()
          Gets the number of implicit hydrogens attached.
 MolAtom getLigand(int i)
          Gets the i-th ligand of this atom.
 int getLigandIndex(MolAtom atom)
          Returns the index of the specified ligand in this atom.
 int getLigandOrder(MolAtom ligand)
          Gets the order of a specified ligand.
 MolAtom[] getLigands()
          Returns the atoms connected to this atom by a bond.
 int getLinkNodeOuterAtom(int idx)
          Gets the index of one of the link node's outer neighbor atoms.
 int[] getList()
          Gets the atom list.
 DPoint3 getLocation()
          Gets the coordinates.
 void getLocation(DPoint3 p)
          Gets the coordinates.
protected  java.lang.Object getLock()
          Get lock object for synchronization.
 int getLonePairCount()
          Returns the automatically calculated lone pair count of this atom.
 double getMass()
          Gets the atomic weight.
 int getMassno()
          Gets the mass number.
 int getMaxRepetitions()
          Gets the maximum number of repetitions for a link atom.
 int getMinRepetitions()
          Gets the minimum number of repetitions for a link node.
 int getNonQueryImplicitHcount()
          Gets the number of implicit hydrogens attached.
 MoleculeGraph getParent()
          Return the molecule graph that contains this atom.
 int getPreferredLabelDir(CTransform3D pretr, int h)
          Gets the preferred direction for an additional label.
 java.lang.Object getProperty(java.lang.String key)
          Returns the property value to which the specified property key is mapped at this atom, or null if this atom has no mapping for this property key.
 java.lang.Object getQProp(java.lang.String name)
          Gets a query property.
 int getQPropAsInt(java.lang.String name)
          Gets a query property as an integer.
 int[] getQPropMinMax(java.lang.String name)
          Gets the minimum and maximum possible values of a query property.
 java.lang.String[] getQPropNames()
          Gets the names of query properties with non-null values.
 java.util.Set<java.lang.String> getQPropNameSet()
          Gets the names of query properties with non-null values, or null if no query properties are set.
 int getQueryAromaticity()
          Gets the aromatic/aliphatic query property.
 java.lang.String getQueryLabel()
          Gets the string representation of the query atom
 java.lang.String getQuerystr()
          Deprecated. As of release 5.7, replaced by getQueryString()
 java.lang.String getQueryString()
          Returns s the query string assigned to this atom.
 int getRadical()
          Gets the radical value.
 int getRadicalCount()
          Gets the number of free electrons.
 int getReactionStereo()
          Gets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.
 int getRealBondCount()
          Gets the number of bonds connected to "real" atoms.
 int getRelativeNegativity()
          Check negativity compared to the neighbors.
 int getResidueAtomId()
          Gets the residue atom identifier.
 int getResidueSeq()
          Gets the residue sequence number.
 int getResidueType()
          Gets the residue type.
 int getRgroup()
          Gets the R-group ID.
 int getRgroupAttachmentPointOrder()
          Gets the attachment point order of an R-group attachment point.
static int getRow(int z)
          The row or or period of an element in the periodic system.
 int getSetSeq()
          Gets the atom set sequence number.
 boolean getStereoCare()
          Reports double bond stereo care information on the connected bonds.
 int getStereoGroupNumber()
          Gets the stereochemical group number for AND and OR groups of the enhanced stereo representation.
 int getStereoGroupType()
          Gets the stereochemical group type for the enhanced stereo representation.
 java.lang.String getSymbol()
          Gets the element symbol.
 java.lang.Object getTemporaryObject(java.lang.String key)
          Gets a temporary object.
 int getValence()
          Gets the valence.
 int getValenceProp()
          Gets the valence property.
 int[] getValencePropMinMax()
          Gets the minimum and maximum possible values of the valence property.
 double getX()
          Gets the X coordinate.
 double getY()
          Gets the Y coordinate.
 double getZ()
          Gets the Z coordinate.
 boolean hasAromaticBond()
          Tests whether the atom has aromatic bonds.
 boolean hasQProps()
          Does it have query properties?
 boolean hasQueryBonds()
          Tests whether the atom has query bonds ("ANY" bonds).
 boolean hasSMARTSProps()
          Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.hasSMARTSProps(MolAtom atom)
 boolean hasSMARTSPropsExcluding(java.lang.String exclude)
          Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.hasSMARTSPropsExcluding(MolAtom atom, String exclude)
 boolean hasValenceError()
          Returns previously set valence error.
 boolean hasWedgedBond()
          Tests whether the atom has a wedged bond.
 boolean haveEqualProperties(MolAtom a)
          Tests if two atoms have the same properties.
 boolean haveSimilarBonds(MolAtom a)
          Checks if two atoms have similar bonds.
 boolean haveSimilarEdges(MolAtom a)
          Deprecated. As of Marvin 5.3, replaced by haveSimilarBonds(MolAtom).
 int incQProp(java.lang.String name)
          Increments the value of a query property.
 int incQueryAromaticity()
          Increments the value of the query aromaticity property.
 int incValenceProp()
          Increments the value of the valence property.
 int indexOf(MolBond bond)
          Returns the index of the specified bond in this atom.
 boolean insideLabel(double x, double y)
          Tests whether the specified point is inside the atom label.
static int ionChargeOf(int z)
          Gets the ion charge.
 boolean isAmbiguousStereo()
          Check if the atom has ambiguous stereo wedge configuration.
static boolean isAromaticSMILESSubset(int atno)
          Is the atom can be aromatic according to the daylight specification: Only atoms on the following list can be considered aromatic: C, N, O, P, S, As, Se, and * (wildcard).
 boolean isArrowEnd()
          Deprecated. As of Marvin 5.3
 boolean isBoundTo(MolAtom other)
          Checks if this MolAtom is connected to another one or not.
 boolean isGeneric()
          Tests whether the atom is a generic atom.
 boolean isImplicitizableH(int f)
          Tests whether the hydrogen atom is implicitizable or not.
 boolean isLinkNode()
          The atom is a link node if the maximum number of repetitions is nonzero.
 boolean isMappable()
          Checks if this atom it a mappable.
 boolean isNobleGas()
          Deprecated. As of Marvin 5.4, replaced by PeriodicSystem.isNobleGas(int z).
static int isotopeType(int z, int a)
          Gets the type of an isotope.
 boolean isPseudo()
          Tests whether if the atom is a pseudo atom.
 boolean isQProp()
          Tests whether this object represents a query property.
 boolean isQuery()
          Tests whether it is a query atom.
static boolean isSameParityClass(int i1, int i2, int i3, int i4, int j1, int j2, int j3, int j4)
          Calculates if chirality centers in the structure and the query belong to the same parity class.
 boolean isSelected()
          Tests whether this atom is selected.
 boolean isSpecIsotopeSymbolPreferred()
          Tests whether special symbol is used.
 boolean isSpecIsotopeSymbolUsed()
          Tests whether special symbol is used.
 boolean isTerminalAtom()
          Determines whether it is a terminal atom or not.
static int maxAbsOxStateOf(int z)
          Gets the oxidation state that has the maximum absolute value
 void moveCorners(double diffx, double diffy)
          Translates the coordinates of the atom label.
static java.lang.String nameOf(int z)
          Gets the name of the specified element.
static double naturalWeightOf(int z)
          Gets the natural weight of the element.
static int negOxOf(int z)
          Gets the negative oxidation number.
static int numOf(java.lang.String e)
          Deprecated. As of Marvin 5.6, replaced by getAtomicNumber(String).
static int numoxstatesOf(int z)
          Gets the number of oxidation states for the specified element.
static int oxstateOf(int z, int k)
          Gets the oxidation states.
 void pack()
          Reduce memory usage.
static int paritySign(int a, int b, int c, int d)
          Calculates the sign of the parity for the specified indexes.
static int posOxOf(int z)
          Gets the smallest positive oxidation number.
 int propertyCount()
          Returns the number of property (property key - property value) mappings of this atom.
 java.util.Set<java.lang.String> propertyKeySet()
          Returns a set view of the property keys of this atom.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> propertySet()
          Returns a collection view of the properties (property key - property value mappings) of this atom.
 void putProperty(java.lang.String key, java.lang.Object value)
          Associates the specified value with the specified key at this atom.
 void qpropCheck()
          Query property checking.
protected  void removeAllBonds()
          Removes all bonds.
protected  void removeBond(int i)
          Removes a bond.
protected  void removeBond(MolBond bond)
          Removes a bond by reference.
 java.lang.Object removeProperty(java.lang.String key)
          Removes the mapping for this property key from this atom if present.
static java.lang.String residueSymbolOf(int id)
          Gets the name of a residue.
static int residueTypeOf(java.lang.String name)
          Gets the residue identifier for a residue name.
 void set(MolAtom atom)
          Set all atom properties except the coordinates.
 void setAliasstr(java.lang.String s)
          Sets the alias string or pseudo atom type string for pseudo atoms.
 void setAtno(int z)
          Sets the atomic number.
protected static void setAtom1(MolBond bond, MolAtom newatom)
          Sets the first atom of a bond.
protected static void setAtom2(MolBond bond, MolAtom newatom)
          Sets the second atom of a bond.
 void setAtomMap(int map)
          Sets the atom-atom mapping number.
 void setAttach(int a)
          Sets the S-group aattachment point information.
 void setAttach(int a, Sgroup sg)
          Sets the S-group attachment point information for an S-group attachment atom.
 void setBicycloStereo(chemaxon.struc.BicycloStereoDescriptor[] descriptors)
          Registers the bicyclo stereo information for this atom.
 void setCharge(int q)
          Sets the charge.
 void setCorners(double xnw, double ynw, double xse, double yse)
          Used internally by MolPainter.
 void setElectronProp(int eProp)
          Sets the number of lone pairs.
 void setExtraLabel(java.lang.String s)
          Sets the extra atom label (also called atom value): "label" or "label1|label2".
 void setExtraLabelColor(int rgb1, int rgb2)
          Sets the extra label colors: lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).
 void setExtraLabelColor(long rgbs)
          Sets the extra label color(s): lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).
 void setExtraLabelSetSeq(int id)
           
 void setFlags(int f)
          Sets the flags.
 void setFlags(int f, int mask)
          Sets the flags.
 void setForSpecIsotopeSymbol(java.lang.String sym)
          Sets the special atom symbol and the atomic weight for deuterium or tricium.
 void setHybridizationState(int h)
          Sets the hybridization state.
 void setImplicitHBasedOnValence(chemaxon.core.calculations.valencecheck.Valence v)
           
 void setImplicitHcount(int h)
          Sets the number of implicit hydrogens.
 boolean setLigandOrder(int order, MolAtom ligand)
          Sets the order of a specified ligand.
 void setLinkNodeDefaultOuters()
          Sets link node outer atoms to default values, if they are not set yet.
 void setLinkNodeOuterAtom(int idx, int outer)
          Sets one of the link node's outer neighbor atoms.
 void setList(int[] l)
          Sets the list elements.
 void setList(int[] l, int n)
          Sets the list elements.
 void setLocation(DPoint3 p)
          Sets the coordinates.
 void setMassno(int a)
          Sets the mass number.
 void setMassnoIfKnown(java.lang.String sym)
          Deprecated. as of Marvin 4.1, replaced by setForSpecIsotopeSymbol(String)
 void setMaxRepetitions(int r)
          Sets the maximum number of repetitions for a link atom.
 void setMinRepetitions(int r)
          Sets the minimum number of repetitions for a link node.
 void setNonQueryImplicitHcount(int h)
          Sets the number of non-query implicit hydrogens attached.
 void setQProp(java.lang.String name, int v)
          Sets a query property as an integer.
 void setQProp(java.lang.String name, java.lang.Object v)
          Sets a query property.
 void setQueryAromaticity(int x)
          Sets the aromatic/aliphatic query property.
 void setQuerystr(java.lang.String s)
          Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setQuerystr(MolAtom atom, String s) and setQueryString(String)
 void setQuerystr(java.lang.String s, int options)
          Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setQuerystr(MolAtom atom, String s, int options) and setQueryString(String)
 void setQueryString(java.lang.String queryString)
          Assigns the query string to this atom.
 void setRadical(int r)
          Sets the radical value.
 void setReactionStereo(int r)
          Sets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.
 void setResidueAtomId(int id)
          Sets the residue atom identifier.
 void setResidueSeq(int n)
          Sets the residue sequence number.
 void setResidueType(int t)
          Sets the residue type.
 void setRgroup(int r)
          Sets the R-group ID.
 void setRgroupAttachmentPointOrder(int order)
          Sets the attachment point order of an R-group attachment point.
 void setSelected(boolean sel)
          Selects or unselects this atom.
 void setSetSeq(int id)
          Sets the atom set sequence number.
 void setSMARTS(java.lang.String s)
          Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setSMARTS(MolAtom atom, String s)
 void setSpecIsotopeSymbolPreferred(boolean v)
          Sets special isotope symbol usage preference.
 void setStereoGroupNumber(int n)
          Sets the stereochemical group number for AND and OR groups of the enhanced stereo representation.
 void setStereoGroupType(int t)
          Sets the stereochemical group type for enhanced stereo representation.
 void setValenceError(boolean v)
          Sets or clears the valence error flag.
 void setValenceProp(int v)
          Sets the valence property.
 void setX(double x)
          Sets the X coordinate.
 void setXY(double x, double y)
          Sets the x and y coordinates.
 void setXYZ(double x, double y, double z)
          Sets the coordinates.
 void setY(double y)
          Sets the Y coordinate.
 void setZ(double z)
          Sets the Z coordinate.
 int sringsize()
          Calculate the size of smallest ring containing this atom.
 void storeTemporaryObject(java.lang.String key, java.lang.Object val)
          Stores an object temporarily.
static java.lang.String symbolOf(int z)
          Gets the element symbol for the specified atomic number.
static java.lang.String symbolOf(int z, int a)
          Gets the special element symbol for the specified atomic and mass numbers.
 java.lang.String toString()
          Overrides Object.toString() to ease debugging.
 void transform(CTransform3D t, boolean incg)
          Apply a transformation matrix to the coordinates.
 int twicesumbonds(boolean countH, boolean all2)
          Calculates the total number of bonding electrons, excluding implicit hydrogens.
 void valenceCheck()
          Valence checking.
 void valenceCheck(int opts)
          Deprecated. As of Marvin 5.4, replaced by valenceCheck().
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LONELY_H

public static final int LONELY_H
Include lonely Hydrogen atom(s). It is not possible to convert these Hydrogen atom to implicit one, so in this case the Hydrogen atom simply is removed.

Since:
Marvin 3.1
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

ISOTOPE_H

public static final int ISOTOPE_H
Include Hydrogen isotope(s).

Since:
Marvin 3.1
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

CHARGED_H

public static final int CHARGED_H
Include charged Hydrogen atom(s).

Since:
Marvin 3.1
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

RADICAL_H

public static final int RADICAL_H
Include radical Hydrogen atom(s).

Since:
Marvin 3.1
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

MAPPED_H

public static final int MAPPED_H
Mapped Hydrogen atom(s).

Since:
Marvin 3.1
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

WEDGED_H

public static final int WEDGED_H
Hydrogen atom(s) with wedge bonds.

Since:
Marvin 4.0
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

HCONNECTED_H

public static final int HCONNECTED_H
Hydrogen atom(s) connected to another hydrogen only.

Since:
Marvin 4.0
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

CTSPECIFIC_H

public static final int CTSPECIFIC_H
Deprecated. graph invariants are checked by default when calculating CIS/TRANS stereo, so this option is out of use
Hydrogen atom connecting alone to one side of a double bond with specified CIS or TRANS stereo information. The removal of this atom would abolish the stereo information at the neighboring double bond.

Since:
Marvin 5.0
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

POLYMERENDGROUP_H

public static final int POLYMERENDGROUP_H
Hydrogen atom which have a neighbor that is in an Sgroup (not DataSgroup or SuperatomSgroup) and the H is not in the same sgroup should be kept. The removal of this atom would spoil the sgroup meaning in case of polymers.

Since:
Marvin 5.2.3 09/06/2009
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

SGROUPEND_H

public static final int SGROUPEND_H
Hydrogen atom which have a neighbor that is in a SuperatomSgroup. and the H is not in the same sgroup should be kept. The removal of this atom would result in sgroup attachment point.

Since:
Marvin 5.8.1 01/25/2012
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

VALENCEERROR_H

public static final int VALENCEERROR_H
Hydrogen atom(s) connected to an atom which have valence error. The removal of this atom would result in loss of implicit Hydrogen atom count after valenceCheck call. (ValenceCheck modifies the implicit Hydrogen atom count to chemically valid value.)

Since:
Marvin 5.9.1 03/12/2012
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

SGROUP_H

public static final int SGROUP_H
Hydrogen atom which is the only atom in an Sgroup.

Since:
Marvin 5.10 05/11/2012
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

BRIDGEHEAD_H

public static final int BRIDGEHEAD_H
Hydrogen atom which is connected to a bridgehead atom.

Since:
Marvin 5.11 08/01/2012
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

ALL_H

public static final int ALL_H
Include any Hydrogen atom.

Since:
Marvin 4.1.3, 11/09/2006
See Also:
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int), Constant Field Values

ELEMENT_COUNT

public static final int ELEMENT_COUNT
Number of elements in the periodic system

See Also:
Constant Field Values

EMPTY

public static final int EMPTY
Empty atom type. Useful for bond drawing.

See Also:
Constant Field Values

LIST

public static final int LIST
"Atomic number" of the inclusive atom list.

See Also:
Constant Field Values

NOTLIST

public static final int NOTLIST
"Atomic number" of the exclusive atom list.

See Also:
Constant Field Values

LP

public static final int LP
"Atomic number" of the lone pair.

See Also:
Constant Field Values

ANY

public static final int ANY
"Atomic number" of the any atom A. Represents any atom except hydrogen.

See Also:
Constant Field Values

HETERO

public static final int HETERO
"Atomic number" of the hetero any atom Q.

See Also:
Constant Field Values

STAR

public static final int STAR
"Atomic number" of the star atom. Star atoms represent unknown or unspecified end groups. For more information on star atoms, see

See Also:
, , Constant Field Values

RGROUP

public static final int RGROUP
"Atomic number" of the Rgroup query "atom".

See Also:
Constant Field Values

SGROUP

public static final int SGROUP
"Atomic number" of an Sgroup.

See Also:
Constant Field Values

PSEUDO

public static final int PSEUDO
"Atomic number" of a pseudoatom. The atom type string of a pseudo atom can be obtained by the getAliasstr() method.

Since:
Marvin 3.5, 07/22/2004
See Also:
getAliasstr(), setAliasstr(String), isPseudo(), Constant Field Values

MULTICENTER

public static final int MULTICENTER
"Atomic number" of a central atom of a MulticenterSgroup.

Since:
Marvin 5.0, 01/05/2007
See Also:
Constant Field Values

RGROUP_ATTACHMENT

public static final int RGROUP_ATTACHMENT
"Atomic number" of an ordered R-group attachment point.

Since:
Marvin 5.4, 20/07/2010
See Also:
setRgroupAttachmentPointOrder(int order), getRgroupAttachmentPointOrder(), Constant Field Values

ATOM_TYPE_MAX

public static final int ATOM_TYPE_MAX
Maximum atom number.

See Also:
Constant Field Values

ATOM_TYPE_COUNT

public static final int ATOM_TYPE_COUNT
Number of atom types in the elements array

See Also:
Constant Field Values

HS_UNKNOWN

public static final int HS_UNKNOWN
Unknown hybridization state.

See Also:
getHybridizationState(), Constant Field Values

HS_S

public static final int HS_S
S hybridization state. Line configuration.

See Also:
getHybridizationState(), Constant Field Values

HS_SP

public static final int HS_SP
SP hybridization state.

See Also:
getHybridizationState(), Constant Field Values

HS_SP2

public static final int HS_SP2
SP2 hybridization state. Planar configuration.

See Also:
getHybridizationState(), Constant Field Values

HS_SP3

public static final int HS_SP3
SP3 hybridization state. Tetrahedral configuration.

See Also:
getHybridizationState(), Constant Field Values

RGROUP_MAX

public static final int RGROUP_MAX
Maximum R-group index (32767).

See Also:
setRgroup(int), Constant Field Values

RAD_OFF

public static final int RAD_OFF
Radical value offset in flags.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD_MASK

public static final int RAD_MASK
Radical value bits in flags.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD_COUNT_MASK

public static final int RAD_COUNT_MASK
Radical's free electron count bits in flags for valid radical values.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD1

public static final int RAD1
Monovalent radical center.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD2

public static final int RAD2
Divalent radical center.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD2_SINGLET

public static final int RAD2_SINGLET
Divalent radical center with singlet electronic configuration.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD2_TRIPLET

public static final int RAD2_TRIPLET
Divalent radical center with triplet electronic configuration.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD3

public static final int RAD3
Trivalent radical center.

Since:
Marvin 3.0
See Also:
Constant Field Values

RAD3_DOUBLET

public static final int RAD3_DOUBLET
Trivalent radical center with doublet electronic configuration.

Since:
Marvin 4.0.2, 08/22/2005
See Also:
Constant Field Values

RAD3_QUARTET

public static final int RAD3_QUARTET
Trivalent radical center with quartet electronic configuration.

Since:
Marvin 4.0.2, 08/22/2005
See Also:
Constant Field Values

RAD4

public static final int RAD4
Invalid value for radical center for students.

Since:
Marvin 5.8
See Also:
Constant Field Values

AAMAP_MAX

public static final int AAMAP_MAX
Maximum atom-atom mapping number.

See Also:
setAtomMap(int), Constant Field Values

AAMAP_OFF

public static final int AAMAP_OFF
Atom map offset in flags.

See Also:
Constant Field Values

AAMAP_MASK

public static final int AAMAP_MASK
Atom map mask in flags.

See Also:
getAtomMap(), getFlags(), Constant Field Values

SETSEQ_MAX

public static final int SETSEQ_MAX
Maximum atom set sequence number is currently 63.

Since:
Marvin 3.0
See Also:
setSetSeq(int), Constant Field Values

RESTYPE_MAX

public static final int RESTYPE_MAX
Maximum residue type is currently 63.

Since:
Marvin 3.0
See Also:
setResidueType(int), Constant Field Values

RESSEQ_MAX

public static final int RESSEQ_MAX
Maximum residue sequence number is currently 8191.

Since:
Marvin 3.0
See Also:
setResidueSeq(int), Constant Field Values

RXNSTEREO_NONE

public static final int RXNSTEREO_NONE
The stereo configuration of the atom is not considered during the reaction.

Since:
Marvin 3.0
See Also:
Constant Field Values

RXNSTEREO_INVERSION

public static final int RXNSTEREO_INVERSION
The stereo configuration of the atom is inverted during the reaction.

Since:
Marvin 3.0
See Also:
Constant Field Values

RXNSTEREO_RETENTION

public static final int RXNSTEREO_RETENTION
The stereo configuration of the atom is retained during the reaction.

Since:
Marvin 3.0
See Also:
Constant Field Values

UNSPECIFIED_AROMATICITY

public static final int UNSPECIFIED_AROMATICITY
Atom aromaticity is not specified explicitly.

Since:
Marvin 3.3
See Also:
getQueryAromaticity(), Constant Field Values

AROMATIC

public static final int AROMATIC
Aromatic query atom.

Since:
Marvin 3.3
See Also:
getQueryAromaticity(), Constant Field Values

ALIPHATIC

public static final int ALIPHATIC
Aliphatic query atom.

Since:
Marvin 3.3
See Also:
getQueryAromaticity(), Constant Field Values

AROMATIC_OR_ALIPHATIC

public static final int AROMATIC_OR_ALIPHATIC
Aromatic or aliphatic query atom.

Since:
Marvin 3.3
See Also:
getQueryAromaticity(), Constant Field Values

ATTACH_NONE

public static final int ATTACH_NONE
There is no S-group attachment point setting on this atom.

Since:
Marvin 5.11
See Also:
getAttach(), Constant Field Values

ATTACH1

public static final int ATTACH1
S-group attachment point on first site.

Since:
Marvin 3.1
See Also:
getAttach(), Constant Field Values

ATTACH2

public static final int ATTACH2
S-group attachment point on second site.

Since:
Marvin 3.1
See Also:
getAttach(), Constant Field Values

ATTACH_BOTH

public static final int ATTACH_BOTH
S-group attachment point on first and second site.

Since:
Marvin 3.1
See Also:
getAttach(), Constant Field Values

SMARTS_H_DAYLIGHT_COMP_MODE

public static final int SMARTS_H_DAYLIGHT_COMP_MODE
Option flag to express daylight-type smarts atom parsing of H. ("H" is only considered H atom in this special case: [<isotope>H<charge><map>].

Since:
Marvin 3.5
See Also:
setQuerystr(String, int), Constant Field Values

SMARTS_H_MARVIN_COMP_MODE

public static final int SMARTS_H_MARVIN_COMP_MODE
Option flag to express marvin-pre-3.5-type smarts atom parsing of H. ("H" is considered H atom when no atom type expression is preceding it in the atom expression.)

Since:
Marvin 3.5
See Also:
setQuerystr(String, int), Constant Field Values

LDIR_RIGHT

public static final int LDIR_RIGHT
Implicit Hydrogen(s) are right to element symbol.

Since:
Marvin 4.0, 02/16/2005
See Also:
Constant Field Values

LDIR_LEFT

public static final int LDIR_LEFT
Implicit Hydrogen(s) are left to element symbol.

Since:
Marvin 4.0, 02/16/2005
See Also:
Constant Field Values

LDIR_ABOVE

public static final int LDIR_ABOVE
Implicit Hydrogen(s) are above the element symbol.

Since:
Marvin 4.0, 02/16/2005
See Also:
Constant Field Values

LDIR_BELOW

public static final int LDIR_BELOW
Implicit Hydrogen(s) are below the element symbol.

Since:
Marvin 4.0, 02/16/2005
See Also:
Constant Field Values

SYM_SQBRACKETS

public static final int SYM_SQBRACKETS
Atom symbol is shown in square brackets if this flag is set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_IMPLH

public static final int SYM_IMPLH
Atom symbol string contains implicit H count is shown flag is set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_EXPLH

public static final int SYM_EXPLH
Atom symbol string contains explicit H count if this flag is set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_NEUTRAL

public static final int SYM_NEUTRAL
Atom symbol string does not contain the charge if this flag is set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_SMARTS

public static final int SYM_SMARTS
Atom symbol string for SMILES export. Forces SMARTS query string. Only meaningful if SYM_SQBRACKETS is also set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_MOLEX

public static final int SYM_MOLEX
Atom symbol string for Molfile export. SMARTS string with A/a property shown always. Only meaningful if SYM_SQBRACKETS is also set.

Since:
Marvin 4.0, 05/10/2005
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

SYM_CX

public static final int SYM_CX
Atom symbol string for CxSMILES export. CxSMILES string may contain aromatic boron atom which is written as 'b'. Only meaningful if SYM_SQBRACKETS is also set.

Since:
Marvin 5.2.1, 09/03/2009
See Also:
getAtomSymbol(int, int, int[], CTransform3D), Constant Field Values

VALENCE_CHECKED

public static final int VALENCE_CHECKED
Valence checked if this flag is set.

See Also:
getFlags(), Constant Field Values

VALENCE_ERROR

public static final int VALENCE_ERROR
The atom has valence error if this flag is set.

See Also:
getFlags(), Constant Field Values

FIX_CHARGE

public static final int FIX_CHARGE
Valence checking will replace radicals with charges if this flag is set.

See Also:
getFlags(), Constant Field Values

bondCount

protected transient int bondCount
Number of bonds.


theBonds

protected transient MolBond[] theBonds
The bonds.


xCoordinate

protected transient double xCoordinate
X coordinate.


yCoordinate

protected transient double yCoordinate
Y coordinate.


zCoordinate

protected transient double zCoordinate
Z coordinate.


RADICAL_CHAR

public static final char RADICAL_CHAR
Constructor Detail

MolAtom

public MolAtom(int zZ,
               double x,
               double y,
               double z)
Construct an atom. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the atomic number is valid.

Parameters:
zZ - the atomic number
x - the x coordinate
y - the y coordinate
z - the z coordinate
See Also:
checkAtno(int)

MolAtom

public MolAtom(double x,
               double y)
Construct a carbon atom at the specified location.

Parameters:
x - the x coordinate
y - the y coordinate

MolAtom

public MolAtom(int z)
Construct an atom of the specified type at the origin. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the atomic number is valid.

Parameters:
z - the atomic number
See Also:
checkAtno(int)
Method Detail

getParent

public final MoleculeGraph getParent()
Return the molecule graph that contains this atom.

Returns:
the parent graph

indexOf

public final int indexOf(MolBond bond)
Returns the index of the specified bond in this atom.

Parameters:
bond - bond reference
Returns:
the bond index

getLigands

public final MolAtom[] getLigands()
Returns the atoms connected to this atom by a bond.

Returns:
the array of connected (ligand) atoms
Since:
Marvin 5.3.3
See Also:
getLigand(int)

getLigand

public final MolAtom getLigand(int i)
Gets the i-th ligand of this atom.

Parameters:
i - bond index
Returns:
the atom at the other end of the bond
Since:
Marvin 2.6

getLigandIndex

public final int getLigandIndex(MolAtom atom)
Returns the index of the specified ligand in this atom.

Parameters:
atom - the other atom
Returns:
the connecting ligand index or -1 if not connected.
Since:
Marvin 4.0 12/22/2004
See Also:
getLigand(int)

getBondTo

public final MolBond getBondTo(MolAtom other)
Finds the bond that connects this atom to another atom.

Parameters:
other - the other atom
Returns:
the connecting bond or null
Since:
Marvin 5.3, 04/30/2009
See Also:
isBoundTo(MolAtom)

isBoundTo

public final boolean isBoundTo(MolAtom other)
Checks if this MolAtom is connected to another one or not.

Parameters:
other - the other atom
Returns:
true if the two atomss are connected with a bond, false otherwise
See Also:
getBondTo(MolAtom)

sringsize

public final int sringsize()
Calculate the size of smallest ring containing this atom.

Returns:
the SRS or Integer.MAX_VALUE if ring not found

getLock

protected final java.lang.Object getLock()
Get lock object for synchronization.

Returns:
reference to the top parent graph

setAtom1

protected static void setAtom1(MolBond bond,
                               MolAtom newatom)
Sets the first atom of a bond. Use it from derived classes.

Parameters:
bond - the bond
newatom - the new atom value

setAtom2

protected static void setAtom2(MolBond bond,
                               MolAtom newatom)
Sets the second atom of a bond. Use it from derived classes.

Parameters:
bond - the bond
newatom - the new atom value

haveSimilarBonds

public boolean haveSimilarBonds(MolAtom a)
Checks if two atoms have similar bonds. Two atoms have similar bonds if for each bond bi of the first atom, there is a corresponding bond bj of the other atom with "equal properties".

Returns:
true if they have similar bonds, false otherwise
Since:
Marvin 5.3, 04/30/2009
See Also:
MolBond.haveEqualProperties(MolBond)

getBondCount

public final int getBondCount()
Gets the number of bonds/ligands.

Returns:
the number of bonds
Since:
Marvin 3.0

getBond

public final MolBond getBond(int i)
Gets the i-th bond.

Parameters:
i - bond index
Returns:
the bond object
Since:
Marvin 3.0

getRealBondCount

public final int getRealBondCount()
Gets the number of bonds connected to "real" atoms. An LP node is not a real atom.

Returns:
the number of bonds
Since:
Marvin 3.5

set

public void set(MolAtom atom)
Set all atom properties except the coordinates.

Parameters:
atom - the source atom
Since:
Marvin 4.1, 01/01/2006

getX

public double getX()
Gets the X coordinate.

Returns:
the x coordinate in Angstroms

setX

public void setX(double x)
Sets the X coordinate.

Parameters:
x - the x coordinate in Angstroms

getY

public double getY()
Gets the Y coordinate.

Returns:
the y coordinate in Angstroms

setY

public void setY(double y)
Sets the Y coordinate.

Parameters:
y - the y coordinate in Angstroms

getZ

public double getZ()
Gets the Z coordinate.

Returns:
the z coordinate in Angstroms

setZ

public void setZ(double z)
Sets the Z coordinate.

Parameters:
z - the z coordinate in Angstroms

setXY

public void setXY(double x,
                  double y)
Sets the x and y coordinates.

Parameters:
x - the x coordinate in Angstroms
y - the y coordinate in Angstroms

setXYZ

public void setXYZ(double x,
                   double y,
                   double z)
Sets the coordinates.

Parameters:
x - the x coordinate in Angstroms
y - the y coordinate in Angstroms
z - the z coordinate in Angstroms

getLocation

public final DPoint3 getLocation()
Gets the coordinates.

Returns:
the location

getLocation

public final void getLocation(DPoint3 p)
Gets the coordinates.

Parameters:
p - object that will store the location

setLocation

public void setLocation(DPoint3 p)
Sets the coordinates.

Parameters:
p - the location

transform

public void transform(CTransform3D t,
                      boolean incg)
Apply a transformation matrix to the coordinates.

Parameters:
t - the transformation matrix
incg - graph invariants are changed (true) or not (false)
Since:
Marvin 4.0.2, 10/26/2005

getSymbol

public java.lang.String getSymbol()
Gets the element symbol. The symbol is the same as the MDL codename for special atom types: "L" for LIST and NOTLIST. For pseudo atoms, the atom alias string is returned in TeX-like format for subscripts and superscripts.

Returns:
the symbol

getAtno

public final int getAtno()
Gets the atomic number.

Returns:
the atomic number

setAtno

public void setAtno(int z)
Sets the atomic number. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the the atomic number is valid.

Parameters:
z - the atomic number
See Also:
checkAtno(int)

checkAtno

public static boolean checkAtno(int z)
Check if the given atomic number is positive and less then atomic type maximum value.

Parameters:
z - atomic number
Returns:
true if the given number is valid.
See Also:
ATOM_TYPE_COUNT

getMassno

public int getMassno()
Gets the mass number. In the case of an element it returns 0, because it is a mix of isotopes having different mass numbers.

Returns:
the mass number, or zero if not specified

setMassno

public void setMassno(int a)
Sets the mass number.

Parameters:
a - the mass number or zero

setForSpecIsotopeSymbol

public void setForSpecIsotopeSymbol(java.lang.String sym)
Sets the special atom symbol and the atomic weight for deuterium or tricium. No operation for other element types.

Parameters:
sym - the atom symbol
Since:
Marvin 4.1, 11/05/2005

setMassnoIfKnown

public void setMassnoIfKnown(java.lang.String sym)
Deprecated. as of Marvin 4.1, replaced by setForSpecIsotopeSymbol(String)

Sets the atomic weight for deuterium or tricium.

Parameters:
sym - the atom symbol

getMass

public double getMass()
Gets the atomic weight.

Returns:
the atomic weight

isNobleGas

public boolean isNobleGas()
Deprecated. As of Marvin 5.4, replaced by PeriodicSystem.isNobleGas(int z).

Is it a noble gas?

Returns:
true if noble gas, false otherwise

isMappable

public boolean isMappable()
Checks if this atom it a mappable. Since Marvin 5.0 all atoms except Lone Electron Pairs are mappeble.

Returns:
true if map index can be assigned to the atom false if atom is a lone pair
Since:
Marvin 3.4, 06/23/2004

getRelativeNegativity

public int getRelativeNegativity()
Check negativity compared to the neighbors.

Returns:
-1 if the atom is more electronegative than its neighbors, 1 if the neighbors are more electronegative, 0 if it has negative and positive neighbors also or or the neighbors have the same e.n. as the atom

getImplicitHcount

public int getImplicitHcount()
Gets the number of implicit hydrogens attached. This information may not be accurate if some manipulation has been made on the molecule. In this case, use valenceCheck() before this method.

Returns:
the implicit hydrogen count or the number of query hydrogens
See Also:
valenceCheck()

setImplicitHcount

public void setImplicitHcount(int h)
Sets the number of implicit hydrogens. Also removes the "H" query property.

Parameters:
h - the number of implicit hydrogens
Throws:
java.lang.IllegalArgumentException - negative h value specified

getNonQueryImplicitHcount

public int getNonQueryImplicitHcount()
Gets the number of implicit hydrogens attached.

Returns:
the implicit hydrogen count, not including the query H count.

setNonQueryImplicitHcount

public void setNonQueryImplicitHcount(int h)
Sets the number of non-query implicit hydrogens attached.

Parameters:
h - the implicit hydrogen count, not including the query H count.
Since:
Marvin 3.5.9, 07/12/2005

getCharge

public int getCharge()
Gets the charge.

Returns:
the charge

setCharge

public void setCharge(int q)
Sets the charge.

Parameters:
q - the charge

getColumn

public static int getColumn(int z)
The column or group of an element in the periodic system.

Parameters:
z - atomic number (protons)
Returns:
column of the given atom (0 for unknown)
Since:
Marvin 4.1

getRadical

public int getRadical()
Gets the radical value.

Returns:
the radical value
Since:
Marvin 3.0
See Also:
RAD1, RAD2, RAD2_SINGLET, RAD2_TRIPLET, RAD3, RAD3_DOUBLET, RAD3_QUARTET, RAD4

setRadical

public void setRadical(int r)
Sets the radical value.

Parameters:
r - the radical value
Since:
Marvin 3.0
See Also:
RAD1, RAD2, RAD2_SINGLET, RAD2_TRIPLET, RAD3, RAD3_DOUBLET, RAD3_QUARTET, RAD4

getRadicalCount

public int getRadicalCount()
Gets the number of free electrons.

Returns:
the number of free electrons
Since:
Marvin 3.0
See Also:
RAD1, RAD2, RAD3, RAD4

getRow

public static int getRow(int z)
The row or or period of an element in the periodic system.

Parameters:
z - atomic number (protons)
Returns:
column of the atom (0 for unknown types)
Since:
Marvin 4.1

getValencePropMinMax

public int[] getValencePropMinMax()
Gets the minimum and maximum possible values of the valence property.

Returns:
two-element array containing the minimum and maximum values
Since:
Marvin 4.1, 03/23/2006

getValenceProp

public int getValenceProp()
Gets the valence property.

Returns:
the valence or -1 if not set
Since:
Marvin 3.5, 09/04/2004

setValenceProp

public void setValenceProp(int v)
Sets the valence property.

Parameters:
v - the valence or -1 to unset
Since:
Marvin 3.5, 09/04/2004

incValenceProp

public int incValenceProp()
Increments the value of the valence property.

Returns:
the new value
Since:
Marvin 4.1, 03/23/2006

decValenceProp

public int decValenceProp()
Decrements the value of the valence property.

Returns:
the new value
Since:
Marvin 4.1, 03/23/2006

getValence

public int getValence()
Gets the valence. If valence is set as a property, returns that. Otherwise the valence is the sum of bond orders plus the number of implicit hydrogens or query hydrogen atoms.

Returns:
the valence

getExplicitHcount

public int getExplicitHcount()
Gets number of hydrogen connections.

Returns:
the number of H connections

hasQProps

public boolean hasQProps()
Does it have query properties?

Returns:
true if it has query properties, false otherwise
See Also:
isQuery()

getQProp

public java.lang.Object getQProp(java.lang.String name)
Gets a query property. For a meaning of the above properties, see The JChem Query Guide

Parameters:
name - the property name
Returns:
the value of the property or null if not set

getQPropAsInt

public int getQPropAsInt(java.lang.String name)
Gets a query property as an integer. For a meaning of the above properties, see The JChem Query Guide

Parameters:
name - the property name
Returns:
the value of the property or -1 if not set
See Also:
getQProp(java.lang.String)

getQPropMinMax

public int[] getQPropMinMax(java.lang.String name)
Gets the minimum and maximum possible values of a query property.

Parameters:
name - the query property abbreviation
Returns:
two-element array containing the minimum and the maximum value
Since:
Marvin 4.1, 03/22/2006

incQProp

public int incQProp(java.lang.String name)
Increments the value of a query property.

Parameters:
name - the query property abbreviation
Returns:
the new value
Since:
Marvin 4.1, 03/22/2006

decQProp

public int decQProp(java.lang.String name)
Decrements the value of a query property.

Parameters:
name - the query property abbreviation
Returns:
the new value
Since:
Marvin 4.1, 03/22/2006

setQProp

public void setQProp(java.lang.String name,
                     java.lang.Object v)
Sets a query property. For a meaning of the above properties, see The JChem Query Guide

Parameters:
name - the property name
v - the value
See Also:
getQProp(java.lang.String)

setQProp

public void setQProp(java.lang.String name,
                     int v)
Sets a query property as an integer. The value -1 has special meaning, it removes the property.
For a meaning of the above properties, see The JChem Query Guide

Parameters:
name - the property name
v - the value or -1

clearQProps

public void clearQProps()
Clears query props.

Since:
Marvin 3.4

getQPropNames

public java.lang.String[] getQPropNames()
Gets the names of query properties with non-null values.

Since:
Marvin 4.1, 03/21/2006

getQPropNameSet

public java.util.Set<java.lang.String> getQPropNameSet()
Gets the names of query properties with non-null values, or null if no query properties are set.

Since:
Marvin 4.1, 05/10/2006

getQueryAromaticity

public int getQueryAromaticity()
Gets the aromatic/aliphatic query property.

Returns:
UNSPECIFIED_AROMATICITY, AROMATIC, ALIPHATIC or AROMATIC_OR_ALIPHATIC
Since:
Marvin 3.3

setQueryAromaticity

public void setQueryAromaticity(int x)
Sets the aromatic/aliphatic query property.

Parameters:
x - UNSPECIFIED_AROMATICITY, AROMATIC, ALIPHATIC or AROMATIC_OR_ALIPHATIC
Since:
Marvin 3.3

incQueryAromaticity

public int incQueryAromaticity()
Increments the value of the query aromaticity property.

Returns:
the new value
Since:
Marvin 4.1, 03/23/2006

getRgroup

public int getRgroup()
Gets the R-group ID.

Returns:
Rgroup number, between 0 and RGROUP_MAX

setRgroup

public void setRgroup(int r)
Sets the R-group ID.

Parameters:
r - Rgroup number, between 0 and RGROUP_MAX

getAttach

public int getAttach()
Gets the S-group attachment point information.

Returns:
MolAtom.ATTACH_NONE (not an S-group attachment point), ATTACH1 (first), ATTACH2 (second) or ATTACH_BOTH (both)

setAttach

public void setAttach(int a)
Sets the S-group aattachment point information.

Parameters:
a - MolAtom.ATTACH_NONE (not an S-group attachment point), ATTACH1 (first), ATTACH2 (second) or ATTACH_BOTH (both)

setAttach

public void setAttach(int a,
                      Sgroup sg)
Sets the S-group attachment point information for an S-group attachment atom.

Parameters:
a - MolAtom.ATTACH_NONE (not an S-group attachment point), ATTACH1 (first), ATTACH2 (second) or ATTACH_BOTH (both)
sg - the parent S-group or null
Since:
Marvin 3.5, 10/11/2004

getAttachParentSgroup

public Sgroup getAttachParentSgroup()
Gets the parent S-group of an S-group attachment point atom.

Returns:
the parent S-group or null
Since:
Marvin 3.5, 10/11/2004

getHybridizationState

public int getHybridizationState()
Gets the hybridization state. The hybridization state value is not updated automatically when a molecule is loaded or modified. This ensures that the hybridization state set by setHybridizationState(int) is not overwritten accidentally. \br To calculate and set the hybridization state for this and all other atoms in a moecule call MoleculeGraph.calcHybridization().

Returns:
the hybridization state
See Also:
HS_UNKNOWN, HS_S, HS_SP, HS_SP2, HS_SP3

setHybridizationState

public void setHybridizationState(int h)
Sets the hybridization state.

Parameters:
h - the hybridization state
See Also:
getHybridizationState()

getAtomMap

public int getAtomMap()
Gets the atom-atom mapping number.

Returns:
the map value (positive integer) or 0

setAtomMap

public void setAtomMap(int map)
Sets the atom-atom mapping number.

Parameters:
map - the map value (positive integer) or 0
See Also:
AAMAP_MAX

getSetSeq

public int getSetSeq()
Gets the atom set sequence number.

Returns:
a number between 0 and SETSEQ_MAX
See Also:
SETSEQ_MAX

setSetSeq

public void setSetSeq(int id)
Sets the atom set sequence number.

Parameters:
id - a number between 0 and SETSEQ_MAX
See Also:
SETSEQ_MAX

setExtraLabelSetSeq

public void setExtraLabelSetSeq(int id)

getExtraLabelSetSeq

public int getExtraLabelSetSeq()

residueTypeOf

public static int residueTypeOf(java.lang.String name)
Gets the residue identifier for a residue name.

Parameters:
name - residue name
Returns:
the residue type
Since:
Marvin 3.1.4

residueSymbolOf

public static java.lang.String residueSymbolOf(int id)
Gets the name of a residue.

Parameters:
id - the residue identifier
Returns:
the residue symbol
Since:
Marvin 3.1.4

getResidueType

public int getResidueType()
Gets the residue type.

Returns:
the residue type
See Also:
RESTYPE_MAX

setResidueType

public void setResidueType(int t)
Sets the residue type.

Parameters:
t - the residue type
See Also:
RESTYPE_MAX

getResidueSeq

public int getResidueSeq()
Gets the residue sequence number.

Returns:
the residue sequence number
See Also:
RESSEQ_MAX

setResidueSeq

public void setResidueSeq(int n)
Sets the residue sequence number.

Parameters:
n - the residue sequence number
See Also:
RESSEQ_MAX

getResidueAtomId

public int getResidueAtomId()
Gets the residue atom identifier. Atoms in amino acids and nucleic acids are identified uniquely by the atom symbol and the residue atom identifier.

Returns:
the residue atom identifier
Since:
Marvin 3.1.3

setResidueAtomId

public void setResidueAtomId(int id)
Sets the residue atom identifier.

Parameters:
id - the residue atom identifier
Since:
Marvin 3.1.3

getMinRepetitions

public int getMinRepetitions()
Gets the minimum number of repetitions for a link node.

Returns:
the minimum number of repetitions
Since:
Marvin 3.5, 07/22/2004

setMinRepetitions

public void setMinRepetitions(int r)
Sets the minimum number of repetitions for a link node.

Parameters:
r - the minimum number of repetitions
Since:
Marvin 3.5, 07/22/2004

getMaxRepetitions

public int getMaxRepetitions()
Gets the maximum number of repetitions for a link atom.

Returns:
the maximum number of repetitions
Since:
Marvin 3.5, 07/22/2004

setMaxRepetitions

public void setMaxRepetitions(int r)
Sets the maximum number of repetitions for a link atom.

Parameters:
r - the maximum number of repetitions
Since:
Marvin 3.5, 07/22/2004

getLinkNodeOuterAtom

public int getLinkNodeOuterAtom(int idx)
Gets the index of one of the link node's outer neighbor atoms. (Outer: not repeating.)

Parameters:
idx - Which outer atom (0 or 1)
Returns:
The specified outer atom index (as used with getLigand()) or -1 if not set.
Since:
Marvin 4.0 12/22/2004
See Also:
getLigand(int)

setLinkNodeOuterAtom

public void setLinkNodeOuterAtom(int idx,
                                 int outer)
Sets one of the link node's outer neighbor atoms. (Outer: not repeating.)

Parameters:
idx - Which outer atom (0 or 1)
outer - The outer neighbor atom index (as used with getLigand()) or -1 if clearing.
Since:
Marvin 4.0 12/22/2004
See Also:
getLigand(int)

isLinkNode

public boolean isLinkNode()
The atom is a link node if the maximum number of repetitions is nonzero.

Returns:
if the maximum number of repetitions is nonzero
Since:
Marvin 3.5, 07/22/2004

isArrowEnd

public final boolean isArrowEnd()
Deprecated. As of Marvin 5.3

Tests if this is an arrow endpoint.

Returns:
true if this is an arrow endpoint, false otherwise
Since:
Marvin 2.9, 08/06/2001
See Also:
MolBond.isArrow()

bondweights

public void bondweights(double[] w,
                        CTransform3D t)
Calculates the average of the bond unit vectors pointing out of this atom. The result is not a unit vector.

Parameters:
w - 3-element array that will contain the resulting vector
t - the rotation matrix

getAtomSymbol

public java.lang.String getAtomSymbol(int opts,
                                      int aflags,
                                      int[] lcenter,
                                      CTransform3D preTransform)
Gets the string representation of the atom symbol.

Parameters:
opts - combination of SYM_* flags
aflags - atom flags
preTransform - viewing transformation
lcenter - if not null, then its first two element (index 0-1) will will be set to the index and the length of the element symbol substring in the returned string, the element at at index 2 will be set to +1 if the H label is above, -1 if below the element symbol or 0 otherwise
Returns:
the string representation
Since:
Marvin 3.0
See Also:
SYM_SQBRACKETS, SYM_IMPLH, SYM_EXPLH, SYM_NEUTRAL, SYM_SMARTS, SYM_MOLEX

getQueryLabel

public java.lang.String getQueryLabel()
Gets the string representation of the query atom

Returns:
the string representation
Since:
Marvin 3.0

getPreferredLabelDir

public int getPreferredLabelDir(CTransform3D pretr,
                                int h)
Gets the preferred direction for an additional label.

Parameters:
pretr - viewing transformation
h - hydrogen count for hydrogen label display, 0 otherwise
Returns:
LDIR_RIGHT, LDIR_LEFT, LDIR_ABOVE or LDIR_BELOW
Since:
4.0, 02/16/2005

isQuery

public final boolean isQuery()
Tests whether it is a query atom. (Has a query atom type or query property or query string): For a meaning of the above properties, see The JChem Query Guide

Returns:
true if it is a query atom, false otherwise
See Also:
isLinkNode(), ANY, HETERO, LIST, NOTLIST, RGROUP

isQProp

public boolean isQProp()
Tests whether this object represents a query property.

Returns:
true if it is a query property, false otherwise
Since:
Marvin 3.0, 11/08/2002

isImplicitizableH

public boolean isImplicitizableH(int f)
Tests whether the hydrogen atom is implicitizable or not. Only bound (to non-Hydrogen atom), non-isotope, neutral, non-radical, non-mapped, non-CIS/TRANS important H atoms are implicitizable by default (0 argument). If the argument is nonzero, then the return value can be true for lonely, isotope, charged, radical, mapped or CIS/TRANS Important H atoms also.

Parameters:
f - flags specifying special H atom types to include
Returns:
true if the hydrogen is implicitizable, false otherwise
Since:
Marvin 3.1
See Also:
LONELY_H, ISOTOPE_H, CHARGED_H, RADICAL_H, MAPPED_H, WEDGED_H, HCONNECTED_H, CTSPECIFIC_H, VALENCEERROR_H, Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int)

isPseudo

public boolean isPseudo()
Tests whether if the atom is a pseudo atom. To create a pseudo atom, set atom number (setAtno(int)) to PSEUDO and set the pseudo atom type string by setAliasstr(String).

Returns:
true if the atom is a pseudo atom, false otherwise
Since:
Marvin 3.3
See Also:
getAliasstr(), PSEUDO

isGeneric

public boolean isGeneric()
Tests whether the atom is a generic atom. To create a generic atom, set atom number (setAtno(int)) to PSEUDO and set the pseudo atom type string by setAliasstr(String) to one of the following: .

Returns:
true if the atom is a ganaric atom, false otherwise
Since:
Marvin 5.0
See Also:
getAliasstr(), PSEUDO

hasWedgedBond

public final boolean hasWedgedBond()
Tests whether the atom has a wedged bond.

Returns:
true if it has a wedged bond, false otherwise
Since:
4.0

hasAromaticBond

public final boolean hasAromaticBond()
Tests whether the atom has aromatic bonds.

Returns:
true if it has aromatic bonds, false otherwise

hasQueryBonds

public final boolean hasQueryBonds()
Tests whether the atom has query bonds ("ANY" bonds).

Returns:
true if it has query bonds, false otherwise

hasSMARTSProps

public final boolean hasSMARTSProps()
Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.hasSMARTSProps(MolAtom atom)

Tests whether it is a SMARTS query atom.

Returns:
true if it has SMARTS properties, false otherwise

hasSMARTSPropsExcluding

public final boolean hasSMARTSPropsExcluding(java.lang.String exclude)
Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.hasSMARTSPropsExcluding(MolAtom atom, String exclude)

Tests whether it is a SMARTS query atom.

Parameters:
exclude - list of SMARTS properties to exclude
Returns:
true if it has SMARTS properties, false otherwise
Since:
Marvin 3.1.2

setSMARTS

public void setSMARTS(java.lang.String s)
               throws java.lang.SecurityException
Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setSMARTS(MolAtom atom, String s)

Sets SMARTS query string data.

Parameters:
s - the SMARTS string
Throws:
java.lang.SecurityException - the SmilesImport cannot be loaded, possibly because of a misconfigured firewall

getQuerystr

public java.lang.String getQuerystr()
Deprecated. As of release 5.7, replaced by getQueryString()

Gets the query properties.

Returns:
the query string

setQuerystr

public void setQuerystr(java.lang.String s)
Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setQuerystr(MolAtom atom, String s) and setQueryString(String)

Assigns the query properties string to this atom while setting all necessary atom and query properties. This is done through SmartsAtomQuerifier which parses the query string. For this reason this operation may be relatively costly. The remaining part of the query string (which could not be represented/assigned) is set to queryStr.

Parameters:
s - the query string

setQuerystr

public void setQuerystr(java.lang.String s,
                        int options)
Deprecated. As of release 5.7, replaced by SmartsAtomQuerifier.setQuerystr(MolAtom atom, String s, int options) and setQueryString(String)

Assigns the query properties string to this atom while setting all necessary atom and query properties. This is done through SmartsAtomQuerifier which parses the query string. For this reason this operation may be relatively costly. The remaining part of the query string (which could not be represented/assigned) is set to queryStr.

In daylight smarts H is only considered as H atom when the atom expression has the syntax [<mass>H<charge><map>] (mass, charge and map are optional). If options is SMARTS_H_MARVIN_COMP_MODE and "H" is not in the form [<mass>H<charge><map>] then it may be interpreted as Hydrogen atom, not total H count! It is neccesary for backward compatibility.

Parameters:
s - the query string
options - Possible values: SMARTS_H_MARVIN_COMP_MODE or SMARTS_H_DAYLIGHT_COMP_MODE. Instead of using this option, we recommend using unambiguous smarts queries: #1 for H atom and H1 for H count 1.
Since:
Marvin 3.5
See Also:
SMARTS_H_DAYLIGHT_COMP_MODE, SMARTS_H_MARVIN_COMP_MODE

setQueryString

public void setQueryString(java.lang.String queryString)
Assigns the query string to this atom.

Parameters:
queryString - the query properties string to be assigned.
See Also:
getQueryString()

getQueryString

public java.lang.String getQueryString()
Returns s the query string assigned to this atom.

Returns:
the query string
See Also:
setQueryString(String)

setAliasstr

public void setAliasstr(java.lang.String s)
Sets the alias string or pseudo atom type string for pseudo atoms.

Parameters:
s - the alias
See Also:
isPseudo()

getAliasstr

public java.lang.String getAliasstr()
Gets the alias string or pseudo atom type string for pseudo atoms.

Returns:
the alias
See Also:
isPseudo()

setExtraLabel

public void setExtraLabel(java.lang.String s)
Sets the extra atom label (also called atom value): "label" or "label1|label2". In general, any user label can be set by this method.

Parameters:
s - the atom label

setExtraLabelColor

public void setExtraLabelColor(long rgbs)
Sets the extra label color(s): lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).

Parameters:
rgbs - the color(s)
See Also:
setExtraLabel(String), setExtraLabelColor(int, int)

setExtraLabelColor

public void setExtraLabelColor(int rgb1,
                               int rgb2)
Sets the extra label colors: lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).

Parameters:
rgb1 - the lower 32 bits
rgb2 - the upper 32 bits
Since:
Marvin 5.1.2
See Also:
setExtraLabel(String), setExtraLabelColor(long)

getExtraLabel

public java.lang.String getExtraLabel()
Gets the label string (also called atom value): "result" or "result1|result2".

Returns:
the label

getExtraLabelColor

public long getExtraLabelColor()
Gets the extra label color(s): lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).

Returns:
the label color(s)

getExtraLabelColor

public int getExtraLabelColor(int i)
Gets the extra label color: (alpha<<24 + red<<16 + green<<8 + blue).

Parameters:
i - is the result index (0 or 1)
Returns:
the label color

getExtraLabelColor

public static int getExtraLabelColor(long rgbs,
                                     int i)
Gets extra label color from composed color value.

Parameters:
rgbs - the composed color value
i - is the result index (0 for first color, 1 for second color)
Returns:
the label color
Since:
Marvin 5.1.2
See Also:
getExtraLabelColor()

clearExtraLabel

public void clearExtraLabel()
Clears the extra label.


getList

public int[] getList()
Gets the atom list.

Returns:
the list

setList

public void setList(int[] l,
                    int n)
Sets the list elements.

Parameters:
l - the list
n - number of elements to set

setList

public void setList(int[] l)
Sets the list elements.

Parameters:
l - the list

getReactionStereo

public int getReactionStereo()
Gets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.

Returns:
the reaction stereo property
See Also:
RXNSTEREO_NONE, RXNSTEREO_INVERSION, RXNSTEREO_RETENTION

setReactionStereo

public void setReactionStereo(int r)
Sets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.

Parameters:
r - the reaction stereo property
Since:
Marvin 3.0
See Also:
RXNSTEREO_NONE, RXNSTEREO_INVERSION, RXNSTEREO_RETENTION

clear

public void clear()
Clear query properties, charge, and hcount.


clone

public java.lang.Object clone()
Clones the atom. The bonds are not cloned: their references do not change.

Overrides:
clone in class java.lang.Object
Returns:
the clone

toString

public java.lang.String toString()
Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object
Since:
3.5.2, 12/16/2004

insideLabel

public boolean insideLabel(double x,
                           double y)
Tests whether the specified point is inside the atom label.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
true if inside, false if outside

getAtomicNumber

public static int getAtomicNumber(java.lang.String element)
Deprecated. As of Marvin 5.9, replaced by a similar method PeriodicSystem.findAtomicNumber(String).

Gets the atomic number of an element.

Parameters:
element - the element name
Returns:
the atomic number
Throws:
java.lang.IllegalArgumentException - if element does not correspond to a chemical element.

numOf

public static int numOf(java.lang.String e)
Deprecated. As of Marvin 5.6, replaced by getAtomicNumber(String).

Gets the atomic number of an element.

Parameters:
e - the element name
Returns:
the atomic number or zero if not found

symbolOf

public static java.lang.String symbolOf(int z)
Gets the element symbol for the specified atomic number. The symbol is the same as the MDL codename for special atom types: "L" for LIST and NOTLIST.

Parameters:
z - the atomic number
Returns:
the symbol

symbolOf

public static java.lang.String symbolOf(int z,
                                        int a)
Gets the special element symbol for the specified atomic and mass numbers. For Hydrogen, it can return "D" or "T" for the isotopes. Otherwise, the symbol is the same as the MDL codename for special atom types: "L" for LIST and NOTLIST.

Parameters:
z - the atomic number
a - the mass number
Returns:
the symbol
Since:
Marvin 5.0, 10/12/2007

nameOf

public static java.lang.String nameOf(int z)
Gets the name of the specified element.

Parameters:
z - the atomic number
Returns:
the name

electronegOf

public static int electronegOf(int z)
Gets 10 times the electronegativity value for the specified element.

Parameters:
z - the atomic number
Returns:
the electronegativity

numoxstatesOf

public static int numoxstatesOf(int z)
Gets the number of oxidation states for the specified element.

Parameters:
z - the atomic number
Returns:
the number of states

oxstateOf

public static int oxstateOf(int z,
                            int k)
Gets the oxidation states.

Parameters:
z - the atomic number
k - the oxidation state index
Returns:
the oxidation state

maxAbsOxStateOf

public static int maxAbsOxStateOf(int z)
Gets the oxidation state that has the maximum absolute value

Parameters:
z - the atomic number
Returns:
absolute value of the oxidation state
Since:
Marvin 4.1

negOxOf

public static int negOxOf(int z)
Gets the negative oxidation number.

Parameters:
z - the atomic number
Returns:
the negative oxidation number
Since:
Marvin 2.7

posOxOf

public static int posOxOf(int z)
Gets the smallest positive oxidation number.

Parameters:
z - the atomic number
Returns:
the smallest positive oxidation number
Since:
Marvin 2.7

ionChargeOf

public static int ionChargeOf(int z)
Gets the ion charge.

Parameters:
z - the atomic number
Returns:
the charge
Since:
Marvin 2.7

covalentRadiusOf

public static double covalentRadiusOf(int z,
                                      int t)
Gets the covalent radius in C-C bond length units.

Parameters:
z - the atomic number
t - the bond type (1, 2, 3)
Returns:
the covalent radius
Since:
Marvin 2.7

naturalWeightOf

public static double naturalWeightOf(int z)
Gets the natural weight of the element. WARNING: This method does not return the exact value.

Parameters:
z - the atomic number
Returns:
the weight

isotopeType

public static int isotopeType(int z,
                              int a)
Gets the type of an isotope.

Parameters:
z - atomic number
a - mass number
Returns:
0 if nonexistent, 1 if non-naturally occuring, 2 if naturally occurring

twicesumbonds

public int twicesumbonds(boolean countH,
                         boolean all2)
Calculates the total number of bonding electrons, excluding implicit hydrogens. The number of electrons is 2 for single bond, 4 for double and 6 for triple. For other bond types, the following values are used: 3 for AROMATIC in most cases. 2 for AROMATIC for the following atoms: 2 for ANY and SINGLE_OR_AROMATIC, 3 for SINGLE_OR_DOUBLE, 4 for DOUBLE_OR_AROMATIC.

Parameters:
countH - bonds to explicit hydrogen atoms are counted if true, not counted if false
all2 - use the value 2 for each bond (independently of type) if true
Returns:
the sum of bond values

qpropCheck

public void qpropCheck()
Query property checking.


valenceCheck

public void valenceCheck()
Valence checking. During this check implicit hydrogens are calculated and the valence error flag is set in case of error. If in parent molecule the valence check is disabled than the check is not performed. The same applies if valence check is disabled for aromatic Nitrogen-like atoms and this atom is this kind of atom.

See Also:
hasValenceError(), getImplicitHcount(), MoleculeGraph.getValenceCheckState(), MoleculeGraph.setValenceCheckState(chemaxon.struc.MoleculeGraph.ValenceCheckState)

valenceCheck

public void valenceCheck(int opts)
Deprecated. As of Marvin 5.4, replaced by valenceCheck().

Valence checking. Determines if there is a valence error. Calculates implicit hydrogen atoms.

Parameters:
opts - valence checking options
Since:
Marvin 3.4

setCorners

public void setCorners(double xnw,
                       double ynw,
                       double xse,
                       double yse)
Used internally by MolPainter.

Parameters:
xnw - north-west corner x
ynw - north-west corner y
xse - south-east corner x
yse - south-east corner y

moveCorners

public void moveCorners(double diffx,
                        double diffy)
Translates the coordinates of the atom label.

Parameters:
diffx - translates the x values of the corners by this value.
diffy - translates the y values of the corners by this value.

getFlags

public int getFlags()
Gets flags. Flags contain the parity (3 bits), chirality (R/S, 2 bits), atomStereo (2 bits), hybridization state (3 bits), radical (4 bit), valenceChecked (1 bit), valenceError (1 bit), explicitCharge (1 bit), selected (1 bit) and atom map (10 bits) fields.

Returns:
the flags
See Also:
StereoConstants.PARITY_MASK, StereoConstants.CHIRALITY_MASK, StereoConstants.ATOMSTEREO_MASK

setFlags

public void setFlags(int f)
Sets the flags.

Parameters:
f - new flags

setFlags

public void setFlags(int f,
                     int mask)
Sets the flags.

Parameters:
f - new flags
mask - bits to set in flags

isSelected

public boolean isSelected()
Tests whether this atom is selected.

Returns:
true if selected, false otherwise
Since:
Marvin 2.9.12

setSelected

public void setSelected(boolean sel)
Selects or unselects this atom.

Parameters:
sel - true to select, false to unselect
Since:
Marvin 2.9.12

hasValenceError

public boolean hasValenceError()
Returns previously set valence error. Valence error can be detected by valenceCheck() method.

Returns:
true in case of error, false otherwise
Since:
Marvin 2.9.12
See Also:
valenceCheck()

setValenceError

public void setValenceError(boolean v)
Sets or clears the valence error flag.

Parameters:
v - true to set, false to unset
Since:
Marvin 2.9.12

getStereoCare

public boolean getStereoCare()
Reports double bond stereo care information on the connected bonds.

Returns:
True if there is -at least- one bond with stereo care box on, false else.
See Also:
MolBond.getFlags(), MolBond.setFlags(int)

getStereoGroupType

public int getStereoGroupType()
Gets the stereochemical group type for the enhanced stereo representation. (Type is one of NONE, ABS, OR, AND.)

Returns:
the stereochemical group type for the enhanced stereo representation.
Since:
Marvin 3.1.4
See Also:
StereoConstants.STGRP_NONE, StereoConstants.STGRP_ABS, StereoConstants.STGRP_OR, StereoConstants.STGRP_AND, getStereoGroupType(), Enhanced Stereo section of the JChem Query Guide

setStereoGroupType

public void setStereoGroupType(int t)
Sets the stereochemical group type for enhanced stereo representation.

Parameters:
t - the stereochemical group type
Since:
Marvin 3.1.4
See Also:
getStereoGroupType(), StereoConstants.STGRP_NONE, StereoConstants.STGRP_ABS, StereoConstants.STGRP_OR, StereoConstants.STGRP_AND, getStereoGroupType(), Enhanced Stereo section of the JChem Query Guide

getStereoGroupNumber

public int getStereoGroupNumber()
Gets the stereochemical group number for AND and OR groups of the enhanced stereo representation.

Returns:
the stereochemical group number (positive integer)
Since:
Marvin 3.1.4
See Also:
getStereoGroupType(), StereoConstants.STGRP_OR, StereoConstants.STGRP_AND, Enhanced Stereo section of the JChem Query Guide

setStereoGroupNumber

public void setStereoGroupNumber(int n)
Sets the stereochemical group number for AND and OR groups of the enhanced stereo representation.

Parameters:
n - the stereochemical group number (positive integer)
Since:
Marvin 3.1.4
See Also:
getStereoGroupNumber(), getStereoGroupType(), StereoConstants.STGRP_OR, StereoConstants.STGRP_AND, Enhanced Stereo section of the JChem Query Guide

isSpecIsotopeSymbolUsed

public boolean isSpecIsotopeSymbolUsed()
Tests whether special symbol is used. The special symbols are D and T for Hydrogen isotopes.

Returns:
true if special symbol is used, false otherwise
Since:
Marvin 4.1, 11/05/2005

isSpecIsotopeSymbolPreferred

public boolean isSpecIsotopeSymbolPreferred()
Tests whether special symbol is used. The special symbols are D and T for Hydrogen isotopes.

Returns:
true if special symbol is used, false otherwise
Since:
Marvin 4.1, 11/05/2005

setSpecIsotopeSymbolPreferred

public void setSpecIsotopeSymbolPreferred(boolean v)
Sets special isotope symbol usage preference. The special symbols are D and T for Hydrogen isotopes.

Parameters:
v - true if special symbol is used, false otherwise
Since:
Marvin 4.1, 11/05/2005

add

protected boolean add(MolBond b)
Add a bond if it had not been already added. Also runs valence checking if charge and implicit hydogens were previously set this way.

Parameters:
b - the bond to add

pack

public void pack()
Reduce memory usage.


removeAllBonds

protected void removeAllBonds()
Removes all bonds.


removeBond

protected void removeBond(MolBond bond)
Removes a bond by reference.

Parameters:
bond - bond reference to remove

removeBond

protected void removeBond(int i)
Removes a bond. Also runs valence checking if charge and implicit hydogens were previously set this way.

Parameters:
i - bond index

paritySign

public static int paritySign(int a,
                             int b,
                             int c,
                             int d)
Calculates the sign of the parity for the specified indexes.

Parameters:
a - first atom index
b - second atom index
c - third atom index
d - fourth atom index
Returns:
+1, -1, or 0 (if two or more indexes equal)

isSameParityClass

public static boolean isSameParityClass(int i1,
                                        int i2,
                                        int i3,
                                        int i4,
                                        int j1,
                                        int j2,
                                        int j3,
                                        int j4)
Calculates if chirality centers in the structure and the query belong to the same parity class. i1, ..., i4 are indexes of neighbors in the structure. j1, ..., j4 are indexes of corresponding neighbors in the query. In the case of explicit H the index has to be set to Integer.MAX_VALUE. In the case of implicit H i4 (or j4) has to be set to Integer.MAX_VALUE.

See Also:
paritySign(int, int, int, int)

isTerminalAtom

public boolean isTerminalAtom()
Determines whether it is a terminal atom or not.

Returns:
True if terminal atom, else false.
Since:
Marvin 3.4

haveEqualProperties

public boolean haveEqualProperties(MolAtom a)
Tests if two atoms have the same properties. Atom coordinates, the "selected" property and the number of implicit hydrogens are not taken into account.

Returns:
true if they have the same properties, false otherwise
Since:
Marvin 3.4.1, 07/06/2004

countAllAtoms

protected int countAllAtoms()
Counts all atoms represented by this atom.

Returns:
1
Since:
Marvin 3.0

getLonePairCount

public int getLonePairCount()
Returns the automatically calculated lone pair count of this atom.

Returns:
the number of the calculated lone pairs if the atom is part of a MoleculeGaph -1 otherwise
Since:
Marvin 5.1.5

getElectronProp

public int getElectronProp()
Returns the number of lone pairs on this atom.

Returns:
the number of lone pairs
  • a value between 0 and 4: this has the meaning that the atom has this number of lone pairs. For example: after calling setElectronProperty(3), 3 lone pairs will belong to the atom.
  • The number of lone pairs is not set when the returned value is less then 0.

setElectronProp

public void setElectronProp(int eProp)
Sets the number of lone pairs.

Parameters:
eProp - the number of lone pairs

storeTemporaryObject

public void storeTemporaryObject(java.lang.String key,
                                 java.lang.Object val)
Stores an object temporarily. The stored object is not cloned and not serialized. This method may be used to store lone pair coordinates when drawing them. Then the electron flow arrow can start from a stored point.

Parameters:
key - key to the object
val - the object
Since:
Marvin 5.3, 09/13/2009

getTemporaryObject

public java.lang.Object getTemporaryObject(java.lang.String key)
Gets a temporary object.

Parameters:
key - key to the object
Returns:
the object
Since:
Marvin 5.3, 09/13/2009

setLinkNodeDefaultOuters

public void setLinkNodeDefaultOuters()
Sets link node outer atoms to default values, if they are not set yet. Does not check if it is a valid link node configuration.

Since:
Marvin 4.0 12/27/2004
See Also:
setLinkNodeOuterAtom(int, int), MoleculeGraph.setLinkNodeDefaultOuters(MolAtom)

isAmbiguousStereo

public boolean isAmbiguousStereo()
Check if the atom has ambiguous stereo wedge configuration. If the molecule is 2D and the atom has one hashed or bold bond (starting from this atom, indicating one configuration) and one squiggly bond (starting also from this atom, indicating two configuration) than the atom has ambiguous stereo configuration. Or if the molecule is 2D and the atom parity cannot be determined from the given wedges. Or if the molecule is in 3D but the atom has wedge or hash neighbors.

Returns:
true if the atom stereo configuration is ambiguous, else false.
Since:
Marvin 4.1 01/06/2006
See Also:
MolBond.UP, MolBond.DOWN, MolBond.STEREO1_MASK

isAromaticSMILESSubset

public static final boolean isAromaticSMILESSubset(int atno)
Is the atom can be aromatic according to the daylight specification: Only atoms on the following list can be considered aromatic: C, N, O, P, S, As, Se, and * (wildcard).

Parameters:
atno - atomic number
Returns:
true if the atom is the member of the aromatic subset.
Since:
Marvin 5.2 11/06/2008

getEdgeCount

public final int getEdgeCount()
Deprecated. As of Marvin 5.3, replaced by getBondCount().


getEdge

public final MolBond getEdge(int i)
Deprecated. As of Marvin 5.3, replaced by getBond(int).


getEdgeTo

public final MolBond getEdgeTo(MolAtom other)
Deprecated. As of Marvin 5.3, replaced by getBondTo(MolAtom).


haveSimilarEdges

public boolean haveSimilarEdges(MolAtom a)
Deprecated. As of Marvin 5.3, replaced by haveSimilarBonds(MolAtom).


propertySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> propertySet()
Returns a collection view of the properties (property key - property value mappings) of this atom. Each element in the returned collection is a Map.Entry. Changes to the properties are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding property from this, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

Returns:
a collection view of the properties of this atom.
Since:
Marvin 5.4

propertyKeySet

public java.util.Set<java.lang.String> propertyKeySet()
Returns a set view of the property keys of this atom. Changes to the properties of this atom are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding property from this atom, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

Returns:
set view of the property keys of this atom.
Since:
Marvin 5.4

containsPropertyKey

public boolean containsPropertyKey(java.lang.String key)
Returns true if this atom has a mapping for the specified property key.

Parameters:
key - the property key which is to be searched for.
Returns:
true if this map contains a mapping for the specified property key.
Since:
Marvin 5.4

removeProperty

public java.lang.Object removeProperty(java.lang.String key)
Removes the mapping for this property key from this atom if present.

Parameters:
key - property key whose mapping is to be removed from the atom.
Returns:
previous poperty value associated with specified property key, or null if there was no mapping for property key. A null return can also indicate that the property mapping previously associated null with the specified property key.
Since:
Marvin 5.4

propertyCount

public int propertyCount()
Returns the number of property (property key - property value) mappings of this atom.

Returns:
the number of property mappings of this atom.
Since:
Marvin 5.4

getProperty

public java.lang.Object getProperty(java.lang.String key)
Returns the property value to which the specified property key is mapped at this atom, or null if this atom has no mapping for this property key. A return value of null does not necessarily indicate that the atom has no mapping for the property key; it is also possible that the atom explicitly maps the property key to null. The containsKey method may be used to distinguish these two cases.

Parameters:
key - the property key whose associated property value is to be returned.
Returns:
the property value to which this atom maps the specified property key, or null if the atom has no mapping for this property key.
Since:
Marvin 5.4

putProperty

public void putProperty(java.lang.String key,
                        java.lang.Object value)
Associates the specified value with the specified key at this atom. If this atom previously had a mapping for this property key, the old property value is replaced.

Parameters:
key - property key with which the specified value is to be associated
value - property value to be associated with the specified property key.
Since:
Marvin 5.4

clearProperties

public void clearProperties()
Removes all properties from this atom.

Since:
Marvin 5.4

setRgroupAttachmentPointOrder

public void setRgroupAttachmentPointOrder(int order)
Sets the attachment point order of an R-group attachment point.

Parameters:
order - the attachment point order to set
Since:
Marvin 5.4
See Also:
RGROUP_ATTACHMENT, getRgroupAttachmentPointOrder()

getRgroupAttachmentPointOrder

public int getRgroupAttachmentPointOrder()
Gets the attachment point order of an R-group attachment point.

Returns:
the attachment point order
Since:
Marvin 5.4
See Also:
RGROUP_ATTACHMENT, setRgroupAttachmentPointOrder(int order)

addRgroupAttachmentPoint

public MolAtom addRgroupAttachmentPoint(int order,
                                        int bondtype)
Attaches a new R-group attachment point to this atom by a bond of a specified type. The new R-group attachment point and the new bond are added to the parent molecule of this atom.

Parameters:
order - the order of the R-group attachment point, order should be greater than 0.
bondtype - the type of the new bond to add
Returns:
the added R-group attachment point
Since:
Marvin 5.4
See Also:
RGROUP_ATTACHMENT, setRgroupAttachmentPointOrder(int order)

getLigandOrder

public int getLigandOrder(MolAtom ligand)
Gets the order of a specified ligand.

Parameters:
ligand - the ligand
Returns:
the order of the ligand
Since:
Marvin 5.4, 08/21/2010

setLigandOrder

public boolean setLigandOrder(int order,
                              MolAtom ligand)
Sets the order of a specified ligand.

Parameters:
order - the order to set, order should be greater than 0.
ligand - the ligand to set the order on
Returns:
true if the order is successfully set, false otherwise when the ligand is not an existing ligand of this atom or the order is bigger than the number of ligands.
Since:
Marvin 5.4, 08/21/2010

getBicycloStereo

public chemaxon.struc.BicycloStereoDescriptor[] getBicycloStereo()
Gets the bicyclo stereo information of this atom.

Returns:
the array of bicyclo stereo descriptors. Returns null if this atom has no stereo descriptor.
Since:
Marvin 5.5, 03/23/2011

setBicycloStereo

public void setBicycloStereo(chemaxon.struc.BicycloStereoDescriptor[] descriptors)
Registers the bicyclo stereo information for this atom.

Parameters:
descriptors - the array of bicyclo stereo descriptors
Since:
Marvin 5.5, 03/23/2011

setImplicitHBasedOnValence

public void setImplicitHBasedOnValence(chemaxon.core.calculations.valencecheck.Valence v)