|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.MolBond
public class MolBond
Chemical bond.
Field Summary | |
---|---|
static int |
ANY
Any bond type. |
static int |
AROMATIC
Aromatic bond type. |
static int |
ARROW
Deprecated. As of Marvin 5.3 |
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 |
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_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS |
Constructor Summary | |
---|---|
|
MolBond(MolAtom a1,
MolAtom a2)
Construct a single bond between two atoms. |
|
MolBond(MolAtom a1,
MolAtom a2,
int f)
Construct a bond between two atoms. |
protected |
MolBond(MolBond b)
Copy constructor. |
Method Summary | |
---|---|
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. |
java.lang.Object |
clone()
Make a copy of this object. |
MolBond |
cloneBond(MolAtom a1,
MolAtom a2)
Clones this bond. |
MolBond |
cloneEdge(MolAtom a1,
MolAtom a2)
Deprecated. As of Marvin 5.3, replaced by cloneBond(MolAtom a1, MolAtom a2) . |
boolean |
containsPropertyKey(java.lang.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. |
boolean |
equals(java.lang.Object obj)
Two bonds equal if their endpoints are the same. |
MolAtom |
getAtom1()
Gets the first endpoint. |
MolAtom |
getAtom2()
Gets the second endpoint. |
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. use desiredLength(int, int, int, int) instead |
double |
getDesiredLength(boolean shortenHbonds)
Deprecated. use desiredLength(int, int, int, int) instead |
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 java.lang.Object |
getLock()
Gets lock object for synchronization. |
MolAtom |
getNode1()
Deprecated. As of Marvin 5.3, replaced by getAtom1() . |
MolAtom |
getNode2()
Deprecated. As of Marvin 5.3, replaced by getAtom2() . |
MolAtom |
getOtherAtom(MolAtom atom)
Gets the other end of the bond. |
MolAtom |
getOtherNode(MolAtom node)
Deprecated. As of Marvin 5.3, replaced by getOtherAtom(MolAtom) . |
MoleculeGraph |
getParent()
Gets the parent graph. |
java.lang.Object |
getProperty(java.lang.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. |
java.lang.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 |
isArrow()
Deprecated. As of Marvin 5.3, |
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 |
isCoordinative()
Deprecated. As of Marvin 5.0, replaced by isCoordinate() |
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 Guide |
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. |
java.util.Set<java.lang.String> |
propertyKeySet()
Returns a set view of the property keys of this bond. |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
propertySet()
Returns a set view of the properties (property key - property value mappings) of this bond. |
void |
putProperty(java.lang.String key,
java.lang.Object value)
Associates the specified value with the specified key at this bond. |
java.lang.Object |
removeProperty(java.lang.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()
Set the bond from 0 to UP or UP to DOWN . |
static boolean |
stepWedge(MolBond[] bs)
Flip the given bonds to the next state ONLY 1 bond is set to chiral starting from the last bond |
void |
swap()
Change orientation. |
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double CCLENGTH
public static final int ANY
public static final int TYPE_MASK
public static final int AROMATIC
public static final int SINGLE_OR_DOUBLE
public static final int SINGLE_OR_AROMATIC
public static final int DOUBLE_OR_AROMATIC
public static final int CONJUGATED
public static final int COORDINATE
public static final int UP
public static final int DOWN
public static final int WAVY
UP
,
DOWN
,
Constant Field Valuespublic static final int STEREO1_MASK
UP
,
DOWN
,
Constant Field Valuespublic static final int STEREO2_CARE
STEREO_MASK
,
Constant Field Valuespublic static final int STEREO_MASK
STEREO1_MASK
,
StereoConstants.CTUMASK
,
STEREO2_CARE
,
Constant Field Valuespublic static final int TOPOLOGY_RING
TOPOLOGY_MASK
,
Constant Field Valuespublic static final int TOPOLOGY_CHAIN
TOPOLOGY_MASK
,
Constant Field Valuespublic static final int TOPOLOGY_MASK
TOPOLOGY_CHAIN
,
TOPOLOGY_RING
,
Constant Field Valuespublic static final int RC_REACTING_CENTER
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_MAKE_OR_BREAK
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_CHANGE
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_MAKE_AND_CHANGE
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_NOT_CENTER
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_NOT_MODIFIED
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int RC_UNMAPPED
REACTING_CENTER_MASK
,
Constant Field Valuespublic static final int REACTING_CENTER_MASK
public static final int SETSEQ_OFF
SETSEQ_MAX
,
Constant Field Valuespublic static final int SETSEQ_MAX
SETSEQ_OFF
,
Constant Field Valuespublic static final int ARROW
public static final int BOLD
public static final int HASHED
Constructor Detail |
---|
public MolBond(MolAtom a1, MolAtom a2, int f)
a1
- the first atoma2
- the second atomf
- bond type and other flagsprotected MolBond(MolBond b)
b
- the original bondpublic MolBond(MolAtom a1, MolAtom a2)
a1
- the first atoma2
- the second atomMethod Detail |
---|
public final MoleculeGraph getParent()
public void swap()
public MolAtom getAtom1()
public MolAtom getAtom2()
public final MolAtom getOtherAtom(MolAtom atom)
atom
- one of the bond endpoints
public final double getLength()
public final int getFlags()
TYPE_MASK
,
STEREO_MASK
,
TOPOLOGY_MASK
,
SETSEQ_OFF
,
REACTING_CENTER_MASK
public void setFlags(int f)
Valence checking is omitted if you set the bond type this way, without setType.b.setFlags((b.getFlags() & ~MolBond.TYPE_MASK) | type);
f
- the flagsTYPE_MASK
,
STEREO_MASK
,
TOPOLOGY_MASK
,
SETSEQ_OFF
,
REACTING_CENTER_MASK
,
setType(int)
public void setFlags(int f, int mask)
Valence checking is omitted if you set the bond type this way, without setType.b.setFlags(type, MolBond.TYPE_MASK);
f
- new value of the specified bitsmask
- bits to setTYPE_MASK
,
STEREO_MASK
,
TOPOLOGY_MASK
,
setFlags(int)
,
setType(int)
public final int getType()
AROMATIC
,
SINGLE_OR_DOUBLE
,
SINGLE_OR_AROMATIC
,
DOUBLE_OR_AROMATIC
,
COORDINATE
,
CONJUGATED
,
ANY
public void setType(int t)
t
- the new bond typegetType()
public final int getSetSeq()
SETSEQ_MAX
public final void setSetSeq(int g)
g
- a number between 0 and SETSEQ_MAX
public final boolean isConjugated()
true
if the bond is a member of a conjugated system,
false
otherwisepublic final boolean isCoordinative()
isCoordinate()
true
if it is coordinative bond,
false
otherwisepublic final boolean isCoordinate()
true
if it is coordinate bond,
false
otherwisepublic final boolean isPositionVariation()
true
if this is a position variation bond,
false
otherwisepublic final boolean isArrow()
true
if this bond represents a reaction arrow,
false
otherwiseARROW
public final boolean isBold()
true
if this bond is bold,
false
otherwiseBOLD
public final boolean isHashed()
true
if this bond is hashed,
false
otherwiseHASHED
public int calcOrderFromLength()
public final int calcOrderFromValence()
public MolBond cloneBond(MolAtom a1, MolAtom a2)
a1
- new end atom 1a2
- new end atom 2
public java.lang.Object clone()
clone
in class java.lang.Object
public double getDesiredLength()
desiredLength(int, int, int, int)
instead
public double getDesiredLength(boolean shortenHbonds)
desiredLength(int, int, int, int)
instead
shortenHbonds
- use 1.0 as bond length for explicit H bonds in 2D.
public static double desiredLength(int atno1, int atno2, int type, int dim)
atno1
- atomic number of the first atomatno2
- atomic number of the second atomtype
- bond orderdim
- space dimension, 2 or 3
public final int getStereo1(MolAtom o)
o
- the chiral atom
UP
,
DOWN
,
STEREO1_MASK
,
getFlags()
public final MolAtom getCTAtom1()
calcStereo2()
public final MolAtom getCTAtom4()
calcStereo2()
public void setStereo2Flags(MolAtom a1, MolAtom a4, int stereo2)
a1
- atom number 1 in scheme a1-a2=a3-a4a4
- atom number 4stereo2
- CIS/TRANS informationStereoConstants.CIS
,
StereoConstants.TRANS
,
StereoConstants.CTUNSPEC
,
StereoConstants.CTUMASK
,
calcStereo2(MolAtom, MolAtom)
public int transformCT(MolAtom a1, MolAtom a4, int f)
a1
- atom connected to atom1a4
- atom connected to atom2f
- original flags
public int calcStereo2()
StereoConstants
,
getCTAtom1()
,
getCTAtom4()
,
calcStereo2(MolAtom, MolAtom)
public int calcStereo2(MolAtom atom1, MolAtom atom4)
atom1
- atom number 1 in scheme a1-a2=a3-a4atom4
- atom number 4
StereoConstants
public static int calcStereo2(MolAtom atom1, MolAtom atom2, MolAtom atom3, MolAtom atom4)
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
StereoConstants
public boolean stepWedge()
UP
or UP to DOWN
.
true
if the initial state was 0 or
UP
, false
after DOWN
.public static boolean stepWedge(MolBond[] bs)
bs
- bond array which elements can be flipped
true
if flipping can be continued,
false
after last steppublic java.lang.String getQuerystr()
public boolean haveEqualProperties(MolBond b)
true
if they have the same properties,
false
otherwiseprotected boolean overridesAtMerge(MolBond e)
e
- the other bond
true
if it overrides e, false
otherwisepublic final boolean isQuery()
true
if the bond has a query bond type or property,
false
otherwiseANY
,
SINGLE_OR_DOUBLE
,
SINGLE_OR_AROMATIC
,
DOUBLE_OR_AROMATIC
,
TOPOLOGY_MASK
,
TOPOLOGY_CHAIN
,
TOPOLOGY_RING
public boolean isCollinear(MolAtom atom)
atom
- Atom to decide about.
true
if atom
and the atoms of the bond
lie on the same lineprotected final java.lang.Object getLock()
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the other object
public java.lang.String toString()
toString
in class java.lang.Object
public final MolAtom getNode1()
getAtom1()
.
public final MolAtom getNode2()
getAtom2()
.
public final MolAtom getOtherNode(MolAtom node)
getOtherAtom(MolAtom)
.
public final MolBond cloneEdge(MolAtom a1, MolAtom a2)
cloneBond(MolAtom a1, MolAtom a2)
.
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> propertySet()
public java.util.Set<java.lang.String> propertyKeySet()
public boolean containsPropertyKey(java.lang.String key)
key
- the property key which is to be searched for.
public java.lang.Object removeProperty(java.lang.String key)
key
- property key whose mapping is to be removed from the bond.
public int propertyCount()
public java.lang.Object getProperty(java.lang.String key)
key
- the property key whose associated property value is to be
returned.
public void putProperty(java.lang.String key, java.lang.Object value)
key
- property key with which the specified value is to be
associated.value
- property value to be associated with the specified property
key.public void clearProperties()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |