Package chemaxon.struc
Class MolBond
- java.lang.Object
-
- chemaxon.struc.MolBond
-
- All Implemented Interfaces:
StereoConstants
,Serializable
- Direct Known Subclasses:
QueryBond
@PublicAPI public class MolBond extends Object implements StereoConstants, Serializable
Chemical bond.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ANY
Any bond type.static int
AROMATIC
Aromatic bond type.static int
BOLD
"Bold" attribute of the bond.static double
CCLENGTH
Default bond length.static int
CONJUGATED
Conjugation state of the bond.static int
COORDINATE
Coordinate bond flag.static int
DOUBLE_OR_AROMATIC
Double or aromatic query bond type.static int
DOWN
Single bond down flag.static int
HASHED
"Hashed" attribute of the bond.static int
HYDROGEN
Hydrogen bond type.static int
RC_CHANGE
The bond (order) has changed in the reaction.static int
RC_MAKE_AND_CHANGE
The bond is created and changed.static int
RC_MAKE_OR_BREAK
The bond is made or broken in the reaction.static int
RC_NOT_CENTER
The bond is not a reacting center.static int
RC_NOT_MODIFIED
The bond is not modified in the reaction.static int
RC_REACTING_CENTER
The bond is a reacting center.static int
RC_UNMAPPED
Unmapped bond in reacting center.static int
REACTING_CENTER_MASK
Mask for reacting center bits.static int
SETSEQ_MAX
Maximum bond set sequence number.static int
SETSEQ_OFF
Bond set sequence number offset in flags.static int
SINGLE_OR_AROMATIC
Single or aromatic query bond type.static int
SINGLE_OR_DOUBLE
Single or double query bond type.static int
STEREO_MASK
Single and double bond stereo mask.static int
STEREO1_MASK
Single bond stereo mask.static int
STEREO2_CARE
Cis/trans info of this bond is taken care of during the SSS process if this flag is set - used only for query bonds.static int
TOPOLOGY_CHAIN
Bond is in a chain.static int
TOPOLOGY_MASK
Bond topology mask.static int
TOPOLOGY_RING
Bond is in a ring.static int
TYPE_MASK
The lowest bits of the flags that store the bond type.static int
UP
Single bond up flag.static int
WAVY
Single bond wavy flag.-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
calcOrderFromLength()
Calculate the bond order from the atomic distances.int
calcOrderFromValence()
Calculate bond order from the types and charges of the two atoms.int
calcStereo2()
Computes the stereochemistry of the bond based on the atomic coordinates.int
calcStereo2(MolAtom atom1, MolAtom atom4)
Computes the stereochemistry of the bond based on the atomic coordinates.static int
calcStereo2(MolAtom atom1, MolAtom atom2, MolAtom atom3, MolAtom atom4)
Computes the stereochemistry of the atom sequence (scheme a1-a2=a3-a4) based on the atomic coordinates.void
clearProperties()
Removes all properties from this bond.Object
clone()
Make a copy of this object.MolBond
cloneBond(MolAtom a1, MolAtom a2)
Clones this bond.boolean
containsPropertyKey(String key)
Returns true if this bond has a mapping for the specified property key.static double
desiredLength(int atno1, int atno2, int type, int dim)
Desired length of a bond between two atoms in Angstroms.MolAtom
getAtom1()
Gets the first endpoint.MolAtom
getAtom2()
Gets the second endpoint.chemaxon.struc.BondType
getBondType()
Gets the type of the bond.MolAtom
getCTAtom1()
Gets the first atom for cis/trans stereo calculation.MolAtom
getCTAtom4()
Gets the fourth atom for cis/trans stereo calculation.double
getDesiredLength()
Deprecated.since 5.11, replaced bydesiredLength(int, int, int, int)
.double
getDesiredLength(boolean shortenHbonds)
Deprecated.since 5.11, replaced bydesiredLength(int, int, int, int)
.int
getFlags()
Gets bond type (4 bits), stereo (2+2+1 bits), topology (2 bits), bond set (5 bits) and reacting center (7 bits) information.double
getLength()
Gets the actual length of the bond.protected Object
getLock()
Gets lock object for synchronization.MolAtom
getOtherAtom(MolAtom atom)
Gets the other end of the bond.MoleculeGraph
getParent()
Gets the parent graph.Object
getProperty(String key)
Returns the property value to which the specified property key is mapped at this bond, or null if this bond has no mapping for this property key.String
getQuerystr()
Gets the query properties.int
getSetSeq()
Gets the bond set.int
getStereo1(MolAtom o)
Gets wedge bond type relative to the specified chiral atom.int
getType()
Gets the bond type.boolean
haveEqualProperties(MolBond b)
Tests whether two bonds have the same properties.boolean
isBold()
Decides whether this bond is bold or not.boolean
isCollinear(MolAtom atom)
Returns whether atom is collinear with the bond or not.boolean
isConjugated()
Gets the conjugation state of the bond set by the conjugation modul.boolean
isCoordinate()
Tests whether the bond is coordinate.boolean
isHashed()
Decides whether this bond is hashed or not.boolean
isPositionVariation()
Decides whether this bond is a position variation bond.boolean
isQuery()
Tests whether it is query bond or has query property: any single or double single or aromatic double or aromatic smarts bond ring or chain topology For more information on smarts bond and query bonds, see The JChem Query Guideboolean
isRemovable()
Deprecated.As of Marvin 6.2, no replacement.
Not supported feature.protected boolean
overridesAtMerge(MolBond e)
Checks if this bond should override another one when two structures are merged.int
propertyCount()
Returns the number of property (property key - property value) mappings of this bond.Set<String>
propertyKeySet()
Returns a set view of the property keys of this bond.Set<Map.Entry<String,Object>>
propertySet()
Returns a set view of the properties (property key - property value mappings) of this bond.void
putProperty(String key, Object value)
Associates the specified value with the specified key at this bond.Object
removeProperty(String key)
Removes the mapping for this property key from this bond if present.void
setFlags(int f)
Sets bond type (4 bit), stereo (2+2+1 bit), topology (2 bit) bond set (5 bit) and reacting center (7 bits) information.void
setFlags(int f, int mask)
Sets bond type (3 bit), stereo (2+2+1 bit), and topology (2 bit) information.void
setSetSeq(int g)
Sets the bond set.void
setStereo2Flags(MolAtom a1, MolAtom a4, int stereo2)
Sets double bond stereo information.void
setType(int t)
Sets bond type and does valence checking for the endpoints.boolean
stepWedge()
void
swap()
Change orientation.String
toString()
Overrides Object.toString() to ease debugging.int
transformCT(MolAtom a1, MolAtom a4, int f)
Transform cis/trans stereo information into the `reference frame' of this bond.
-
-
-
Field Detail
-
CCLENGTH
public static final double CCLENGTH
Default bond length.- See Also:
- Constant Field Values
-
ANY
public static final int ANY
Any bond type.- See Also:
- Constant Field Values
-
TYPE_MASK
public static final int TYPE_MASK
The lowest bits of the flags that store the bond type.- See Also:
- Constant Field Values
-
AROMATIC
public static final int AROMATIC
Aromatic bond type.- See Also:
- Constant Field Values
-
SINGLE_OR_DOUBLE
public static final int SINGLE_OR_DOUBLE
Single or double query bond type.- See Also:
- Constant Field Values
-
SINGLE_OR_AROMATIC
public static final int SINGLE_OR_AROMATIC
Single or aromatic query bond type.- See Also:
- Constant Field Values
-
DOUBLE_OR_AROMATIC
public static final int DOUBLE_OR_AROMATIC
Double or aromatic query bond type.- See Also:
- Constant Field Values
-
CONJUGATED
public static final int CONJUGATED
Conjugation state of the bond.- Since:
- Marvin 4.1, 06/13/2006
- See Also:
- Constant Field Values
-
COORDINATE
public static final int COORDINATE
Coordinate bond flag.- Since:
- Marvin 5.0, 12/04/2007
- See Also:
- Constant Field Values
-
HYDROGEN
public static final int HYDROGEN
Hydrogen bond type.- Since:
- Marvin 6.2, 15/07/2013
- See Also:
- Constant Field Values
-
UP
public static final int UP
Single bond up flag.- See Also:
- Constant Field Values
-
DOWN
public static final int DOWN
Single bond down flag.- See Also:
- Constant Field Values
-
WAVY
public static final int WAVY
Single bond wavy flag. It equals UP | DOWN.- Since:
- Marvin 4.1
- See Also:
UP
,DOWN
, Constant Field Values
-
STEREO1_MASK
public static final int STEREO1_MASK
Single bond stereo mask. It equals UP | DOWN.- See Also:
UP
,DOWN
, Constant Field Values
-
STEREO2_CARE
public static final int STEREO2_CARE
Cis/trans info of this bond is taken care of during the SSS process if this flag is set - used only for query bonds.- See Also:
STEREO_MASK
, Constant Field Values
-
STEREO_MASK
public static final int STEREO_MASK
Single and double bond stereo mask. It equals STEREO1_MASK | CTUMASK | STEREO2_CARE.
-
TOPOLOGY_RING
public static final int TOPOLOGY_RING
Bond is in a ring.- See Also:
TOPOLOGY_MASK
, Constant Field Values
-
TOPOLOGY_CHAIN
public static final int TOPOLOGY_CHAIN
Bond is in a chain.- See Also:
TOPOLOGY_MASK
, Constant Field Values
-
TOPOLOGY_MASK
public static final int TOPOLOGY_MASK
Bond topology mask. It equals TOPOLOGY_CHAIN | TOPOLOGY_RING- See Also:
TOPOLOGY_CHAIN
,TOPOLOGY_RING
, Constant Field Values
-
RC_REACTING_CENTER
public static final int RC_REACTING_CENTER
The bond is a reacting center.- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_MAKE_OR_BREAK
public static final int RC_MAKE_OR_BREAK
The bond is made or broken in the reaction.- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_CHANGE
public static final int RC_CHANGE
The bond (order) has changed in the reaction.- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_MAKE_AND_CHANGE
public static final int RC_MAKE_AND_CHANGE
The bond is created and changed.- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_NOT_CENTER
public static final int RC_NOT_CENTER
The bond is not a reacting center. This is an additional ChemDraw feature (value 15 in RXN file).- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_NOT_MODIFIED
public static final int RC_NOT_MODIFIED
The bond is not modified in the reaction.- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
RC_UNMAPPED
public static final int RC_UNMAPPED
Unmapped bond in reacting center. This is a ChemDraw feature that is not represented in neither standard nor ChemDraw generated RXN files (likely only in .cdx)- Since:
- Marvin 4.1
- See Also:
REACTING_CENTER_MASK
, Constant Field Values
-
REACTING_CENTER_MASK
public static final int REACTING_CENTER_MASK
Mask for reacting center bits.- Since:
- Marvin 4.1
- See Also:
- Constant Field Values
-
SETSEQ_OFF
public static final int SETSEQ_OFF
Bond set sequence number offset in flags.- Since:
- Marvin 3.3
- See Also:
SETSEQ_MAX
, Constant Field Values
-
SETSEQ_MAX
public static final int SETSEQ_MAX
Maximum bond set sequence number.- Since:
- Marvin 3.3
- See Also:
SETSEQ_OFF
, Constant Field Values
-
BOLD
public static final int BOLD
"Bold" attribute of the bond. Recognized only for single and double bonds- See Also:
- Constant Field Values
-
HASHED
public static final int HASHED
"Hashed" attribute of the bond.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MolBond
public MolBond(MolAtom a1, MolAtom a2, int f)
Construct a bond between two atoms.- Parameters:
a1
- the first atoma2
- the second atomf
- bond type and other flags
-
MolBond
protected MolBond(MolBond b)
Copy constructor.- Parameters:
b
- the original bond- Since:
- 3.5.2, 12/15/2004
-
-
Method Detail
-
getParent
public final MoleculeGraph getParent()
Gets the parent graph.- Returns:
- the parent graph
-
swap
public void swap()
Change orientation.
-
getAtom1
public MolAtom getAtom1()
Gets the first endpoint.- Returns:
- the first endpoint
-
getAtom2
public MolAtom getAtom2()
Gets the second endpoint.- Returns:
- the second endpoint
-
getOtherAtom
public final MolAtom getOtherAtom(MolAtom atom)
Gets the other end of the bond.- Parameters:
atom
- one of the bond endpoints- Returns:
- the other endpoint,
or
null
if the given atom is not an endpoint for this bond - Since:
- Marvin 3.0
-
getLength
public final double getLength()
Gets the actual length of the bond.- Returns:
- the distance between the two atoms
-
getFlags
public final int getFlags()
Gets bond type (4 bits), stereo (2+2+1 bits), topology (2 bits), bond set (5 bits) and reacting center (7 bits) information.- Returns:
- the flags
- See Also:
TYPE_MASK
,STEREO_MASK
,TOPOLOGY_MASK
,SETSEQ_OFF
,REACTING_CENTER_MASK
-
setFlags
public void setFlags(int f)
Sets bond type (4 bit), stereo (2+2+1 bit), topology (2 bit) bond set (5 bit) and reacting center (7 bits) information. Bond type can be set by callingb.setFlags((b.getFlags() & ~MolBond.TYPE_MASK) | type);
setType
.- Parameters:
f
- the flags- Since:
- Marvin 2.5
- See Also:
TYPE_MASK
,STEREO_MASK
,TOPOLOGY_MASK
,SETSEQ_OFF
,REACTING_CENTER_MASK
,setType(int)
-
setFlags
public void setFlags(int f, int mask)
Sets bond type (3 bit), stereo (2+2+1 bit), and topology (2 bit) information. Bond type can be set by callingb.setFlags(type, MolBond.TYPE_MASK);
setType
.- Parameters:
f
- new value of the specified bitsmask
- bits to set- See Also:
TYPE_MASK
,STEREO_MASK
,TOPOLOGY_MASK
,setFlags(int)
,setType(int)
-
getType
public final int getType()
Gets the bond type. Possible values: 1 (single), 2 (double), 3 (triple), aromatic, coordinate, conjugated and query bond types.- Returns:
- the bond type
- See Also:
AROMATIC
,SINGLE_OR_DOUBLE
,SINGLE_OR_AROMATIC
,DOUBLE_OR_AROMATIC
,COORDINATE
,CONJUGATED
,ANY
-
getBondType
public final chemaxon.struc.BondType getBondType()
Gets the type of the bond.- Returns:
- the bond type of the bond
-
setType
public void setType(int t)
Sets bond type and does valence checking for the endpoints.- Parameters:
t
- the new bond type- See Also:
getType()
-
getSetSeq
public final int getSetSeq()
Gets the bond set.- Returns:
- a number between 0 and
SETSEQ_MAX
- Since:
- Marvin 3.3
-
setSetSeq
public final void setSetSeq(int g)
Sets the bond set.- Parameters:
g
- a number between 0 andSETSEQ_MAX
- Since:
- Marvin 3.3
-
isConjugated
public final boolean isConjugated()
Gets the conjugation state of the bond set by the conjugation modul.- Returns:
true
if the bond is a member of a conjugated system,false
otherwise- Since:
- Marvin 4.1, 06/13/2006
-
isCoordinate
public final boolean isCoordinate()
Tests whether the bond is coordinate.- Returns:
true
if it is coordinate bond,false
otherwise- Since:
- Marvin 5.0, 12/04/2007
-
isPositionVariation
public final boolean isPositionVariation()
Decides whether this bond is a position variation bond.- Returns:
true
if this is a position variation bond,false
otherwise- Since:
- Marvin 5.3, 01/05/2010
-
isBold
public final boolean isBold()
Decides whether this bond is bold or not.- Returns:
true
if this bond is bold,false
otherwise- Since:
- Marvin 5.3, 09/24/2009
- See Also:
BOLD
-
isHashed
public final boolean isHashed()
Decides whether this bond is hashed or not.- Returns:
true
if this bond is hashed,false
otherwise- Since:
- Marvin 5.7
- See Also:
HASHED
-
calcOrderFromLength
public int calcOrderFromLength()
Calculate the bond order from the atomic distances. The returned value should only be considered as an approximation.- Returns:
- the bond order
-
calcOrderFromValence
public final int calcOrderFromValence()
Calculate bond order from the types and charges of the two atoms.- Returns:
- the bond order
-
cloneBond
public MolBond cloneBond(MolAtom a1, MolAtom a2)
Clones this bond. The parent molecule and the end atoms are not cloned.- Parameters:
a1
- new end atom 1a2
- new end atom 2- Returns:
- the clone
- Since:
- Marvin 4.1, 09/22/2005
-
clone
public Object clone()
Make a copy of this object. These are not cloned:- End Atoms;
- Parent molecule;
- MDocument: Although the bondset information is cloned, when the cloned bond is taken to another MDocument, the format (color, font type) will be lost.
-
getDesiredLength
@Deprecated public double getDesiredLength()
Deprecated.since 5.11, replaced bydesiredLength(int, int, int, int)
.Desired length of a bond between two atoms in Angstroms. Works only for bonds in a molecule.- Returns:
- the desired length
-
getDesiredLength
@Deprecated public double getDesiredLength(boolean shortenHbonds)
Deprecated.since 5.11, replaced bydesiredLength(int, int, int, int)
.Desired length of a bond between two atoms in Angstroms. Works only for bonds in a molecule.- Parameters:
shortenHbonds
- use 1.0 as bond length for explicit H bonds in 2D.- Returns:
- the desired length
-
desiredLength
public static double desiredLength(int atno1, int atno2, int type, int dim)
Desired length of a bond between two atoms in Angstroms.- Parameters:
atno1
- atomic number of the first atomatno2
- atomic number of the second atomtype
- bond orderdim
- space dimension, 2 or 3- Returns:
- the desired length
-
getStereo1
public final int getStereo1(MolAtom o)
Gets wedge bond type relative to the specified chiral atom.- Parameters:
o
- the chiral atom- Returns:
- the wedge bond type or zero
- See Also:
UP
,DOWN
,STEREO1_MASK
,getFlags()
-
getCTAtom1
public final MolAtom getCTAtom1()
Gets the first atom for cis/trans stereo calculation.- Returns:
- atom a1 from a1-a2=a3-a4, or null in other configurations
- See Also:
calcStereo2()
-
getCTAtom4
public final MolAtom getCTAtom4()
Gets the fourth atom for cis/trans stereo calculation.- Returns:
- atom a4 from a1-a2=a3-a4, or null in other configurations
- See Also:
calcStereo2()
-
setStereo2Flags
public void setStereo2Flags(MolAtom a1, MolAtom a4, int stereo2)
Sets double bond stereo information. Normally invoked by the SMILES import process.- Parameters:
a1
- atom number 1 in scheme a1-a2=a3-a4a4
- atom number 4stereo2
- CIS/TRANS information- See Also:
StereoConstants.CIS
,StereoConstants.TRANS
,StereoConstants.CTUNSPEC
,StereoConstants.CTUMASK
,calcStereo2(MolAtom, MolAtom)
-
transformCT
public int transformCT(MolAtom a1, MolAtom a4, int f)
Transform cis/trans stereo information into the `reference frame' of this bond. a1 == null and/or a4 == null is also accepted, null corresponds to any neighbor of a2 or a4 that is different than the reference atoms (the first ligands).- Parameters:
a1
- atom connected to atom1a4
- atom connected to atom2f
- original flags- Returns:
- the transformed flags
-
calcStereo2
public int calcStereo2()
Computes the stereochemistry of the bond based on the atomic coordinates. Note that this member function does not change the stereo flags. Bond type is not checked.- Returns:
- 0, CIS, TRANS, or CIS|TRANS
- See Also:
StereoConstants
,getCTAtom1()
,getCTAtom4()
,calcStereo2(MolAtom, MolAtom)
-
calcStereo2
public int calcStereo2(MolAtom atom1, MolAtom atom4)
Computes the stereochemistry of the bond based on the atomic coordinates. Note that this member function does not change the stereo flags. Bond type and connectivity are not checked (thus being bound to this bond is not a requirement for atoms a1 and a4).- Parameters:
atom1
- atom number 1 in scheme a1-a2=a3-a4atom4
- atom number 4- Returns:
- 0, CIS, TRANS, or CIS|TRANS
- See Also:
StereoConstants
-
calcStereo2
public static int calcStereo2(MolAtom atom1, MolAtom atom2, MolAtom atom3, MolAtom atom4)
Computes the stereochemistry of the atom sequence (scheme a1-a2=a3-a4) based on the atomic coordinates. Note that this member function does not change any stereo flags. Connectivity are not checked.- Parameters:
atom1
- atom number 1 in scheme a1-a2=a3-a4atom2
- atom number 2 in scheme a1-a2=a3-a4atom3
- atom number 3 in scheme a1-a2=a3-a4atom4
- atom number 4 in scheme a1-a2=a3-a4- Returns:
- 0, CIS, TRANS, or CIS|TRANS
- See Also:
StereoConstants
-
stepWedge
public boolean stepWedge()
-
getQuerystr
public String getQuerystr()
Gets the query properties.- Returns:
- the query string
- Since:
- Marvin 3.4
-
haveEqualProperties
public boolean haveEqualProperties(MolBond b)
Tests whether two bonds have the same properties. Two bonds have equal properties if their flags are equal.- Returns:
true
if they have the same properties,false
otherwise- Since:
- Marvin 3.4.1, 07/06/2004
-
overridesAtMerge
protected boolean overridesAtMerge(MolBond e)
Checks if this bond should override another one when two structures are merged. Aromatic bonds override non-aromatic bonds, higher order bonds override lower order bonds.- Parameters:
e
- the other bond- Returns:
true
if it overrides e,false
otherwise- Since:
- Marvin 3.5, 09/30/2004
-
isQuery
public final boolean isQuery()
Tests whether it is query bond or has query property:- any
- single or double
- single or aromatic
- double or aromatic
- smarts bond
- ring or chain topology
- Returns:
true
if the bond has a query bond type or property,false
otherwise- Since:
- Marvin 3.4
- See Also:
ANY
,SINGLE_OR_DOUBLE
,SINGLE_OR_AROMATIC
,DOUBLE_OR_AROMATIC
,TOPOLOGY_MASK
,TOPOLOGY_CHAIN
,TOPOLOGY_RING
-
isCollinear
public boolean isCollinear(MolAtom atom)
Returns whether atom is collinear with the bond or not. (Calculates from coordinates.)- Parameters:
atom
- Atom to decide about.- Returns:
true
ifatom
and the atoms of the bond lie on the same line- Since:
- Marvin 4.0 12/16/2004
-
getLock
protected final Object getLock()
Gets lock object for synchronization.- Returns:
- reference to the top parent graph
-
toString
public String toString()
Overrides Object.toString() to ease debugging.
-
propertySet
public Set<Map.Entry<String,Object>> propertySet()
Returns a set view of the properties (property key - property value mappings) of this bond. Each element in the returned set is a Map.Entry. Changes to the properties are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding property from this, 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 properties of this bond.
- Since:
- Marvin 5.10
-
propertyKeySet
public Set<String> propertyKeySet()
Returns a set view of the property keys of this bond. Changes to the properties of this bond 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 bond.
- Since:
- Marvin 5.10
-
containsPropertyKey
public boolean containsPropertyKey(String key)
Returns true if this bond 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.10
-
removeProperty
public Object removeProperty(String key)
Removes the mapping for this property key from this bond if present.- Parameters:
key
- property key whose mapping is to be removed from the bond.- Returns:
- previous poperty value associated with specified property key, or null if there was no mapping for property key. A null return can also indicate that the property mapping previously associated null with the specified property key.
- Since:
- Marvin 5.10
-
propertyCount
public int propertyCount()
Returns the number of property (property key - property value) mappings of this bond.- Returns:
- the number of property mappings of this bond.
- Since:
- Marvin 5.10
-
getProperty
public Object getProperty(String key)
Returns the property value to which the specified property key is mapped at this bond, or null if this bond has no mapping for this property key. A return value of null does not necessarily indicate that the bond has no mapping for the property key; it is also possible that the bond 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 bond maps the specified property key, or null if the bond has no mapping for this property key.
- Since:
- Marvin 5.10
-
putProperty
public void putProperty(String key, Object value)
Associates the specified value with the specified key at this bond. If this bond 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.10
-
clearProperties
public void clearProperties()
Removes all properties from this bond.- Since:
- Marvin 5.10
-
isRemovable
@Deprecated public boolean isRemovable()
Deprecated.As of Marvin 6.2, no replacement.
Not supported feature.Decides whether the bond can be removed from the molecule. It depends on its end atoms. If one of the end atom is LeavingGroupAtom and not removable then the bond itself is not removable.- Returns:
- true
-
-