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
FieldsModifier and TypeFieldDescriptionstatic final intAtom map mask in flags.static final intMaximum atom-atom mapping number.static final intAtom map offset in flags.static final intAliphatic query atom.static final intInclude any Hydrogen atom.static final doubleDeprecated.static final int"Atomic number" of the any atom A.static final intAromatic query atom.static final intAromatic or aliphatic query atom.static final intNumber of atom types in the elements arraystatic final intMaximum atom number.static final intS-group attachment point on first and second site.static final intThere is no S-group attachment point setting on this atom.static final intS-group attachment point informationstatic final intS-group attachment point on first site.static final intS-group attachment point on second site.protected intNumber of bonds.static final intHydrogen atom which is connected to a bridgehead atom.static final intInclude charged Hydrogen atom(s).static final intDeprecated.static final intNumber of elements in the periodic systemstatic final intEmpty atom type.static final intValence checking will replace radicals with charges if this flag is set.static final intHydrogen atom wtih aMolBond.HYDROGENbond on it.static final intHydrogen atom(s) connected to another hydrogen only.static final int"Atomic number" of the hetero any atom Q.static final intS hybridization state.static final intSP hybridization state.static final intSP2 hybridization state.static final intSP3 hybridization state.static final intUnknown hybridization state.static final intInclude Hydrogen isotope(s).static final intImplicit Hydrogen(s) are above the element symbol.static final intImplicit Hydrogen(s) are below the element symbol.static final intImplicit Hydrogen(s) are left to element symbol.static final intImplicit Hydrogen(s) are right to element symbol.static final int"Atomic number" of the inclusive atom list.static final intInclude lonely Hydrogen atom(s).static final int"Atomic number" of the lone pair.static final intMapped Hydrogen atom(s).static final intHydrogen 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 intOmit arranging process after the hydrogen addition.static final intHydrogen 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 intRadical's free electron count bits in flags for valid radical values.static final intRadical value bits in flags.static final intRadical value offset in flags.static final intMonovalent radical center.static final intDivalent radical center.static final intDivalent radical center with singlet electronic configuration.static final intDivalent radical center with triplet electronic configuration.static final intTrivalent radical center.static final intTrivalent radical center with doublet electronic configuration.static final intTrivalent radical center with quartet electronic configuration.static final intInvalid value for radical center for students.static final charDeprecated.static final intInclude radical Hydrogen atom(s).static final intMaximum residue sequence number is currently 8191.static final intMaximum 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 intMaximum R-group number (32767).static final intThe stereo configuration of the atom is inverted during the reaction.static final intThe stereo configuration of the atom is not considered during the reaction.static final intThe stereo configuration of the atom is retained during the reaction.static final intMaximum atom set sequence number is currently 63.static final int"Atomic number" of an Sgroup.static final intHydrogen atom which is the only atom in an Sgroup.static final intHydrogen atom which have a neighbor that is in a SuperatomSgroup.static final intOption flag to express daylight-type smarts atom parsing of H.static final intOption flag to express marvin-pre-3.5-type smarts atom parsing of H.static final int"Atomic number" of the star atom.static final intAtom symbol string for CxSMILES export.static final intAtom symbol string contains explicit H count if this flag is set.static final intAtom symbol string contains implicit H count is shown flag is set.static final intAtom symbol string for Molfile export.static final intAtom symbol string does not contain the charge if this flag is set.static final intAtom symbol string for SMILES export.static final intAtom symbol is shown in square brackets if this flag is set.protected MolBond[]The bonds.static final intAtom aromaticity is not specified explicitly.static final intValence checked if this flag is set.static final intThe atom has valence error if this flag is set.static final intHydrogen atom(s) connected to an atom which have valence error.static final intHydrogen atom(s) with wedge bonds.protected doubleX coordinate.protected doubleY coordinate.protected doubleZ 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAdd 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.voidbondweights(double[] w, CTransform3D t) Calculates the average of the bond unit vectors pointing out of this atom.static booleancheckAtno(int z) Check if the given atomic number is positive and less then atomic type maximum value.voidclear()Clear query properties, charge, and hcount.voidClears the extra label.voidRemoves all properties from this atom.voidClears query props.clone()Clones the atom.booleanReturns true if this atom has a mapping for the specified property key.protected intCounts all atoms represented by this atom.static doublecovalentRadiusOf(int z, int t) Gets the covalent radius in C-C bond length units.intDecrements the value of a query property.intDecrements the value of the valence property.static intelectronegOf(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 intgetAtno()Gets the atomic number.static intgetAtomicNumber(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.intGets the atom-atom mapping number.getAtomSymbol(int opts, int aflags, int[] lcenter, CTransform3D preTransform) Gets the string representation of the atom symbol.intDeprecated.as of Marvin 6.0 replaced bySuperatomSgroup.getAttachmentPointOrders(MolAtom).intGets 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 MolBondgetBond(int i) Gets the i-th bond.MolBond[]Gets the bonds connected to this atom.final intGets the number of bonds/ligands.final MolBondFinds the bond that connects this atom to another atom.intReturns the formal charge of the atom.doubleReturns the charge angle of the atom orDouble.NaNif it is not specified explicitly.static intgetColumn(int z) The column or group of an element in the periodic system.intReturns the number of lone pairs on this atom.intGets number of hydrogen connections.Gets the label string (also called atom value): "result" or "result1|result2".longGets the extra label color(s): lower 32 bits and upper 32 bits as (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'8 + blue).intgetExtraLabelColor(int i) Gets the extra label color: (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'8 + blue).static intgetExtraLabelColor(long rgbs, int i) Gets extra label color from composed color value.intintgetFlags()Gets flags.intGets the hybridization state.intGets the number of implicit hydrogens attached.intgetImplicitHCount(boolean runVCIfNeeded) Gets the implicit Hydrogen count of the atom.final MolAtomgetLigand(int i) Gets the i-th ligand of this atom.final intgetLigandIndex(MolAtom atom) Returns the index of the specified ligand in this atom.intgetLigandOrder(MolAtom ligand) Gets the order of a specified ligand.final MolAtom[]Returns the atoms connected to this atom by a bond.intgetLinkNodeOuterAtom(int idx) Gets the index of one of the link node's outer neighbor atoms.int[]getList()Gets the atom list.final DPoint3Gets the coordinates.final voidGets the coordinates.protected final ObjectgetLock()Get lock object for synchronization.intReturns the automatically calculated lone pair count of this atom.doublegetMass()Gets the atomic weight.intGets the mass number.intGets the maximum number of repetitions for a link atom.intGets the minimum number of repetitions for a link node.intGets the number of implicit hydrogens attached.final MoleculeGraphReturn the molecule graph that contains this atom.intgetPreferredLabelDir(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.intgetQPropAsInt(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.intGets 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.intDeprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2.intGets the number of free electrons.Gets theAtomProperty.Radicalenum value that represents the radical of the atom.intGets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.final intGets the number of bonds connected to "real" atoms.intCheck negativity compared to the neighbors.intGets the residue atom identifier.intGets the residue sequence number.intGets the residue type.intGets the R-group ID.intGets the attachment point order of an R-group attachment point.static intgetRow(int z) The row or or period of an element in the periodic system.intGets the atom set sequence number.booleanReports double bond stereo care information on the connected bonds.intGets the stereochemical group number for AND and OR groups of the enhanced stereo representation.intGets the stereochemical group type for the enhanced stereo representation.Gets the element symbol.getTemporaryObject(String key) Gets a temporary object.intGets the valence.intGets the valence property.int[]Gets the minimum and maximum possible values of the valence property.doublegetX()Gets the X coordinate.doublegetY()Gets the Y coordinate.doublegetZ()Gets the Z coordinate.final booleanTests whether the atom has aromatic bonds.booleanReturns true if this atom has a non-zero formal charge.booleanReturns true if this atom has query properties.final booleanTests whether the atom has query bonds (e.g.booleanhasSameCharge(int charge) Deprecated.final booleanDeprecated, for removal: This API element is subject to removal in a future version.As of release 5.7, replaced bySmartsAtomQuerifier.hasSMARTSProps(MolAtom atom)final booleanhasSMARTSPropsExcluding(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)booleanReturns previously set valence error.final booleanTests whether the atom has a wedged bond.booleanTests if two atoms have the same properties.booleanChecks if two atoms have similar bonds.intIncrements the value of a query property.intIncrements the value of the query aromaticity property.intIncrements the value of the valence property.intReturns the index of the specified bond in this atom.protected final intindexOfReferenced(MolBond bond) Returns the index of the referenced bond in this atom.protected voidinsertBond(int i, MolBond bond) Inserts a bond at a specified index.booleaninsideLabel(double x, double y) Tests whether the specified point is inside the atom label.static intionChargeOf(int z) Gets the ion charge.booleanCheck if the atom has ambiguous stereo wedge configuration.static booleanisAromaticSMILESSubset(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 booleanChecks if this MolAtom is connected to another one or not.booleanReturns true if the charge angle is specified explicitly for the atom.booleanTests whether the atom is a generic atom.booleanisImplicitizableH(int f) Tests whether the hydrogen atom is implicitizable or not.booleanThe atom is a link node if the maximum number of repetitions is nonzero.booleanChecks if this atom it a mappable.static intisotopeType(int z, int a) Gets the type of an isotope.booleanReturns true if the atom is plain Hydrogen (H or 1H).booleanisPseudo()Tests whether if the atom is a pseudo atom.booleanisQProp()For internal use only.final booleanisQuery()Tests whether it is a query atom.static booleanisSameParityClass(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.booleanTests whether this atom is selected.booleanTests whether special symbol is used.booleanTests whether special symbol is used.booleanDetermines whether it is a terminal atom or not.ligands()Provides an unmodifiable list view of the ligands of the atom.static intmaxAbsOxStateOf(int z) Gets the oxidation state that has the maximum absolute valuevoidmoveCorners(double diffx, double diffy) Translates the coordinates of the atom label.static StringnameOf(int z) Gets the name of the specified element.static doublenaturalWeightOf(int z) Gets the natural weight of the element.static intnegOxOf(int z) Gets the negative oxidation number.static intDeprecated.As of Marvin 5.9, replaced by a similar methodPeriodicSystem.findAtomicNumber(String).static intnumoxstatesOf(int z) Gets the number of oxidation states for the specified element.static intoxstateOf(int z, int k) Gets the oxidation states.voidpack()Reduce memory usage.static intparitySign(int a, int b, int c, int d) Calculates the sign of the parity for the specified indexes.static intposOxOf(int z) Gets the smallest positive oxidation number.intReturns 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.voidputProperty(String key, Object value) Associates the specified value with the specified key at this atom.voidQuery property checking.protected voidRemoves all bonds.protected voidremoveAllBonds(boolean clearFromAttachmentPoints) Removes all bonds.protected voidremoveBond(int i) Removes a bond.protected voidremoveBond(int i, boolean clearFromAttachmentPoints) Removes a bond.protected voidremoveBond(MolBond bond) Removes a bond by reference.protected voidremoveBond(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 StringresidueSymbolOf(int id) Gets the name of a residue.static intresidueTypeOf(String name) Gets the residue identifier for a residue name.voidSet all atom properties except the coordinates.voidSets the alias string or pseudo atom type string for pseudo atoms.voidsetAtno(int z) Sets the atomic number.protected static voidSets the first atom of a bond.protected static voidSets the second atom of a bond.voidsetAtomMap(int map) Sets the atom-atom mapping number.voidsetAttach(int a) Deprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom), orSuperatomSgroup.addAttachmentPoint(MolAtom, int).voidDeprecated.as of Marvin 6.0, replaced bySuperatomSgroup.addAttachmentPoint(MolAtom), orSuperatomSgroup.addAttachmentPoint(MolAtom, int).voidsetAttachParentSgroup(Sgroup sgroup) Sets the attach parent s-group information to the extra atom propertiesvoidsetBicycloStereo(BicycloStereoDescriptor[] descriptors) Registers the bicyclo stereo information for this atom.voidsetCharge(int q) Sets the charge.voidsetChargeAngle(double angle) Sets the charge angle for the atom.voidsetCorners(double xnw, double ynw, double xse, double yse) Used internally by MolPainter.voidsetElectronProp(int eProp) Sets the number of lone pairs.voidSets the extra atom label (also called atom value): "label" or "label1|label2".voidsetExtraLabelColor(int rgb1, int rgb2) Sets the extra label colors: lower 32 bits and upper 32 bits as (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'8 + blue).voidsetExtraLabelColor(long rgbs) Sets the extra label color(s): lower 32 bits and upper 32 bits as (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'8 + blue).voidsetExtraLabelSetSeq(int id) voidsetFlags(int f) Sets the flags.voidsetFlags(int f, int mask) Sets the flags.voidDeprecated.as of Marvin 6.3.voidsetHybridizationState(int h) Sets the hybridization state.voidsetImplicitHBasedOnValence(chemaxon.core.calculations.valencecheck.Valence v) Deprecated.as of Marvin 6.0.1, exists only for internal usage
Usage:voidsetImplicitHcount(int h) Sets the number of implicit hydrogens.protected voidsetIsValenceCheckNeeded(boolean isValenceCheckNeeded) Sets the boolean value ifisValenceCheckNeeded.booleansetLigandOrder(int order, MolAtom ligand) Sets the order of a specified ligand.voidSets link node outer atoms to default values, if they are not set yet.voidsetLinkNodeOuterAtom(int idx, int outer) Sets one of the link node's outer neighbor atoms.voidsetList(int[] l) Sets the list elements.voidsetList(int[] l, int n) Sets the list elements.voidSets the coordinates.voidsetMassno(int a) Sets the mass number.voidsetMaxRepetitions(int r) Sets the maximum number of repetitions for a link atom.voidsetMinRepetitions(int r) Sets the minimum number of repetitions for a link node.voidsetNonQueryImplicitHcount(int h) Sets the number of non-query implicit hydrogens attached.voidSets a query property as an integer.voidSets a query property.voidsetQueryAromaticity(int x) Sets the aromatic/aliphatic query property.voidDeprecated, 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).voidsetQuerystr(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).voidsetQueryString(String queryString) Assigns the query string to this atom.voidsetRadical(int r) Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 6.2.voidsetRadicalValue(AtomProperty.Radical radical) Sets the radical value.voidsetReactionStereo(int r) Sets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.voidsetResidueAtomId(int id) Sets the residue atom identifier.voidsetResidueSeq(int n) Sets the residue sequence number.voidsetResidueType(int t) Sets the residue type.voidsetRgroup(int r) Sets the R-group ID.voidsetRgroupAttachmentPointOrder(int order) Sets the attachment point order of an R-group attachment point.voidsetSelected(boolean sel) Selects or unselects this atom.voidsetSetSeq(int id) Sets the atom set sequence number.voidDeprecated, 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)voidsetSpecIsotopeSymbolPreferred(boolean v) Sets special isotope symbol usage preference.voidsetStereoGroupNumber(int n) Sets the stereochemical group number for AND and OR groups of the enhanced stereo representation.voidsetStereoGroupType(int t) Sets the stereochemical group type for enhanced stereo representation.voidsetValenceError(boolean v) Sets or clears the valence error flag.voidsetValenceProp(int v) Sets the valence property.voidsetX(double x) Sets the X coordinate.voidsetXY(double x, double y) Sets the x and y coordinates.voidsetXYZ(double x, double y, double z) Sets the coordinates.voidsetY(double y) Sets the Y coordinate.voidsetZ(double z) Sets the Z coordinate.final intCalculate the size of smallest ring containing this atom.voidstoreTemporaryObject(String key, Object val) Stores an object temporarily.static StringsymbolOf(int z) Gets the element symbol for the specified atomic number.static StringsymbolOf(int z, int a) Gets the special element symbol for the specified atomic and mass numbers.toString()Overrides Object.toString() to ease debugging.voidtransform(CTransform3D t, boolean incg) Apply a transformation matrix to the coordinates.inttwicesumbonds(boolean countH, boolean all2) Calculates the total number of bonding electrons, excluding implicit hydrogens.voidValence checking.
-
Field Details
-
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.HYDROGENbond 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:
-
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- See Also:
-
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_SQBRACKETSis 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_SQBRACKETSis 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_SQBRACKETSis 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:
-
ANGLE_STEP
Deprecated.- 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
Deprecated.- 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:
trueif the two atomss are connected with a bond,falseotherwise- 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. Used from derived classes. -
setAtom2
Sets the second atom of a bond. Used from derived classes. -
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:
trueif they have similar bonds,falseotherwise- 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 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:
trueif map index can be assigned to the atomfalseif 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()Returns the formal charge of the atom.- Returns:
- the formal charge as a signed integer, the default value is zero
-
hasCharge
public boolean hasCharge()Returns true if this atom has a non-zero formal charge.- Returns:
- true if the atom has non-zero charge
-
hasSameCharge
Deprecated. -
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.Radicalenum 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.- Returns:
- the number of free electrons
- Since:
- Marvin 3.0
- See Also:
-
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()Returns true if this atom has query properties.- Returns:
trueif it has query properties,falseotherwise- 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,ALIPHATICorAROMATIC_OR_ALIPHATIC- Since:
- Marvin 3.3
-
setQueryAromaticity
public void setQueryAromaticity(int x) Sets the aromatic/aliphatic query property.- Parameters:
x-UNSPECIFIED_AROMATICITY,AROMATIC,ALIPHATICorAROMATIC_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_UNKNOWNif 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
nullif 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 flagslcenter- 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 otherwisepreTransform- viewing transformation- 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_ABOVEorLDIR_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
- Returns:
trueif it is a query atom,falseotherwise- See Also:
-
isQProp
public boolean isQProp()For internal use only. Tests whether this object represents a query property.- Returns:
trueif it is a query property,falseotherwise- 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:
trueif the hydrogen is implicitizable,falseotherwise- 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)) toPSEUDOand set the pseudo atom type string bysetAliasstr(String).- Returns:
trueif the atom is a pseudo atom,falseotherwise- 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)) toPSEUDOand 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:
trueif the atom is a generic atom,falseotherwise- Since:
- Marvin 5.0
- See Also:
-
hasWedgedBond
public final boolean hasWedgedBond()Tests whether the atom has a wedged bond.- Returns:
trueif it has a wedged bond,falseotherwise- Since:
- 4.0
-
hasAromaticBond
public final boolean hasAromaticBond()Tests whether the atom has aromatic bonds.- Returns:
trueif it has aromatic bonds,falseotherwise
-
hasQueryBonds
public final boolean hasQueryBonds()Tests whether the atom has query bonds (e.g. "any" or "single or double" bond).- Returns:
trueif it has query bonds,falseotherwise
-
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:
trueif it has SMARTS properties,falseotherwise
-
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:
trueif it has SMARTS properties,falseotherwise- 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 (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'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 (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'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 (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'8 + blue).- Returns:
- the label color(s)
-
getExtraLabelColor
public int getExtraLabelColor(int i) Gets the extra label color: (alphainvalid input: '<'invalid input: '<'24 + redinvalid input: '<'invalid input: '<'16 + greeninvalid input: '<'invalid input: '<'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:
trueif inside,falseif 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- ifelementdoes 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 forAROMATICin most cases. 2 forAROMATICfor 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
ANYandSINGLE_OR_AROMATIC, 3 forSINGLE_OR_DOUBLE, 4 forDOUBLE_OR_AROMATIC.- Parameters:
countH- bonds to explicit hydrogen atoms are counted iftrue, not counted iffalseall2- 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.- See Also:
-
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:
trueif selected,falseotherwise- 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:
trueif 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:
trueif they have the same properties,falseotherwise- 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) Sets the charge angle for the atom. This method is to be called when charge position is explicitly specified. Angle is in radian and positive in I-II and negative in III-IV quadrants. It is rounded to the closest multiply of PI/12 (15 degrees).- Parameters:
angle- the charge angle to be set,Double.NaNcan be used to reset this property
-
getChargeAngle
public double getChargeAngle()Returns the charge angle of the atom orDouble.NaNif it is not specified explicitly.- Returns:
- the charge angle if it is set,
Double.NaNotherwise
-
isChargeAngleSet
public boolean isChargeAngleSet()Returns true if the charge angle is specified explicitly for the atom.- Returns:
- true if the charge angle is set
-
isPlainHydrogen
public boolean isPlainHydrogen()Returns true if the atom is plain Hydrogen (H or 1H).- Returns:
- true if the atom is plain Hydrogen (H or 1H)
-
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
-
Graph invariants are checked by default when calculating CIS/TRANS stereo, so this option is out of use.