Package chemaxon.struc
Class MolAtom
java.lang.Object
chemaxon.struc.MolAtom
- All Implemented Interfaces:
StereoConstants
,Serializable
- Direct Known Subclasses:
SgroupAtom
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:
- propertySet()
- propertyKeySet()
- removeProperty(String key)
- containsPropertyKey(String key)
- propertyCount()
- getProperty(String key)
- putProperty(String key, Object value)
- clearProperties()
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Atom map mask in flags.static final int
Maximum atom-atom mapping number.static final int
Atom map offset in flags.static final int
Aliphatic query atom.static final int
Include any Hydrogen atom.static final double
static final int
"Atomic number" of the any atom A.static final int
Aromatic query atom.static final int
Aromatic or aliphatic query atom.static final int
Number of atom types in the elements arraystatic final int
Maximum atom number.static final int
S-group attachment point on first and second site.static final int
There is no S-group attachment point setting on this atom.static final int
S-group attachment point informationstatic final int
S-group attachment point on first site.static final int
S-group attachment point on second site.protected int
Number of bonds.static final int
Hydrogen atom which is connected to a bridgehead atom.static final int
Include charged Hydrogen atom(s).static final int
Deprecated.static final int
Number of elements in the periodic systemstatic final int
Empty atom type.static final int
Valence checking will replace radicals with charges if this flag is set.static final int
Hydrogen atom wtih aMolBond.HYDROGEN
bond on it.static final int
Hydrogen atom(s) connected to another hydrogen only.static final int
"Atomic number" of the hetero any atom Q.static final int
S hybridization state.static final int
SP hybridization state.static final int
SP2 hybridization state.static final int
SP3 hybridization state.static final int
Unknown hybridization state.static final int
Include Hydrogen isotope(s).static final int
Implicit Hydrogen(s) are above the element symbol.static final int
Implicit Hydrogen(s) are below the element symbol.static final int
Implicit Hydrogen(s) are left to element symbol.static final int
Implicit Hydrogen(s) are right to element symbol.static final int
"Atomic number" of the inclusive atom list.static final int
Include lonely Hydrogen atom(s).static final int
"Atomic number" of the lone pair.static final int
Mapped Hydrogen atom(s).static final int
Hydrogen atom(s) connected to metal.static final int
"Atomic number" of a central atom of a MulticenterSgroup.static final int
"Atomic number" of the exclusive atom list.static final int
Omit arranging process after the hydrogen addition.static final int
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 final int
"Atomic number" of a pseudoatom.static final int
Radical's free electron count bits in flags for valid radical values.static final int
Radical value bits in flags.static final int
Radical value offset in flags.static final int
Monovalent radical center.static final int
Divalent radical center.static final int
Divalent radical center with singlet electronic configuration.static final int
Divalent radical center with triplet electronic configuration.static final int
Trivalent radical center.static final int
Trivalent radical center with doublet electronic configuration.static final int
Trivalent radical center with quartet electronic configuration.static final int
Invalid value for radical center for students.static final char
static final int
Include radical Hydrogen atom(s).static final int
Maximum residue sequence number is currently 8191.static final int
Maximum residue type is currently 63.static final int
"Atomic number" of the Rgroup query "atom".static final int
"Atomic number" of an ordered R-group attachment point.static final int
Maximum R-group number (32767).static final int
The stereo configuration of the atom is inverted during the reaction.static final int
The stereo configuration of the atom is not considered during the reaction.static final int
The stereo configuration of the atom is retained during the reaction.static final int
Maximum atom set sequence number is currently 63.static final int
"Atomic number" of an Sgroup.static final int
Hydrogen atom which is the only atom in an Sgroup.static final int
Hydrogen atom which have a neighbor that is in a SuperatomSgroup.static final int
Option flag to express daylight-type smarts atom parsing of H.static final int
Option flag to express marvin-pre-3.5-type smarts atom parsing of H.static final int
"Atomic number" of the star atom.static final int
Atom symbol string for CxSMILES export.static final int
Atom symbol string contains explicit H count if this flag is set.static final int
Atom symbol string contains implicit H count is shown flag is set.static final int
Atom symbol string for Molfile export.static final int
Atom symbol string does not contain the charge if this flag is set.static final int
Atom symbol string for SMILES export.static final int
Atom symbol is shown in square brackets if this flag is set.protected MolBond[]
The bonds.static final int
Atom aromaticity is not specified explicitly.static final int
Valence checked if this flag is set.static final int
The atom has valence error if this flag is set.static final int
Hydrogen atom(s) connected to an atom which have valence error.static final int
Hydrogen atom(s) with wedge bonds.protected double
X coordinate.protected double
Y coordinate.protected double
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_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Add a bond if it had not been already added.addRgroupAttachmentPoint
(int order, int bondtype) Attaches a new R-group attachment point to this atom by a bond of a specified type.bonds()
Provides an unmodifiable list view of the connected bonds of the atom.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
Clears the extra label.void
Removes all properties from this atom.void
Clears query props.clone()
Clones the atom.boolean
Returns true if this atom has a mapping for the specified property key.protected int
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
Decrements the value of a query property.int
Decrements the value of the valence property.static int
electronegOf
(int z) Gets 10 times the electronegativity value for the specified element.Gets the alias string or pseudo atom type string for pseudo atoms.final int
getAtno()
Gets the atomic number.static int
getAtomicNumber
(String element) Deprecated.As of Marvin 5.9, replaced by a similar methodPeriodicSystem.findAtomicNumber(String)
.
The recommended method does not work for symbol not representing a chemical element (e.g.int
Gets the atom-atom mapping number.getAtomSymbol
(int opts, int aflags, int[] lcenter, CTransform3D preTransform) Gets the string representation of the atom symbol.int
Deprecated.as of Marvin 6.0 replaced bySuperatomSgroup.getAttachmentPointOrders(MolAtom)
.int
Gets the attachment information stored in the extra atom propertiesGets the smallest containing sgroup which can have the attachment point information of this atom.Gets the previously stored bicyclo stereo information of this atom.final MolBond
getBond
(int i) Gets the i-th bond.MolBond[]
Gets the bonds connected to this atom.final int
Gets the number of bonds/ligands.final MolBond
Finds the bond that connects this atom to another atom.int
Gets the charge.double
static int
getColumn
(int z) The column or group of an element in the periodic system.int
Returns the number of lone pairs on this atom.int
Gets number of hydrogen connections.Gets the label string (also called atom value): "result" or "result1|result2".long
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
int
getFlags()
Gets flags.int
Gets the hybridization state.int
Gets the number of implicit hydrogens attached.int
getImplicitHCount
(boolean runVCIfNeeded) Gets the implicit Hydrogen count of the atom.final MolAtom
getLigand
(int i) Gets the i-th ligand of this atom.final 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.final MolAtom[]
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.final DPoint3
Gets the coordinates.final void
Gets the coordinates.protected final Object
getLock()
Get lock object for synchronization.int
Returns the automatically calculated lone pair count of this atom.double
getMass()
Gets the atomic weight.int
Gets the mass number.int
Gets the maximum number of repetitions for a link atom.int
Gets the minimum number of repetitions for a link node.int
Gets the number of implicit hydrogens attached.final MoleculeGraph
Return the molecule graph that contains this atom.int
getPreferredLabelDir
(CTransform3D pretr, int h) Gets the preferred direction for an additional label.getProperty
(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.Gets a query property.int
getQPropAsInt
(String name) Gets a query property as an integer.int[]
getQPropMinMax
(String name) Gets the minimum and maximum possible values of a query property.String[]
Gets the names of query properties with non-null values.Gets the names of query properties with non-null values, or null if no query properties are set.int
Gets the aromatic/aliphatic query property.Gets the string representation of the query atomDeprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bygetQueryString()
Returns s the query string assigned to this atom.int
Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2.int
Gets the number of free electrons.Gets theAtomProperty.Radical
enum value that represents the radical of the atom.int
Gets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.final int
Gets the number of bonds connected to "real" atoms.int
Check negativity compared to the neighbors.int
Gets the residue atom identifier.int
Gets the residue sequence number.int
Gets the residue type.int
Gets the R-group ID.int
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
Gets the atom set sequence number.boolean
Reports double bond stereo care information on the connected bonds.int
Gets the stereochemical group number for AND and OR groups of the enhanced stereo representation.int
Gets the stereochemical group type for the enhanced stereo representation.Gets the element symbol.getTemporaryObject
(String key) Gets a temporary object.int
Gets the valence.int
Gets the valence property.int[]
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.final boolean
Tests whether the atom has aromatic bonds.boolean
boolean
Does it have query properties?final boolean
Tests whether the atom has query bonds ("ANY" bonds).boolean
hasSameCharge
(int charge) final boolean
Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.hasSMARTSProps(MolAtom atom)
final boolean
hasSMARTSPropsExcluding
(String exclude) Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.hasSMARTSPropsExcluding(MolAtom atom, String exclude)
boolean
Returns previously set valence error.final boolean
Tests whether the atom has a wedged bond.boolean
Tests if two atoms have the same properties.boolean
Checks if two atoms have similar bonds.int
Increments the value of a query property.int
Increments the value of the query aromaticity property.int
Increments the value of the valence property.int
Returns the index of the specified bond in this atom.protected final int
indexOfReferenced
(MolBond bond) Returns the index of the referenced bond in this atom.protected void
insertBond
(int i, MolBond bond) Inserts a bond at a specified index.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
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).final boolean
Checks if this MolAtom is connected to another one or not.boolean
boolean
Tests whether the atom is a generic atom.boolean
isImplicitizableH
(int f) Tests whether the hydrogen atom is implicitizable or not.boolean
The atom is a link node if the maximum number of repetitions is nonzero.boolean
Checks if this atom it a mappable.static int
isotopeType
(int z, int a) Gets the type of an isotope.boolean
boolean
isPseudo()
Tests whether if the atom is a pseudo atom.boolean
isQProp()
Tests whether this object represents a query property.final 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
Tests whether this atom is selected.boolean
Tests whether special symbol is used.boolean
Tests whether special symbol is used.boolean
Determines whether it is a terminal atom or not.ligands()
Provides an unmodifiable list view of the ligands of the atom.static int
maxAbsOxStateOf
(int z) Gets the oxidation state that has the maximum absolute valuevoid
moveCorners
(double diffx, double diffy) Translates the coordinates of the atom label.static 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
Deprecated.As of Marvin 5.9, replaced by a similar methodPeriodicSystem.findAtomicNumber(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
Returns the number of property (property key - property value) mappings of this atom.Returns a set view of the property keys of this atom.Returns a collection view of the properties (property key - property value mappings) of this atom.void
putProperty
(String key, Object value) Associates the specified value with the specified key at this atom.void
Query property checking.protected void
Removes all bonds.protected void
removeAllBonds
(boolean clearFromAttachmentPoints) Removes all bonds.protected void
removeBond
(int i) Removes a bond.protected void
removeBond
(int i, boolean clearFromAttachmentPoints) Removes a bond.protected void
removeBond
(MolBond bond) Removes a bond by reference.protected void
removeBond
(MolBond bond, boolean clearFromAttachmentPoints) Removes a bond by reference.removeProperty
(String key) Removes the mapping for this property key from this atom if present.static String
residueSymbolOf
(int id) Gets the name of a residue.static int
residueTypeOf
(String name) Gets the residue identifier for a residue name.void
Set all atom properties except the coordinates.void
Sets the alias string or pseudo atom type string for pseudo atoms.void
setAtno
(int z) Sets the atomic number.protected static void
Sets the first atom of a bond.protected static void
Sets the second atom of a bond.void
setAtomMap
(int map) Sets the atom-atom mapping number.void
setAttach
(int a) Deprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom)
, orSuperatomSgroup.addAttachmentPoint(MolAtom, int)
.void
Deprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom)
, orSuperatomSgroup.addAttachmentPoint(MolAtom, int)
.void
setAttachParentSgroup
(Sgroup sgroup) Sets the attach parent s-group information to the extra atom propertiesvoid
setBicycloStereo
(BicycloStereoDescriptor[] descriptors) Registers the bicyclo stereo information for this atom.void
setCharge
(int q) Sets the charge.void
setChargeAngle
(double angle) To be called when user changes charge position.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
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
Deprecated.as of Marvin 6.3.void
setHybridizationState
(int h) Sets the hybridization state.void
setImplicitHBasedOnValence
(chemaxon.core.calculations.valencecheck.Valence v) Deprecated.as of Marvin 6.0.1, exists only for internal usage
Usage:void
setImplicitHcount
(int h) Sets the number of implicit hydrogens.protected void
setIsValenceCheckNeeded
(boolean isValenceCheckNeeded) Sets the boolean value ifisValenceCheckNeeded
.boolean
setLigandOrder
(int order, MolAtom ligand) Sets the order of a specified ligand.void
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
Sets the coordinates.void
setMassno
(int a) Sets the mass number.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
Sets a query property as an integer.void
Sets a query property.void
setQueryAromaticity
(int x) Sets the aromatic/aliphatic query property.void
Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.setQuerystr(MolAtom atom, String s)
andsetQueryString(String)
.void
setQuerystr
(String s, int options) Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.setQuerystr(MolAtom atom, String s, int options)
andsetQueryString(String)
.void
setQueryString
(String queryString) Assigns the query string to this atom.void
setRadical
(int r) Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2.void
setRadicalValue
(AtomProperty.Radical radical) 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
Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.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.final int
Calculate the size of smallest ring containing this atom.void
storeTemporaryObject
(String key, Object val) Stores an object temporarily.static String
symbolOf
(int z) Gets the element symbol for the specified atomic number.static String
symbolOf
(int z, int a) Gets the special element symbol for the specified atomic and mass numbers.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
Valence checking.
-
Field Details
-
ANGLE_STEP
public static final double ANGLE_STEP- See Also:
-
LONELY_H
public static final int LONELY_HInclude 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:
-
ISOTOPE_H
public static final int ISOTOPE_HInclude Hydrogen isotope(s).- Since:
- Marvin 3.1
- See Also:
-
CHARGED_H
public static final int CHARGED_HInclude charged Hydrogen atom(s).- Since:
- Marvin 3.1
- See Also:
-
RADICAL_H
public static final int RADICAL_HInclude radical Hydrogen atom(s).- Since:
- Marvin 3.1
- See Also:
-
MAPPED_H
public static final int MAPPED_HMapped Hydrogen atom(s).- Since:
- Marvin 3.1
- See Also:
-
WEDGED_H
public static final int WEDGED_HHydrogen atom(s) with wedge bonds.- Since:
- Marvin 4.0
- See Also:
-
HCONNECTED_H
public static final int HCONNECTED_HHydrogen atom(s) connected to another hydrogen only.- Since:
- Marvin 4.0
- See Also:
-
CTSPECIFIC_H
Deprecated.As of Marvin 5.11
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:
-
POLYMERENDGROUP_H
public static final int POLYMERENDGROUP_HHydrogen 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:
-
SGROUPEND_H
public static final int SGROUPEND_HHydrogen 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:
-
VALENCEERROR_H
public static final int VALENCEERROR_HHydrogen 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:
-
SGROUP_H
public static final int SGROUP_HHydrogen atom which is the only atom in an Sgroup.- Since:
- Marvin 5.10 05/11/2012
- See Also:
-
BRIDGEHEAD_H
public static final int BRIDGEHEAD_HHydrogen atom which is connected to a bridgehead atom.- Since:
- Marvin 5.11 08/01/2012
- See Also:
-
HBONDED_H
public static final int HBONDED_HHydrogen atom wtih aMolBond.HYDROGEN
bond on it.- Since:
- Marvin 6.1 15/07/2013
- See Also:
-
OMIT_POSTCLEAN
public static final int OMIT_POSTCLEANOmit arranging process after the hydrogen addition.- See Also:
-
chemaxon.calculations.hydrogenize.Hydrogenize#convertImplicitHToExplicit(MoleculeGraph, int)
- Constant Field Values
-
METALCONNECTED_H
public static final int METALCONNECTED_HHydrogen atom(s) connected to metal.- Since:
- Marvin 16.1.25
- See Also:
-
ALL_H
public static final int ALL_HInclude any Hydrogen atom.- Since:
- Marvin 4.1.3, 11/09/2006
- See Also:
-
ELEMENT_COUNT
public static final int ELEMENT_COUNTNumber of elements in the periodic system- See Also:
-
EMPTY
public static final int EMPTYEmpty atom type. Useful for bond drawing.- See Also:
-
LIST
public static final int LIST"Atomic number" of the inclusive atom list.- See Also:
-
NOTLIST
public static final int NOTLIST"Atomic number" of the exclusive atom list.- See Also:
-
LP
public static final int LP"Atomic number" of the lone pair.- See Also:
-
ANY
public static final int ANY"Atomic number" of the any atom A. Represents any atom except hydrogen.- See Also:
-
HETERO
public static final int HETERO"Atomic number" of the hetero any atom Q.- See Also:
-
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:
-
RGROUP
public static final int RGROUP"Atomic number" of the Rgroup query "atom".- See Also:
-
SGROUP
public static final int SGROUP"Atomic number" of an Sgroup.- See Also:
-
PSEUDO
public static final int PSEUDO"Atomic number" of a pseudoatom. The atom type string of a pseudo atom can be obtained by thegetAliasstr()
method.- Since:
- Marvin 3.5, 07/22/2004
- See Also:
-
MULTICENTER
public static final int MULTICENTER"Atomic number" of a central atom of a MulticenterSgroup.- Since:
- Marvin 5.0, 01/05/2007
- See Also:
-
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:
-
ATOM_TYPE_MAX
public static final int ATOM_TYPE_MAXMaximum atom number.- See Also:
-
ATOM_TYPE_COUNT
public static final int ATOM_TYPE_COUNTNumber of atom types in the elements array- See Also:
-
HS_UNKNOWN
public static final int HS_UNKNOWNUnknown hybridization state.- See Also:
-
HS_S
public static final int HS_SS hybridization state. Line configuration.- See Also:
-
HS_SP
public static final int HS_SPSP hybridization state.- See Also:
-
HS_SP2
public static final int HS_SP2SP2 hybridization state. Planar configuration.- See Also:
-
HS_SP3
public static final int HS_SP3SP3 hybridization state. Tetrahedral configuration.- See Also:
-
RGROUP_MAX
public static final int RGROUP_MAXMaximum R-group number (32767).- See Also:
-
RAD_OFF
public static final int RAD_OFFRadical value offset in flags.- Since:
- Marvin 3.0
- See Also:
-
RAD_MASK
public static final int RAD_MASKRadical value bits in flags.- Since:
- Marvin 3.0
- See Also:
-
RAD_COUNT_MASK
public static final int RAD_COUNT_MASKRadical's free electron count bits in flags for valid radical values.- Since:
- Marvin 3.0
- See Also:
-
RAD1
public static final int RAD1Monovalent radical center.- Since:
- Marvin 3.0
- See Also:
-
RAD2
public static final int RAD2Divalent radical center.- Since:
- Marvin 3.0
- See Also:
-
RAD2_SINGLET
public static final int RAD2_SINGLETDivalent radical center with singlet electronic configuration.- Since:
- Marvin 3.0
- See Also:
-
RAD2_TRIPLET
public static final int RAD2_TRIPLETDivalent radical center with triplet electronic configuration.- Since:
- Marvin 3.0
- See Also:
-
RAD3
public static final int RAD3Trivalent radical center.- Since:
- Marvin 3.0
- See Also:
-
RAD3_DOUBLET
public static final int RAD3_DOUBLETTrivalent radical center with doublet electronic configuration.- Since:
- Marvin 4.0.2, 08/22/2005
- See Also:
-
RAD3_QUARTET
public static final int RAD3_QUARTETTrivalent radical center with quartet electronic configuration.- Since:
- Marvin 4.0.2, 08/22/2005
- See Also:
-
RAD4
public static final int RAD4Invalid value for radical center for students.- Since:
- Marvin 5.8
- See Also:
-
AAMAP_MAX
public static final int AAMAP_MAXMaximum atom-atom mapping number.- See Also:
-
AAMAP_OFF
public static final int AAMAP_OFFAtom map offset in flags.- See Also:
-
AAMAP_MASK
public static final int AAMAP_MASKAtom map mask in flags.- See Also:
-
SETSEQ_MAX
public static final int SETSEQ_MAXMaximum atom set sequence number is currently 63.- Since:
- Marvin 3.0
- See Also:
-
RESTYPE_MAX
public static final int RESTYPE_MAXMaximum residue type is currently 63.- Since:
- Marvin 3.0
- See Also:
-
RESSEQ_MAX
public static final int RESSEQ_MAXMaximum residue sequence number is currently 8191.- Since:
- Marvin 3.0
- See Also:
-
RXNSTEREO_NONE
public static final int RXNSTEREO_NONEThe stereo configuration of the atom is not considered during the reaction.- Since:
- Marvin 3.0
- See Also:
-
RXNSTEREO_INVERSION
public static final int RXNSTEREO_INVERSIONThe stereo configuration of the atom is inverted during the reaction.- Since:
- Marvin 3.0
- See Also:
-
RXNSTEREO_RETENTION
public static final int RXNSTEREO_RETENTIONThe stereo configuration of the atom is retained during the reaction.- Since:
- Marvin 3.0
- See Also:
-
UNSPECIFIED_AROMATICITY
public static final int UNSPECIFIED_AROMATICITYAtom aromaticity is not specified explicitly.- Since:
- Marvin 3.3
- See Also:
-
AROMATIC
public static final int AROMATICAromatic query atom.- Since:
- Marvin 3.3
- See Also:
-
ALIPHATIC
public static final int ALIPHATICAliphatic query atom.- Since:
- Marvin 3.3
- See Also:
-
AROMATIC_OR_ALIPHATIC
public static final int AROMATIC_OR_ALIPHATICAromatic or aliphatic query atom.- Since:
- Marvin 3.3
- See Also:
-
ATTACH_NONE
public static final int ATTACH_NONEThere is no S-group attachment point setting on this atom.- Since:
- Marvin 5.11
- See Also:
-
ATTACH1
public static final int ATTACH1S-group attachment point on first site.- Since:
- Marvin 3.1
- See Also:
-
ATTACH2
public static final int ATTACH2S-group attachment point on second site.- Since:
- Marvin 3.1
- See Also:
-
ATTACH_BOTH
public static final int ATTACH_BOTHS-group attachment point on first and second site.- Since:
- Marvin 3.1
- See Also:
-
ATTACH_UNKNOWN
public static final int ATTACH_UNKNOWNS-group attachment point information -
SMARTS_H_DAYLIGHT_COMP_MODE
public static final int SMARTS_H_DAYLIGHT_COMP_MODEOption 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:
-
SMARTS_H_MARVIN_COMP_MODE
public static final int SMARTS_H_MARVIN_COMP_MODEOption 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:
-
LDIR_RIGHT
public static final int LDIR_RIGHTImplicit Hydrogen(s) are right to element symbol.- Since:
- Marvin 4.0, 02/16/2005
- See Also:
-
LDIR_LEFT
public static final int LDIR_LEFTImplicit Hydrogen(s) are left to element symbol.- Since:
- Marvin 4.0, 02/16/2005
- See Also:
-
LDIR_ABOVE
public static final int LDIR_ABOVEImplicit Hydrogen(s) are above the element symbol.- Since:
- Marvin 4.0, 02/16/2005
- See Also:
-
LDIR_BELOW
public static final int LDIR_BELOWImplicit Hydrogen(s) are below the element symbol.- Since:
- Marvin 4.0, 02/16/2005
- See Also:
-
SYM_SQBRACKETS
public static final int SYM_SQBRACKETSAtom symbol is shown in square brackets if this flag is set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_IMPLH
public static final int SYM_IMPLHAtom symbol string contains implicit H count is shown flag is set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_EXPLH
public static final int SYM_EXPLHAtom symbol string contains explicit H count if this flag is set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_NEUTRAL
public static final int SYM_NEUTRALAtom symbol string does not contain the charge if this flag is set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_SMARTS
public static final int SYM_SMARTSAtom symbol string for SMILES export. Forces SMARTS query string. Only meaningful ifSYM_SQBRACKETS
is also set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_MOLEX
public static final int SYM_MOLEXAtom symbol string for Molfile export. SMARTS string with A/a property shown always. Only meaningful ifSYM_SQBRACKETS
is also set.- Since:
- Marvin 4.0, 05/10/2005
- See Also:
-
SYM_CX
public static final int SYM_CXAtom symbol string for CxSMILES export. CxSMILES string may contain aromatic boron atom which is written as 'b'. Only meaningful ifSYM_SQBRACKETS
is also set.- Since:
- Marvin 5.2.1, 09/03/2009
- See Also:
-
VALENCE_CHECKED
public static final int VALENCE_CHECKEDValence checked if this flag is set.- See Also:
-
VALENCE_ERROR
public static final int VALENCE_ERRORThe atom has valence error if this flag is set.- See Also:
-
FIX_CHARGE
public static final int FIX_CHARGEValence checking will replace radicals with charges if this flag is set.- See Also:
-
bondCount
protected transient int bondCountNumber of bonds. -
theBonds
The bonds. -
xCoordinate
protected transient double xCoordinateX coordinate. -
yCoordinate
protected transient double yCoordinateY coordinate. -
zCoordinate
protected transient double zCoordinateZ coordinate. -
RADICAL_CHAR
public static final char RADICAL_CHAR- See Also:
-
-
Constructor Details
-
MolAtom
public MolAtom(int zZ, double x, double y, double z) Construct an atom. Given atomic number is not checked for speed consideration. UsecheckAtno(int)
to check whether the atomic number is valid.- Parameters:
zZ
- the atomic numberx
- the x coordinatey
- the y coordinatez
- the z coordinate- See Also:
-
MolAtom
public MolAtom(double x, double y) Construct a carbon atom at the specified location.- Parameters:
x
- the x coordinatey
- 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. UsecheckAtno(int)
to check whether the atomic number is valid.- Parameters:
z
- the atomic number- See Also:
-
-
Method Details
-
getParent
Return the molecule graph that contains this atom.- Returns:
- the parent graph
-
indexOf
Returns the index of the specified bond in this atom. This method uses MolBond.equals() for the bond comparison.- Parameters:
bond
- bond reference- Returns:
- the bond index
- See Also:
-
indexOfReferenced
Returns the index of the referenced bond in this atom. This method uses == for the bond comparison!- Returns:
- the index of the referenced bond in this atom
-
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
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
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:
-
getBondTo
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
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:
-
sringsize
public final int sringsize()Calculate the size of smallest ring containing this atom. Coordinative bonds are used in ring traversal but Hydrogen bonds are not.- Returns:
- the smallest ring size or Integer.MAX_VALUE if this atom is not in ring
-
getLock
Get lock object for synchronization.- Returns:
- reference to the top parent graph
-
setAtom1
Sets the first atom of a bond. Use it from derived classes.- Parameters:
bond
- the bondnewatom
- the new atom value
-
setAtom2
Sets the second atom of a bond. Use it from derived classes.- Parameters:
bond
- the bondnewatom
- the new atom value
-
haveSimilarBonds
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:
-
getBondCount
public final int getBondCount()Gets the number of bonds/ligands.- Returns:
- the number of bonds
- Since:
- Marvin 3.0
-
getBond
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
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 Angstromsy
- the y coordinate in Angstroms
-
setXYZ
public void setXYZ(double x, double y, double z) Sets the coordinates.- Parameters:
x
- the x coordinate in Angstromsy
- the y coordinate in Angstromsz
- the z coordinate in Angstroms
-
getLocation
Gets the coordinates.- Returns:
- the location
-
getLocation
Gets the coordinates.- Parameters:
p
- object that will store the location
-
setLocation
Sets the coordinates.- Parameters:
p
- the location
-
transform
Apply a transformation matrix to the coordinates.- Parameters:
t
- the transformation matrixincg
- graph invariants are changed (true) or not (false)- Since:
- Marvin 4.0.2, 10/26/2005
-
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. UsecheckAtno(int)
to check whether the the atomic number is valid.- Parameters:
z
- the atomic number- See Also:
-
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:
-
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
Deprecated.as of Marvin 6.3. usesetSpecIsotopeSymbolPreferred(boolean)
andsetMassno(int)
instead.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
-
getMass
public double getMass()Gets the atomic weight.- Returns:
- the atomic weight
-
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 atomfalse
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
-
setIsValenceCheckNeeded
protected void setIsValenceCheckNeeded(boolean isValenceCheckNeeded) Sets the boolean value ifisValenceCheckNeeded
.- Since:
- 6.0.1.
-
getImplicitHCount
public int getImplicitHCount(boolean runVCIfNeeded) Gets the implicit Hydrogen count of the atom. If there has been some valence changing modification since the latest valence check call then with calling the method with true parameter it will perform valence checking on this atom.- Returns:
- the implicit hydrogen count or the number of query hydrogens
- Since:
- Marvin 6.0.1. 2013.06.12.
-
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, usevalenceCheck()
before this method or callgetImplicitHCount(boolean)
instead. The result is always a non-negative number.- Returns:
- the implicit hydrogen count or the number of query hydrogens
- See Also:
-
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:
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
-
hasCharge
public boolean hasCharge() -
hasSameCharge
public boolean hasSameCharge(int charge) -
setCharge
public void setCharge(int q) Sets the charge. This function does not call valence checking to set implicit Hydrogen count due to charge change.- 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
Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2. usegetRadicalValue()
insteadGets the radical value.- Returns:
- the radical value
- Since:
- Marvin 3.0
- See Also:
-
getRadicalValue
Gets theAtomProperty.Radical
enum value that represents the radical of the atom.- Returns:
- the enum value of the radical
-
setRadical
Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2. UsesetRadicalValue(AtomProperty.Radical)
instead.Sets the radical value.- Parameters:
r
- the radical value- Since:
- Marvin 3.0
- See Also:
-
setRadicalValue
Sets the radical value.- Parameters:
radical
- the new radical- Since:
- Marvin 6.2. 2013/11/07
- See Also:
-
getRadicalCount
public int getRadicalCount()Gets the number of free electrons. -
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:
-
getQProp
Gets a query property.- "H": number of hydrogen substituents
- "h": number of implicit hydrogen substituents
- "X": number of connections (including hydrogens)
- "D": number of non-hydrogen substituents (H isotopes are included) - identical to "s" except for "s*"
- "s": number of non-hydrogen substituents (H isotopes are included): -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
- "R": number of rings - [R] (ring atom) is represented by value 256
- "r": smallest ring size - [r] (ring atom) is represented by value 256
- "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
- "a": deprecated, use
getQueryAromaticity()
instead - "u": unsaturated atom: 1 = on
- "c": component number
- Parameters:
name
- the property name- Returns:
- the value of the property or null if not set
-
getQPropAsInt
Gets a query property as an integer.- "H": number of hydrogen substituents
- "h": number of implicit hydrogen substituents
- "X": number of connections (including hydrogens)
- "D": number of non-hydrogen substituents (H isotopes are included) - identical to "s" except for "s*"
- "s": number of non-hydrogen substituents (H isotopes are included): -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
- "R": number of rings - [R] (ring atom) is represented by value 256
- "r": smallest ring size - [r] (ring atom) is represented by value 256
- "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
- "a": deprecated, use
getQueryAromaticity()
instead - "u": unsaturated atom: 1 = on
- "c": component number
- Parameters:
name
- the property name- Returns:
- the value of the property or -1 if not set
- See Also:
-
getQPropMinMax
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
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
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
Sets a query property.- "H": number of hydrogen substituents
- "h": number of implicit hydrogen substituents
- "X": number of connections (including hydrogens)
- "D": number of non-hydrogen substituents (H isotopes are included) - identical to "s" except for "s*"
- "s": number of non-hydrogen substituents (H isotopes are included): -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
- "R": number of rings - [R] (ring atom) is represented by value 256
- "r": smallest ring size - [r] (ring atom) is represented by value 256
- "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
- "a": deprecated, use
getQueryAromaticity()
instead - "u": unsaturated atom: 1 = on
- "c": component number
- Parameters:
name
- the property namev
- the value- See Also:
-
setQProp
Sets a query property as an integer.- "H": number of hydrogen substituents
- "h": number of implicit hydrogen substituents
- "X": number of connections (including hydrogens)
- "D": number of non-hydrogen substituents (H isotopes are included) - identical to "s" except for "s*"
- "s": number of non-hydrogen substituents (H isotopes are included): -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
- "R": number of rings - [R] (ring atom) is represented by value 256
- "r": smallest ring size - [r] (ring atom) is represented by value 256
- "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
- "a": deprecated, use
getQueryAromaticity()
instead - "u": unsaturated atom: 1 = on
- "c": component number
- Parameters:
name
- the property namev
- the value or -1
-
clearQProps
public void clearQProps()Clears query props.- Since:
- Marvin 3.4
-
getQPropNames
Gets the names of query properties with non-null values.- Since:
- Marvin 4.1, 03/21/2006
-
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
orAROMATIC_OR_ALIPHATIC
- Since:
- Marvin 3.3
-
setQueryAromaticity
public void setQueryAromaticity(int x) Sets the aromatic/aliphatic query property.- Parameters:
x
-UNSPECIFIED_AROMATICITY
,AROMATIC
,ALIPHATIC
orAROMATIC_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:
- R-group number, between 0 and
RGROUP_MAX
-
setRgroup
public void setRgroup(int r) Sets the R-group ID.- Parameters:
r
- R-group number, between 0 andRGROUP_MAX
-
getAttach
Deprecated.as of Marvin 6.0 replaced bySuperatomSgroup.getAttachmentPointOrders(MolAtom)
.
If the atom takes place in a Superatom S-group then it's attachment point orders can be reached through the Superatom S-group.Gets the S-group attachment point information.- Returns:
ATTACH_NONE
(not an S-group attachment point),ATTACH1
(first),ATTACH2
(second),ATTACH_BOTH
(both), orATTACH_UNKNOWN
if the attachment information can not be specified. This last one basicly happens when the atom takes place in a newly built SuperatomSgroup and has more than two attachment points.
-
getAttachFromExtraAtomProp
public int getAttachFromExtraAtomProp()Gets the attachment information stored in the extra atom properties- Returns:
- the attachment point information
-
setAttach
Deprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom)
, orSuperatomSgroup.addAttachmentPoint(MolAtom, int)
.Sets the S-group attachment point information.- Parameters:
a
-ATTACH_NONE
(not an S-group attachment point),ATTACH1
(first),ATTACH2
(second) orATTACH_BOTH
(both)
-
setAttach
Deprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom)
, orSuperatomSgroup.addAttachmentPoint(MolAtom, int)
.Sets the S-group attachment point information for an S-group attachment atom.- Parameters:
newOrder
-ATTACH_NONE
(not an S-group attachment point),ATTACH1
(first),ATTACH2
(second) orATTACH_BOTH
(both)sg
- the parent S-group or null- Since:
- Marvin 3.5, 10/11/2004
-
setAttachParentSgroup
Sets the attach parent s-group information to the extra atom properties -
getAttachParentSgroup
Gets the smallest containing sgroup which can have the attachment point information of this atom.- Returns:
- the parent sgroup or
null
if the atom is not in an sgroup - 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 bysetHybridizationState(int)
is not overwritten accidentally. \br To calculate and set the hybridization state for this and all other atoms in a moecule callMoleculeGraph.calcHybridization()
.- Returns:
- the hybridization state
- See Also:
-
setHybridizationState
public void setHybridizationState(int h) Sets the hybridization state.- Parameters:
h
- the hybridization state- See Also:
-
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:
-
getSetSeq
public int getSetSeq()Gets the atom set sequence number.- Returns:
- a number between 0 and SETSEQ_MAX
- See Also:
-
setSetSeq
public void setSetSeq(int id) Sets the atom set sequence number.- Parameters:
id
- a number between 0 and SETSEQ_MAX- See Also:
-
setExtraLabelSetSeq
public void setExtraLabelSetSeq(int id) -
getExtraLabelSetSeq
public int getExtraLabelSetSeq() -
residueTypeOf
Gets the residue identifier for a residue name.- Parameters:
name
- residue name- Returns:
- the residue type
- Since:
- Marvin 3.1.4
-
residueSymbolOf
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:
-
setResidueType
public void setResidueType(int t) Sets the residue type.- Parameters:
t
- the residue type- See Also:
-
getResidueSeq
public int getResidueSeq()Gets the residue sequence number.- Returns:
- the residue sequence number
- See Also:
-
setResidueSeq
public void setResidueSeq(int n) Sets the residue sequence number.- Parameters:
n
- the residue sequence number- See Also:
-
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:
-
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:
-
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
-
bondweights
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 vectort
- the rotation matrix
-
getAtomSymbol
Gets the string representation of the atom symbol.- Parameters:
opts
- combination of SYM_* flagsaflags
- atom flagspreTransform
- viewing transformationlcenter
- if not null, then its first two element (index 0-1) will be set to the index and the length of the element symbol substring in the returned string, the element 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:
-
getQueryLabel
Gets the string representation of the query atom- Returns:
- the string representation
- Since:
- Marvin 3.0
-
getPreferredLabelDir
Gets the preferred direction for an additional label.- Parameters:
pretr
- viewing transformationh
- hydrogen count for hydrogen label display, 0 otherwise- Returns:
LDIR_RIGHT
,LDIR_LEFT
,LDIR_ABOVE
orLDIR_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):- link node atom
- any atom
- heteroatom
- list atom
- not list atom
- rgroup atom
- known query properties: H,X,R,r,a,s,u,h,D,c,rb
-
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 and with no H-bond), 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:
-
isPseudo
public boolean isPseudo()Tests whether if the atom is a pseudo atom. To create a pseudo atom, set atom number (setAtno(int)
) toPSEUDO
and set the pseudo atom type string bysetAliasstr(String)
.- Returns:
true
if the atom is a pseudo atom,false
otherwise- Since:
- Marvin 3.3
- See Also:
-
isGeneric
public boolean isGeneric()Tests whether the atom is a generic atom. To create a generic atom, set atom number (setAtno(int)
) toPSEUDO
and set the pseudo atom type string bysetAliasstr(String)
to one of the following:- "AH" : Any atom including H
- "QH" : Any atom except C
- "M" : Any metal
- "MH" : Any metal or H
- "X" : Any halogen
- "XH" : Any halogen or H
- Returns:
true
if the atom is a generic atom,false
otherwise- Since:
- Marvin 5.0
- See Also:
-
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
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final boolean hasSMARTSProps()Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.hasSMARTSProps(MolAtom atom)
Tests whether it is a SMARTS query atom.- Returns:
true
if it has SMARTS properties,false
otherwise
-
hasSMARTSPropsExcluding
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final boolean hasSMARTSPropsExcluding(String exclude) Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.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
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setSMARTS(String s) throws SecurityException Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.setSMARTS(MolAtom atom, String s)
Sets SMARTS query string data.- Parameters:
s
- the SMARTS string- Throws:
SecurityException
- the SmilesImport cannot be loaded, possibly because of a misconfigured firewall
-
getQuerystr
Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bygetQueryString()
Gets the query properties.- Returns:
- the query string
-
setQuerystr
Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.setQuerystr(MolAtom atom, String s)
andsetQueryString(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
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setQuerystr(String s, int options) Deprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.setQuerystr(MolAtom atom, String s, int options)
andsetQueryString(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 stringoptions
- 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:
-
setQueryString
Assigns the query string to this atom.- Parameters:
queryString
- the query properties string to be assigned.- See Also:
-
getQueryString
Returns s the query string assigned to this atom.- Returns:
- the query string
- See Also:
-
setAliasstr
Sets the alias string or pseudo atom type string for pseudo atoms.- Parameters:
s
- the alias- See Also:
-
getAliasstr
Gets the alias string or pseudo atom type string for pseudo atoms.- Returns:
- the alias
- See Also:
-
setExtraLabel
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:
-
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 bitsrgb2
- the upper 32 bits- Since:
- Marvin 5.1.2
- See Also:
-
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 valuei
- is the result index (0 for first color, 1 for second color)- Returns:
- the label color
- Since:
- Marvin 5.1.2
- See Also:
-
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 listn
- 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:
-
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:
-
clear
public void clear()Clear query properties, charge, and hcount. -
clone
Clones the atom.
These are not cloned:- Bonds: their references do not change.
- Parent molecule: will be set to null.
- MDocument: Although the atomset information is cloned, when the cloned atom is taken to another MDocument, the format (color, font type) will be lost.
-
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. -
insideLabel
public boolean insideLabel(double x, double y) Tests whether the specified point is inside the atom label.- Parameters:
x
- the x coordinatey
- the y coordinate- Returns:
true
if inside,false
if outside
-
numOf
Deprecated.As of Marvin 5.9, replaced by a similar methodPeriodicSystem.findAtomicNumber(String)
.
The recommended method does not work for symbol that does not represent a chemical element (e.g. R-atom, any atom), as this method should not have worked on them either.Gets the atomic number of an element.- Parameters:
e
- the element name- Returns:
- the atomic number or zero if not found
-
getAtomicNumber
Deprecated.As of Marvin 5.9, replaced by a similar methodPeriodicSystem.findAtomicNumber(String)
.
The recommended method does not work for symbol not representing a chemical element (e.g. R-atom, any atom), as this method should not have worked on them either.Gets the atomic number of an element.- Parameters:
element
- the element name- Returns:
- the atomic number
- Throws:
IllegalArgumentException
- ifelement
does not correspond to a chemical element.
-
symbolOf
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
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 numbera
- the mass number- Returns:
- the symbol
- Since:
- Marvin 5.0, 10/12/2007
-
nameOf
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 numberk
- 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 numbert
- 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 numbera
- mass number- Returns:
- 0 if nonexistent, 1 if non-naturally occurring, 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 forAROMATIC
in most cases. 2 forAROMATIC
for the following atoms:- N, P and C- with 3 aromatic bonds
- N, P, C+ and C- with 2 aromatic bonds and an implicit H
- O, S ,Se ,Te with 2 aromatic bonds
ANY
andSINGLE_OR_AROMATIC
, 3 forSINGLE_OR_DOUBLE
, 4 forDOUBLE_OR_AROMATIC
.- Parameters:
countH
- bonds to explicit hydrogen atoms are counted iftrue
, not counted iffalse
all2
- use the value 2 for each bond (independently of type) iftrue
- 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. -
setCorners
public void setCorners(double xnw, double ynw, double xse, double yse) Used internally by MolPainter.- Parameters:
xnw
- north-west corner xynw
- north-west corner yxse
- south-east corner xyse
- 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:
-
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 flagsmask
- 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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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
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- Returns:
true
if valence check needed
-
pack
public void pack()Reduce memory usage. -
removeAllBonds
protected void removeAllBonds()Removes all bonds. -
removeAllBonds
protected void removeAllBonds(boolean clearFromAttachmentPoints) Removes all bonds. -
removeBond
Removes a bond by reference.- Parameters:
bond
- bond reference to remove
-
removeBond
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
-
removeBond
protected void removeBond(int i, boolean clearFromAttachmentPoints) 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 indexb
- second atom indexc
- third atom indexd
- 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:
-
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
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
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 objectval
- the object- Since:
- Marvin 5.3, 09/13/2009
-
getTemporaryObject
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:
-
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:
-
isAromaticSMILESSubset
public 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).- Parameters:
atno
- atomic number- Returns:
- true if the atom is the member of the aromatic subset.
- Since:
- Marvin 5.2 11/06/2008
-
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
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
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
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 property 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
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
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 associatedvalue
- 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:
-
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:
-
addRgroupAttachmentPoint
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. The atom must have a parent.- 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 or null if the atom has no parent.
- Since:
- Marvin 5.4
- See Also:
-
insertBond
Inserts a bond at a specified index.- Parameters:
i
- the index where to insert the bondbond
- the bond reference to insert- Since:
- Marvin 5.4, 08/21/2010
-
getLigandOrder
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
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
Gets the previously stored 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
Registers the bicyclo stereo information for this atom.- Parameters:
descriptors
- the array of bicyclo stereo descriptors- Since:
- Marvin 5.5, 03/23/2011
-
setImplicitHBasedOnValence
@Deprecated public void setImplicitHBasedOnValence(chemaxon.core.calculations.valencecheck.Valence v) Deprecated.as of Marvin 6.0.1, exists only for internal usage
Usage:Internal usage only.
-
getBondArray
Gets the bonds connected to this atom.- Returns:
- the array of bonds.
- Since:
- Marvin 6.0.1., 04/29/2013
-
setChargeAngle
public void setChargeAngle(double angle) To be called when user changes charge position. Angle is in radian and positive in I - II and negative in II - IV quadrants. Rounded to the closest multiply. -
getChargeAngle
public double getChargeAngle() -
isChargeAngleSet
public boolean isChargeAngleSet() -
ligands
Provides an unmodifiable list view of the ligands of the atom. It is a dynamic view, which follows every change of the molecule structure. However, you must not add or remove atoms or bonds during iteration. (This is not checked currently.)- Returns:
- a dynamic list view of the ligand atoms
-
bonds
Provides an unmodifiable list view of the connected bonds of the atom. It is a dynamic view, which follows every change of the molecule structure. However, you must not add or remove atoms or bonds during iteration. (This is not checked currently.)- Returns:
- a dynamic list view of the connected bonds
-
isPlainHydrogen
public boolean isPlainHydrogen()- Returns:
- true if the atom is plain Hydrogen (H or 1H)
-
Graph invariants are checked by default when calculating CIS/TRANS stereo, so this option is out of use.