Class MolAtom

  • All Implemented Interfaces:
    StereoConstants, Serializable
    Direct Known Subclasses:
    SgroupAtom

    @PublicAPI
    public class MolAtom
    extends Object
    implements StereoConstants, Serializable
    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:
    Serialized Form
    • Constructor Detail

      • MolAtom

        public MolAtom​(int zZ,
                       double x,
                       double y,
                       double z)
        Construct an atom. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the atomic number is valid.
        Parameters:
        zZ - the atomic number
        x - the x coordinate
        y - the y coordinate
        z - the z coordinate
        See Also:
        checkAtno(int)
      • MolAtom

        public MolAtom​(double x,
                       double y)
        Construct a carbon atom at the specified location.
        Parameters:
        x - the x coordinate
        y - the y coordinate
      • MolAtom

        public MolAtom​(int z)
        Construct an atom of the specified type at the origin. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the atomic number is valid.
        Parameters:
        z - the atomic number
        See Also:
        checkAtno(int)
    • Method Detail

      • getParent

        public final MoleculeGraph getParent()
        Return the molecule graph that contains this atom.
        Returns:
        the parent graph
      • indexOf

        public int indexOf​(MolBond bond)
        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:
        Object.equals(Object)
      • indexOfReferenced

        protected final int indexOfReferenced​(MolBond bond)
        Returns the index of the referenced bond in this atom. This method uses == for the bond comparison!
        Parameters:
        bond -
        Returns:
        the index of the referenced bond in this atom
      • getLigands

        public final MolAtom[] getLigands()
        Returns the atoms connected to this atom by a bond.
        Returns:
        the array of connected (ligand) atoms
        Since:
        Marvin 5.3.3
        See Also:
        getLigand(int)
      • getLigand

        public final MolAtom getLigand​(int i)
        Gets the i-th ligand of this atom.
        Parameters:
        i - bond index
        Returns:
        the atom at the other end of the bond
        Since:
        Marvin 2.6
      • getLigandIndex

        public final int getLigandIndex​(MolAtom atom)
        Returns the index of the specified ligand in this atom.
        Parameters:
        atom - the other atom
        Returns:
        the connecting ligand index or -1 if not connected.
        Since:
        Marvin 4.0 12/22/2004
        See Also:
        getLigand(int)
      • getBondTo

        public final MolBond getBondTo​(MolAtom other)
        Finds the bond that connects this atom to another atom.
        Parameters:
        other - the other atom
        Returns:
        the connecting bond or null
        Since:
        Marvin 5.3, 04/30/2009
        See Also:
        isBoundTo(MolAtom)
      • isBoundTo

        public final boolean isBoundTo​(MolAtom other)
        Checks if this MolAtom is connected to another one or not.
        Parameters:
        other - the other atom
        Returns:
        true if the two atomss are connected with a bond, false otherwise
        See Also:
        getBondTo(MolAtom)
      • sringsize

        public final int sringsize()
        Calculate the size of smallest ring containing this atom. 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

        protected final Object getLock()
        Get lock object for synchronization.
        Returns:
        reference to the top parent graph
      • setAtom1

        protected static void setAtom1​(MolBond bond,
                                       MolAtom newatom)
        Sets the first atom of a bond. Use it from derived classes.
        Parameters:
        bond - the bond
        newatom - the new atom value
      • setAtom2

        protected static void setAtom2​(MolBond bond,
                                       MolAtom newatom)
        Sets the second atom of a bond. Use it from derived classes.
        Parameters:
        bond - the bond
        newatom - the new atom value
      • haveSimilarBonds

        public boolean haveSimilarBonds​(MolAtom a)
        Checks if two atoms have similar bonds. Two atoms have similar bonds if for each bond bi of the first atom, there is a corresponding bond bj of the other atom with "equal properties".
        Returns:
        true if they have similar bonds, false otherwise
        Since:
        Marvin 5.3, 04/30/2009
        See Also:
        MolBond.haveEqualProperties(MolBond)
      • getBondCount

        public final int getBondCount()
        Gets the number of bonds/ligands.
        Returns:
        the number of bonds
        Since:
        Marvin 3.0
      • getBond

        public final MolBond getBond​(int i)
        Gets the i-th bond.
        Parameters:
        i - bond index
        Returns:
        the bond object
        Since:
        Marvin 3.0
      • getRealBondCount

        public final int getRealBondCount()
        Gets the number of bonds connected to "real" atoms. An LP node is not a real atom.
        Returns:
        the number of bonds
        Since:
        Marvin 3.5
      • set

        public void set​(MolAtom atom)
        Set all atom properties except the coordinates.
        Parameters:
        atom - the source atom
        Since:
        Marvin 4.1, 01/01/2006
      • getX

        public double getX()
        Gets the X coordinate.
        Returns:
        the x coordinate in Angstroms
      • setX

        public void setX​(double x)
        Sets the X coordinate.
        Parameters:
        x - the x coordinate in Angstroms
      • getY

        public double getY()
        Gets the Y coordinate.
        Returns:
        the y coordinate in Angstroms
      • setY

        public void setY​(double y)
        Sets the Y coordinate.
        Parameters:
        y - the y coordinate in Angstroms
      • getZ

        public double getZ()
        Gets the Z coordinate.
        Returns:
        the z coordinate in Angstroms
      • setZ

        public void setZ​(double z)
        Sets the Z coordinate.
        Parameters:
        z - the z coordinate in Angstroms
      • setXY

        public void setXY​(double x,
                          double y)
        Sets the x and y coordinates.
        Parameters:
        x - the x coordinate in Angstroms
        y - the y coordinate in Angstroms
      • setXYZ

        public void setXYZ​(double x,
                           double y,
                           double z)
        Sets the coordinates.
        Parameters:
        x - the x coordinate in Angstroms
        y - the y coordinate in Angstroms
        z - the z coordinate in Angstroms
      • getLocation

        public final DPoint3 getLocation()
        Gets the coordinates.
        Returns:
        the location
      • getLocation

        public final void getLocation​(DPoint3 p)
        Gets the coordinates.
        Parameters:
        p - object that will store the location
      • setLocation

        public void setLocation​(DPoint3 p)
        Sets the coordinates.
        Parameters:
        p - the location
      • transform

        public void transform​(CTransform3D t,
                              boolean incg)
        Apply a transformation matrix to the coordinates.
        Parameters:
        t - the transformation matrix
        incg - graph invariants are changed (true) or not (false)
        Since:
        Marvin 4.0.2, 10/26/2005
      • getSymbol

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

        public final int getAtno()
        Gets the atomic number.
        Returns:
        the atomic number
      • setAtno

        public void setAtno​(int z)
        Sets the atomic number. Given atomic number is not checked for speed consideration. Use checkAtno(int) to check whether the the atomic number is valid.
        Parameters:
        z - the atomic number
        See Also:
        checkAtno(int)
      • checkAtno

        public static boolean checkAtno​(int z)
        Check if the given atomic number is positive and less then atomic type maximum value.
        Parameters:
        z - atomic number
        Returns:
        true if the given number is valid.
        See Also:
        ATOM_TYPE_COUNT
      • getMassno

        public int getMassno()
        Gets the mass number. In the case of an element it returns 0, because it is a mix of isotopes having different mass numbers.
        Returns:
        the mass number, or zero if not specified
      • setMassno

        public void setMassno​(int a)
        Sets the mass number.
        Parameters:
        a - the mass number or zero
      • setForSpecIsotopeSymbol

        @Deprecated
        public void setForSpecIsotopeSymbol​(String sym)
        Deprecated.
        as of Marvin 6.3. use setSpecIsotopeSymbolPreferred(boolean) and setMassno(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 atom false if atom is a lone pair
        Since:
        Marvin 3.4, 06/23/2004
      • getRelativeNegativity

        public int getRelativeNegativity()
        Check negativity compared to the neighbors.
        Returns:
        -1 if the atom is more electronegative than its neighbors, 1 if the neighbors are more electronegative, 0 if it has negative and positive neighbors also or or the neighbors have the same e.n. as the atom
      • setIsValenceCheckNeeded

        protected void setIsValenceCheckNeeded​(boolean isValenceCheckNeeded)
        Sets the boolean value if isValenceCheckNeeded.
        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.
        Parameters:
        runVCIfNeeded -
        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, use valenceCheck() before this method or call getImplicitHCount(boolean) instead. The result is always a non-negative number.
        Returns:
        the implicit hydrogen count or the number of query hydrogens
        See Also:
        valenceCheck()
      • setImplicitHcount

        public void setImplicitHcount​(int h)
        Sets the number of implicit hydrogens. Also removes the "H" query property.
        Parameters:
        h - the number of implicit hydrogens
        Throws:
        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
      • setRadicalValue

        public void setRadicalValue​(AtomProperty.Radical radical)
        Sets the radical value.
        Parameters:
        radical - the new radical
        Since:
        Marvin 6.2. 2013/11/07
        See Also:
        AtomProperty.Radical
      • getRadicalCount

        public int getRadicalCount()
        Gets the number of free electrons.
        Returns:
        the number of free electrons
        Since:
        Marvin 3.0
        See Also:
        RAD1, RAD2, RAD3, RAD4
      • getRow

        public static int getRow​(int z)
        The row or or period of an element in the periodic system.
        Parameters:
        z - atomic number (protons)
        Returns:
        column of the atom (0 for unknown types)
        Since:
        Marvin 4.1
      • getValencePropMinMax

        public int[] getValencePropMinMax()
        Gets the minimum and maximum possible values of the valence property.
        Returns:
        two-element array containing the minimum and maximum values
        Since:
        Marvin 4.1, 03/23/2006
      • getValenceProp

        public int getValenceProp()
        Gets the valence property.
        Returns:
        the valence or -1 if not set
        Since:
        Marvin 3.5, 09/04/2004
      • setValenceProp

        public void setValenceProp​(int v)
        Sets the valence property.
        Parameters:
        v - the valence or -1 to unset
        Since:
        Marvin 3.5, 09/04/2004
      • incValenceProp

        public int incValenceProp()
        Increments the value of the valence property.
        Returns:
        the new value
        Since:
        Marvin 4.1, 03/23/2006
      • decValenceProp

        public int decValenceProp()
        Decrements the value of the valence property.
        Returns:
        the new value
        Since:
        Marvin 4.1, 03/23/2006
      • getValence

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

        public int getExplicitHcount()
        Gets number of hydrogen connections.
        Returns:
        the number of H connections
      • hasQProps

        public boolean hasQProps()
        Does it have query properties?
        Returns:
        true if it has query properties, false otherwise
        See Also:
        isQuery()
      • getQProp

        public Object getQProp​(String name)
        Gets a query property.
        • "H": query hydrogens connected
        • "X": number of connections including bonds to implied H's
        • "D": number of explicit connections
        • "R": number of rings: [R] (ring atom) is represented by value 256
        • "h": number of implicit hydrogens
        • "r": smallest ring size: [r] (ring atom) is represented by value 256
        • "a": deprecated, use getQueryAromaticity() instead
        • "c": component number
        • "s": substitution count: -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
        • "u": unsaturated atom: 1 = on
        • "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
        For a meaning of the above properties, see The JChem Query Guide
        Parameters:
        name - the property name
        Returns:
        the value of the property or null if not set
      • getQPropAsInt

        public int getQPropAsInt​(String name)
        Gets a query property as an integer.
        • "H": query hydrogens connected
        • "X": number of connections including bonds to implied H's
        • "D": number of explicit connections
        • "R": number of rings: [R] (ring atom) is represented by value 256
        • "h": number of implicit hydrogens
        • "r": smallest ring size: [r] (ring atom) is represented by value 256
        • "a": deprecated, use getQueryAromaticity() instead
        • "c": component number
        • "s": substitution count: -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
        • "u": unsaturated atom: 1 = on
        • "rb": ring bond count: -1 = off, -2 = rbc*, 0 = rbc0, 1 = rbc1, etc.
        For a meaning of the above properties, see The JChem Query Guide
        Parameters:
        name - the property name
        Returns:
        the value of the property or -1 if not set
        See Also:
        getQProp(java.lang.String)
      • getQPropMinMax

        public int[] getQPropMinMax​(String name)
        Gets the minimum and maximum possible values of a query property.
        Parameters:
        name - the query property abbreviation
        Returns:
        two-element array containing the minimum and the maximum value
        Since:
        Marvin 4.1, 03/22/2006
      • incQProp

        public int incQProp​(String name)
        Increments the value of a query property.
        Parameters:
        name - the query property abbreviation
        Returns:
        the new value
        Since:
        Marvin 4.1, 03/22/2006
      • decQProp

        public int decQProp​(String name)
        Decrements the value of a query property.
        Parameters:
        name - the query property abbreviation
        Returns:
        the new value
        Since:
        Marvin 4.1, 03/22/2006
      • setQProp

        public void setQProp​(String name,
                             Object v)
        Sets a query property.
        • "H": query hydrogens connected
        • "X": number of connections including bonds to implied H's
        • "D": number of explicit connections
        • "R": number of rings: [R] (ring atom) is represented by value 256
        • "h": number of implicit hydrogens
        • "r": smallest ring size: [r] (ring atom) is represented by value 256
        • "a": deprecated, use getQueryAromaticity() instead
        • "c": component number
        • "s": substitution count: -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
        • "u": unsaturated atom: 1 = on
        • "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
        For a meaning of the above properties, see The JChem Query Guide
        Parameters:
        name - the property name
        v - the value
        See Also:
        getQProp(java.lang.String)
      • setQProp

        public void setQProp​(String name,
                             int v)
        Sets a query property as an integer.
        • "H": query hydrogens connected
        • "X": number of connections including bonds to implied H's
        • "D": number of explicit connections
        • "R": number of rings: [R] (ring atom) is represented by value 256
        • "h": number of implicit hydrogens
        • "r": smallest ring size: [r] (ring atom) is represented by value 256
        • "a": deprecated, use getQueryAromaticity() instead
        • "c": component number
        • "s": substitution count: -1 = off, -2 = s*, 0 = s0, 1 = s1, etc.
        • "u": unsaturated atom: 1 = on
        • "rb": ring bond count: -1 = off, -2 = rb*, 0 = rb0, 1 = rb1, etc.
        The value -1 has special meaning, it removes the property.
        For a meaning of the above properties, see The JChem Query Guide
        Parameters:
        name - the property name
        v - the value or -1
      • clearQProps

        public void clearQProps()
        Clears query props.
        Since:
        Marvin 3.4
      • getQPropNames

        public String[] getQPropNames()
        Gets the names of query properties with non-null values.
        Since:
        Marvin 4.1, 03/21/2006
      • getQPropNameSet

        public Set<String> getQPropNameSet()
        Gets the names of query properties with non-null values, or null if no query properties are set.
        Since:
        Marvin 4.1, 05/10/2006
      • 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 and RGROUP_MAX
      • getAttach

        @Deprecated
        public int getAttach()
        Deprecated.
        as of Marvin 6.0 replaced by SuperatomSgroup.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), or ATTACH_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
      • setAttachParentSgroup

        public void setAttachParentSgroup​(Sgroup sgroup)
        Sets the attach parent s-group information to the extra atom properties
        Parameters:
        sgroup -
      • getAttachParentSgroup

        public Sgroup 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 by setHybridizationState(int) is not overwritten accidentally. \br To calculate and set the hybridization state for this and all other atoms in a moecule call MoleculeGraph.calcHybridization().
        Returns:
        the hybridization state
        See Also:
        HS_UNKNOWN, HS_S, HS_SP, HS_SP2, HS_SP3
      • setHybridizationState

        public void setHybridizationState​(int h)
        Sets the hybridization state.
        Parameters:
        h - the hybridization state
        See Also:
        getHybridizationState()
      • getAtomMap

        public int getAtomMap()
        Gets the atom-atom mapping number.
        Returns:
        the map value (positive integer) or 0
      • setAtomMap

        public void setAtomMap​(int map)
        Sets the atom-atom mapping number.
        Parameters:
        map - the map value (positive integer) or 0
        See Also:
        AAMAP_MAX
      • getSetSeq

        public int getSetSeq()
        Gets the atom set sequence number.
        Returns:
        a number between 0 and SETSEQ_MAX
        See Also:
        SETSEQ_MAX
      • setSetSeq

        public void setSetSeq​(int id)
        Sets the atom set sequence number.
        Parameters:
        id - a number between 0 and SETSEQ_MAX
        See Also:
        SETSEQ_MAX
      • setExtraLabelSetSeq

        public void setExtraLabelSetSeq​(int id)
      • getExtraLabelSetSeq

        public int getExtraLabelSetSeq()
      • residueTypeOf

        public static int residueTypeOf​(String name)
        Gets the residue identifier for a residue name.
        Parameters:
        name - residue name
        Returns:
        the residue type
        Since:
        Marvin 3.1.4
      • residueSymbolOf

        public static String residueSymbolOf​(int id)
        Gets the name of a residue.
        Parameters:
        id - the residue identifier
        Returns:
        the residue symbol
        Since:
        Marvin 3.1.4
      • getResidueType

        public int getResidueType()
        Gets the residue type.
        Returns:
        the residue type
        See Also:
        RESTYPE_MAX
      • setResidueType

        public void setResidueType​(int t)
        Sets the residue type.
        Parameters:
        t - the residue type
        See Also:
        RESTYPE_MAX
      • getResidueSeq

        public int getResidueSeq()
        Gets the residue sequence number.
        Returns:
        the residue sequence number
        See Also:
        RESSEQ_MAX
      • setResidueSeq

        public void setResidueSeq​(int n)
        Sets the residue sequence number.
        Parameters:
        n - the residue sequence number
        See Also:
        RESSEQ_MAX
      • getResidueAtomId

        public int getResidueAtomId()
        Gets the residue atom identifier. Atoms in amino acids and nucleic acids are identified uniquely by the atom symbol and the residue atom identifier.
        Returns:
        the residue atom identifier
        Since:
        Marvin 3.1.3
      • setResidueAtomId

        public void setResidueAtomId​(int id)
        Sets the residue atom identifier.
        Parameters:
        id - the residue atom identifier
        Since:
        Marvin 3.1.3
      • getMinRepetitions

        public int getMinRepetitions()
        Gets the minimum number of repetitions for a link node.
        Returns:
        the minimum number of repetitions
        Since:
        Marvin 3.5, 07/22/2004
      • setMinRepetitions

        public void setMinRepetitions​(int r)
        Sets the minimum number of repetitions for a link node.
        Parameters:
        r - the minimum number of repetitions
        Since:
        Marvin 3.5, 07/22/2004
      • getMaxRepetitions

        public int getMaxRepetitions()
        Gets the maximum number of repetitions for a link atom.
        Returns:
        the maximum number of repetitions
        Since:
        Marvin 3.5, 07/22/2004
      • setMaxRepetitions

        public void setMaxRepetitions​(int r)
        Sets the maximum number of repetitions for a link atom.
        Parameters:
        r - the maximum number of repetitions
        Since:
        Marvin 3.5, 07/22/2004
      • getLinkNodeOuterAtom

        public int getLinkNodeOuterAtom​(int idx)
        Gets the index of one of the link node's outer neighbor atoms. (Outer: not repeating.)
        Parameters:
        idx - Which outer atom (0 or 1)
        Returns:
        The specified outer atom index (as used with getLigand()) or -1 if not set.
        Since:
        Marvin 4.0 12/22/2004
        See Also:
        getLigand(int)
      • setLinkNodeOuterAtom

        public void setLinkNodeOuterAtom​(int idx,
                                         int outer)
        Sets one of the link node's outer neighbor atoms. (Outer: not repeating.)
        Parameters:
        idx - Which outer atom (0 or 1)
        outer - The outer neighbor atom index (as used with getLigand()) or -1 if clearing.
        Since:
        Marvin 4.0 12/22/2004
        See Also:
        getLigand(int)
      • isLinkNode

        public boolean isLinkNode()
        The atom is a link node if the maximum number of repetitions is nonzero.
        Returns:
        if the maximum number of repetitions is nonzero
        Since:
        Marvin 3.5, 07/22/2004
      • bondweights

        public void bondweights​(double[] w,
                                CTransform3D t)
        Calculates the average of the bond unit vectors pointing out of this atom. The result is not a unit vector.
        Parameters:
        w - 3-element array that will contain the resulting vector
        t - the rotation matrix
      • getAtomSymbol

        public String getAtomSymbol​(int opts,
                                    int aflags,
                                    int[] lcenter,
                                    CTransform3D preTransform)
        Gets the string representation of the atom symbol.
        Parameters:
        opts - combination of SYM_* flags
        aflags - atom flags
        preTransform - viewing transformation
        lcenter - if not null, then its first two element (index 0-1) will 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:
        SYM_SQBRACKETS, SYM_IMPLH, SYM_EXPLH, SYM_NEUTRAL, SYM_SMARTS, SYM_MOLEX
      • getQueryLabel

        public String getQueryLabel()
        Gets the string representation of the query atom
        Returns:
        the string representation
        Since:
        Marvin 3.0
      • getPreferredLabelDir

        public int getPreferredLabelDir​(CTransform3D pretr,
                                        int h)
        Gets the preferred direction for an additional label.
        Parameters:
        pretr - viewing transformation
        h - hydrogen count for hydrogen label display, 0 otherwise
        Returns:
        LDIR_RIGHT, LDIR_LEFT, LDIR_ABOVE or LDIR_BELOW
        Since:
        4.0, 02/16/2005
      • isQuery

        public final boolean isQuery()
        Tests whether it is a query atom. (Has a query atom type or query property or query string):
        • link node atom
        • any atom
        • hetero atom
        • list atom
        • not list atom
        • rgroup atom
        • known query properties: H,X,R,r,a,s,u,h,D,c,rb
        For a meaning of the above properties, see The JChem Query Guide
        Returns:
        true if it is a query atom, false otherwise
        See Also:
        isLinkNode(), ANY, HETERO, LIST, NOTLIST, RGROUP
      • isQProp

        public boolean isQProp()
        Tests whether this object represents a query property.
        Returns:
        true if it is a query property, false otherwise
        Since:
        Marvin 3.0, 11/08/2002
      • isImplicitizableH

        public boolean isImplicitizableH​(int f)
        Tests whether the hydrogen atom is implicitizable or not. Only bound (to non-Hydrogen atom 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:
        LONELY_H, ISOTOPE_H, CHARGED_H, RADICAL_H, MAPPED_H, WEDGED_H, HCONNECTED_H, HBONDED_H, CTSPECIFIC_H, VALENCEERROR_H, Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int)
      • isPseudo

        public boolean isPseudo()
        Tests whether if the atom is a pseudo atom. To create a pseudo atom, set atom number (setAtno(int)) to PSEUDO and set the pseudo atom type string by setAliasstr(String).
        Returns:
        true if the atom is a pseudo atom, false otherwise
        Since:
        Marvin 3.3
        See Also:
        getAliasstr(), PSEUDO
      • isGeneric

        public boolean isGeneric()
        Tests whether the atom is a generic atom. To create a generic atom, set atom number (setAtno(int)) to PSEUDO and set the pseudo atom type string by setAliasstr(String) to one of the following:
        • "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 ganaric atom, false otherwise
        Since:
        Marvin 5.0
        See Also:
        getAliasstr(), PSEUDO
      • hasWedgedBond

        public final boolean hasWedgedBond()
        Tests whether the atom has a wedged bond.
        Returns:
        true if it has a wedged bond, false otherwise
        Since:
        4.0
      • hasAromaticBond

        public final boolean hasAromaticBond()
        Tests whether the atom has aromatic bonds.
        Returns:
        true if it has aromatic bonds, false otherwise
      • hasQueryBonds

        public final boolean hasQueryBonds()
        Tests whether the atom has query bonds ("ANY" bonds).
        Returns:
        true if it has query bonds, false otherwise
      • getQuerystr

        @Deprecated
        public String getQuerystr()
        Deprecated.
        As of release 5.7, replaced by getQueryString()
        Gets the query properties.
        Returns:
        the query string
      • setQuerystr

        @Deprecated
        public void setQuerystr​(String s)
        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
        public void setQuerystr​(String s,
                                int options)
        Assigns the query properties string to this atom while setting all necessary atom and query properties. This is done through SmartsAtomQuerifier which parses the query string. For this reason this operation may be relatively costly. The remaining part of the query string (which could not be represented/assigned) is set to queryStr.

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

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

        public void setQueryString​(String queryString)
        Assigns the query string to this atom.
        Parameters:
        queryString - the query properties string to be assigned.
        See Also:
        getQueryString()
      • getQueryString

        public String getQueryString()
        Returns s the query string assigned to this atom.
        Returns:
        the query string
        See Also:
        setQueryString(String)
      • setAliasstr

        public void setAliasstr​(String s)
        Sets the alias string or pseudo atom type string for pseudo atoms.
        Parameters:
        s - the alias
        See Also:
        isPseudo()
      • getAliasstr

        public String getAliasstr()
        Gets the alias string or pseudo atom type string for pseudo atoms.
        Returns:
        the alias
        See Also:
        isPseudo()
      • setExtraLabel

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

        public void setExtraLabelColor​(long rgbs)
        Sets the extra label color(s): lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).
        Parameters:
        rgbs - the color(s)
        See Also:
        setExtraLabel(String), setExtraLabelColor(int, int)
      • setExtraLabelColor

        public void setExtraLabelColor​(int rgb1,
                                       int rgb2)
        Sets the extra label colors: lower 32 bits and upper 32 bits as (alpha<<24 + red<<16 + green<<8 + blue).
        Parameters:
        rgb1 - the lower 32 bits
        rgb2 - the upper 32 bits
        Since:
        Marvin 5.1.2
        See Also:
        setExtraLabel(String), setExtraLabelColor(long)
      • getExtraLabel

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

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

        public int getExtraLabelColor​(int i)
        Gets the extra label color: (alpha<<24 + red<<16 + green<<8 + blue).
        Parameters:
        i - is the result index (0 or 1)
        Returns:
        the label color
      • getExtraLabelColor

        public static int getExtraLabelColor​(long rgbs,
                                             int i)
        Gets extra label color from composed color value.
        Parameters:
        rgbs - the composed color value
        i - is the result index (0 for first color, 1 for second color)
        Returns:
        the label color
        Since:
        Marvin 5.1.2
        See Also:
        getExtraLabelColor()
      • clearExtraLabel

        public void clearExtraLabel()
        Clears the extra label.
      • getList

        public int[] getList()
        Gets the atom list.
        Returns:
        the list
      • setList

        public void setList​(int[] l,
                            int n)
        Sets the list elements.
        Parameters:
        l - the list
        n - number of elements to set
      • setList

        public void setList​(int[] l)
        Sets the list elements.
        Parameters:
        l - the list
      • getReactionStereo

        public int getReactionStereo()
        Gets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.
        Returns:
        the reaction stereo property
        See Also:
        RXNSTEREO_NONE, RXNSTEREO_INVERSION, RXNSTEREO_RETENTION
      • setReactionStereo

        public void setReactionStereo​(int r)
        Sets the reaction stereo property describing how the stereo configuration of the atom changes during the reaction.
        Parameters:
        r - the reaction stereo property
        Since:
        Marvin 3.0
        See Also:
        RXNSTEREO_NONE, RXNSTEREO_INVERSION, RXNSTEREO_RETENTION
      • clear

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

        public MolAtom 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.
        Overrides:
        clone in class Object
        Returns:
        the clone
      • toString

        public String toString()
        Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object
        Since:
        3.5.2, 12/16/2004
      • insideLabel

        public boolean insideLabel​(double x,
                                   double y)
        Tests whether the specified point is inside the atom label.
        Parameters:
        x - the x coordinate
        y - the y coordinate
        Returns:
        true if inside, false if outside
      • numOf

        @Deprecated
        public static int numOf​(String e)
        Deprecated.
        As of Marvin 5.9, replaced by a similar method PeriodicSystem.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
        public static int getAtomicNumber​(String element)
        Deprecated.
        As of Marvin 5.9, replaced by a similar method PeriodicSystem.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 - if element does not correspond to a chemical element.
      • symbolOf

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

        public static String symbolOf​(int z,
                                      int a)
        Gets the special element symbol for the specified atomic and mass numbers. For Hydrogen, it can return "D" or "T" for the isotopes. Otherwise, the symbol is the same as the MDL codename for special atom types: "L" for LIST and NOTLIST.
        Parameters:
        z - the atomic number
        a - the mass number
        Returns:
        the symbol
        Since:
        Marvin 5.0, 10/12/2007
      • nameOf

        public static String nameOf​(int z)
        Gets the name of the specified element.
        Parameters:
        z - the atomic number
        Returns:
        the name
      • electronegOf

        public static int electronegOf​(int z)
        Gets 10 times the electronegativity value for the specified element.
        Parameters:
        z - the atomic number
        Returns:
        the electronegativity
      • numoxstatesOf

        public static int numoxstatesOf​(int z)
        Gets the number of oxidation states for the specified element.
        Parameters:
        z - the atomic number
        Returns:
        the number of states
      • oxstateOf

        public static int oxstateOf​(int z,
                                    int k)
        Gets the oxidation states.
        Parameters:
        z - the atomic number
        k - the oxidation state index
        Returns:
        the oxidation state
      • maxAbsOxStateOf

        public static int maxAbsOxStateOf​(int z)
        Gets the oxidation state that has the maximum absolute value
        Parameters:
        z - the atomic number
        Returns:
        absolute value of the oxidation state
        Since:
        Marvin 4.1
      • negOxOf

        public static int negOxOf​(int z)
        Gets the negative oxidation number.
        Parameters:
        z - the atomic number
        Returns:
        the negative oxidation number
        Since:
        Marvin 2.7
      • posOxOf

        public static int posOxOf​(int z)
        Gets the smallest positive oxidation number.
        Parameters:
        z - the atomic number
        Returns:
        the smallest positive oxidation number
        Since:
        Marvin 2.7
      • ionChargeOf

        public static int ionChargeOf​(int z)
        Gets the ion charge.
        Parameters:
        z - the atomic number
        Returns:
        the charge
        Since:
        Marvin 2.7
      • covalentRadiusOf

        public static double covalentRadiusOf​(int z,
                                              int t)
        Gets the covalent radius in C-C bond length units.
        Parameters:
        z - the atomic number
        t - the bond type (1, 2, 3)
        Returns:
        the covalent radius
        Since:
        Marvin 2.7
      • naturalWeightOf

        public static double naturalWeightOf​(int z)
        Gets the natural weight of the element. WARNING: This method does not return the exact value.
        Parameters:
        z - the atomic number
        Returns:
        the weight
      • isotopeType

        public static int isotopeType​(int z,
                                      int a)
        Gets the type of an isotope.
        Parameters:
        z - atomic number
        a - mass number
        Returns:
        0 if nonexistent, 1 if non-naturally 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 for AROMATIC in most cases. 2 for AROMATIC 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
        2 for ANY and SINGLE_OR_AROMATIC, 3 for SINGLE_OR_DOUBLE, 4 for DOUBLE_OR_AROMATIC.
        Parameters:
        countH - bonds to explicit hydrogen atoms are counted if true, not counted if false
        all2 - use the value 2 for each bond (independently of type) if true
        Returns:
        the sum of bond values
      • qpropCheck

        public void qpropCheck()
        Query property checking.
      • setCorners

        public void setCorners​(double xnw,
                               double ynw,
                               double xse,
                               double yse)
        Used internally by MolPainter.
        Parameters:
        xnw - north-west corner x
        ynw - north-west corner y
        xse - south-east corner x
        yse - south-east corner y
      • moveCorners

        public void moveCorners​(double diffx,
                                double diffy)
        Translates the coordinates of the atom label.
        Parameters:
        diffx - translates the x values of the corners by this value.
        diffy - translates the y values of the corners by this value.
      • setFlags

        public void setFlags​(int f)
        Sets the flags.
        Parameters:
        f - new flags
      • setFlags

        public void setFlags​(int f,
                             int mask)
        Sets the flags.
        Parameters:
        f - new flags
        mask - bits to set in flags
      • isSelected

        public boolean isSelected()
        Tests whether this atom is selected.
        Returns:
        true if selected, false otherwise
        Since:
        Marvin 2.9.12
      • setSelected

        public void setSelected​(boolean sel)
        Selects or unselects this atom.
        Parameters:
        sel - true to select, false to unselect
        Since:
        Marvin 2.9.12
      • hasValenceError

        public boolean hasValenceError()
        Returns previously set valence error. Valence error can be detected by valenceCheck() method.
        Returns:
        true in case of error, false otherwise
        Since:
        Marvin 2.9.12
        See Also:
        valenceCheck()
      • setValenceError

        public void setValenceError​(boolean v)
        Sets or clears the valence error flag.
        Parameters:
        v - true to set, false to unset
        Since:
        Marvin 2.9.12
      • getStereoCare

        public boolean getStereoCare()
        Reports double bond stereo care information on the connected bonds.
        Returns:
        True if there is -at least- one bond with stereo care box on, false else.
        See Also:
        MolBond.getFlags(), MolBond.setFlags(int)
      • isSpecIsotopeSymbolUsed

        public boolean isSpecIsotopeSymbolUsed()
        Tests whether special symbol is used. The special symbols are D and T for Hydrogen isotopes.
        Returns:
        true if special symbol is used, false otherwise
        Since:
        Marvin 4.1, 11/05/2005
      • isSpecIsotopeSymbolPreferred

        public boolean isSpecIsotopeSymbolPreferred()
        Tests whether special symbol is used. The special symbols are D and T for Hydrogen isotopes.
        Returns:
        true if special symbol is used, false otherwise
        Since:
        Marvin 4.1, 11/05/2005
      • setSpecIsotopeSymbolPreferred

        public void setSpecIsotopeSymbolPreferred​(boolean v)
        Sets special isotope symbol usage preference. The special symbols are D and T for Hydrogen isotopes.
        Parameters:
        v - true if special symbol is used, false otherwise
        Since:
        Marvin 4.1, 11/05/2005
      • add

        protected boolean add​(MolBond b)
        Add a bond if it had not been already added. Also runs valence checking if charge and implicit hydogens were previously set this way.
        Parameters:
        b - the bond to add
        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

        protected void removeBond​(MolBond bond)
        Removes a bond by reference.
        Parameters:
        bond - bond reference to remove
      • removeBond

        protected void removeBond​(MolBond bond,
                                  boolean clearFromAttachmentPoints)
        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 index
        b - second atom index
        c - third atom index
        d - fourth atom index
        Returns:
        +1, -1, or 0 (if two or more indexes equal)
      • isSameParityClass

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

        public boolean isTerminalAtom()
        Determines whether it is a terminal atom or not.
        Returns:
        True if terminal atom, else false.
        Since:
        Marvin 3.4
      • haveEqualProperties

        public boolean haveEqualProperties​(MolAtom a)
        Tests if two atoms have the same properties. Atom coordinates, the "selected" property and the number of implicit hydrogens are not taken into account.
        Returns:
        true if they have the same properties, false otherwise
        Since:
        Marvin 3.4.1, 07/06/2004
      • countAllAtoms

        protected int countAllAtoms()
        Counts all atoms represented by this atom.
        Returns:
        1
        Since:
        Marvin 3.0
      • getLonePairCount

        public int getLonePairCount()
        Returns the automatically calculated lone pair count of this atom.
        Returns:
        the number of the calculated lone pairs if the atom is part of a MoleculeGaph -1 otherwise
        Since:
        Marvin 5.1.5
      • getElectronProp

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

        public void setElectronProp​(int eProp)
        Sets the number of lone pairs.
        Parameters:
        eProp - the number of lone pairs
      • storeTemporaryObject

        public void storeTemporaryObject​(String key,
                                         Object val)
        Stores an object temporarily. The stored object is not cloned and not serialized. This method may be used to store lone pair coordinates when drawing them. Then the electron flow arrow can start from a stored point.
        Parameters:
        key - key to the object
        val - the object
        Since:
        Marvin 5.3, 09/13/2009
      • getTemporaryObject

        public Object getTemporaryObject​(String key)
        Gets a temporary object.
        Parameters:
        key - key to the object
        Returns:
        the object
        Since:
        Marvin 5.3, 09/13/2009
      • isAmbiguousStereo

        public boolean isAmbiguousStereo()
        Check if the atom has ambiguous stereo wedge configuration. If the molecule is 2D and the atom has one hashed or bold bond (starting from this atom, indicating one configuration) and one squiggly bond (starting also from this atom, indicating two configuration) than the atom has ambiguous stereo configuration. Or if the molecule is 2D and the atom parity cannot be determined from the given wedges. Or if the molecule is in 3D but the atom has wedge or hash neighbors.
        Returns:
        true if the atom stereo configuration is ambiguous, else false.
        Since:
        Marvin 4.1 01/06/2006
        See Also:
        MolBond.UP, MolBond.DOWN, MolBond.STEREO1_MASK
      • isAromaticSMILESSubset

        public static final boolean isAromaticSMILESSubset​(int atno)
        Is the atom can be aromatic according to the daylight specification: Only atoms on the following list can be considered aromatic: C, N, O, P, S, As, Se, and * (wildcard).
        Parameters:
        atno - atomic number
        Returns:
        true if the atom is the member of the aromatic subset.
        Since:
        Marvin 5.2 11/06/2008
      • propertySet

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

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

        public boolean containsPropertyKey​(String key)
        Returns true if this atom has a mapping for the specified property key.
        Parameters:
        key - the property key which is to be searched for.
        Returns:
        true if this map contains a mapping for the specified property key.
        Since:
        Marvin 5.4
      • removeProperty

        public Object removeProperty​(String key)
        Removes the mapping for this property key from this atom if present.
        Parameters:
        key - property key whose mapping is to be removed from the atom.
        Returns:
        previous 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

        public Object 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. A return value of null does not necessarily indicate that the atom has no mapping for the property key; it is also possible that the atom explicitly maps the property key to null. The containsKey method may be used to distinguish these two cases.
        Parameters:
        key - the property key whose associated property value is to be returned.
        Returns:
        the property value to which this atom maps the specified property key, or null if the atom has no mapping for this property key.
        Since:
        Marvin 5.4
      • putProperty

        public void putProperty​(String key,
                                Object value)
        Associates the specified value with the specified key at this atom. If this atom previously had a mapping for this property key, the old property value is replaced.
        Parameters:
        key - property key with which the specified value is to be associated
        value - property value to be associated with the specified property key.
        Since:
        Marvin 5.4
      • clearProperties

        public void clearProperties()
        Removes all properties from this atom.
        Since:
        Marvin 5.4
      • setRgroupAttachmentPointOrder

        public void setRgroupAttachmentPointOrder​(int order)
        Sets the attachment point order of an R-group attachment point.
        Parameters:
        order - the attachment point order to set
        Since:
        Marvin 5.4
        See Also:
        RGROUP_ATTACHMENT, getRgroupAttachmentPointOrder()
      • addRgroupAttachmentPoint

        public MolAtom addRgroupAttachmentPoint​(int order,
                                                int bondtype)
        Attaches a new R-group attachment point to this atom by a bond of a specified type. The new R-group attachment point and the new bond are added to the parent molecule of this atom. 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:
        RGROUP_ATTACHMENT, setRgroupAttachmentPointOrder(int order)
      • insertBond

        protected void insertBond​(int i,
                                  MolBond bond)
        Inserts a bond at a specified index.
        Parameters:
        i - the index where to insert the bond
        bond - the bond reference to insert
        Since:
        Marvin 5.4, 08/21/2010
      • getLigandOrder

        public int getLigandOrder​(MolAtom ligand)
        Gets the order of a specified ligand.
        Parameters:
        ligand - the ligand
        Returns:
        the order of the ligand
        Since:
        Marvin 5.4, 08/21/2010
      • setLigandOrder

        public boolean setLigandOrder​(int order,
                                      MolAtom ligand)
        Sets the order of a specified ligand.
        Parameters:
        order - the order to set, order should be greater than 0.
        ligand - the ligand to set the order on
        Returns:
        true if the order is successfully set, false otherwise when the ligand is not an existing ligand of this atom or the order is bigger than the number of ligands.
        Since:
        Marvin 5.4, 08/21/2010
      • getBicycloStereo

        public chemaxon.struc.BicycloStereoDescriptor[] getBicycloStereo()
        Gets the 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

        public void setBicycloStereo​(chemaxon.struc.BicycloStereoDescriptor[] descriptors)
        Registers the bicyclo stereo information for this atom.
        Parameters:
        descriptors - the array of bicyclo stereo descriptors
        Since:
        Marvin 5.5, 03/23/2011
      • setImplicitHBasedOnValence

        @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.
        Parameters:
        v -
      • getBondArray

        public MolBond[] 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.
        Parameters:
        angle -
      • getChargeAngle

        public double getChargeAngle()
      • isChargeAngleSet

        public boolean isChargeAngleSet()
      • ligands

        public final List<MolAtom> ligands()
        Provides a 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

        public final List<MolBond> bonds()
        Provides a 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)