Package org.jmol.util
Class Edge
java.lang.Object
org.jmol.util.Edge
- All Implemented Interfaces:
SimpleEdge
- Direct Known Subclasses:
Bond
,SmilesBond
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]
private static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Extended Bond Definition Types Originally these were short 16-bit valuesstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
int
int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getArgbHbondType
(int order) abstract int
abstract int
private static int
getAtropismCode
(int order) static Node
getAtropismNode
(int order, Node a1, boolean isFirst) static int
getAtropismOrder
(int nn, int mm) static int
getAtropismOrder12
(int nnmm) static final int
getBondOrderFromFloat
(float fOrder) static int
Encode name such as 1 2 3 2.1 3.1 single double triple atropisomer_12 or "partial 1.3"static final String
getBondOrderNameFromOrder
(int order) static final String
getBondOrderNumberFromOrder
(int order) used for formatting labels and in the connect PARTIAL commandint
Get the order of the bond.getCIPChirality
(boolean doCalculate) static final String
getCmlBondOrder
(int order) protected static final int
getCovalentBondOrder
(int order) abstract int
static int
getFloatEncodedInt
(String strDecimal) Encodes a string such as "2.10" as an integer instead of a double so as to distinguish "2.1" from "2.10".static final int
getPartialBondDotted
(int order) static final int
getPartialBondOrder
(int order) static int
getPartialBondOrderFromFloatEncodedInt
(int bondOrderInteger) reads standard n.m double-as-integer (n*1000000 + m) and returns partial bond order as (n % 7) << 5 + (m % 0x1F)static boolean
isAtropism
(int order) abstract boolean
abstract boolean
static boolean
isOrderH
(int order) abstract boolean
void
setCIPChirality
(int c) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jmol.util.SimpleEdge
getAtom, getOtherNode
-
Field Details
-
BOND_RENDER_MASK
public static final int BOND_RENDER_MASKExtended Bond Definition Types Originally these were short 16-bit values- See Also:
-
BOND_RENDER_SINGLE
public static final int BOND_RENDER_SINGLE- See Also:
-
TYPE_ATROPISOMER
public static final int TYPE_ATROPISOMER- See Also:
-
TYPE_ATROPISOMER_REV
public static final int TYPE_ATROPISOMER_REV- See Also:
-
ATROPISOMER_SHIFT
private static final int ATROPISOMER_SHIFT- See Also:
-
BOND_STEREO_MASK
public static final int BOND_STEREO_MASK- See Also:
-
BOND_STEREO_NEAR
public static final int BOND_STEREO_NEAR- See Also:
-
BOND_STEREO_FAR
public static final int BOND_STEREO_FAR- See Also:
-
BOND_STEREO_EITHER
public static final int BOND_STEREO_EITHER- See Also:
-
BOND_AROMATIC_MASK
public static final int BOND_AROMATIC_MASK- See Also:
-
BOND_AROMATIC_SINGLE
public static final int BOND_AROMATIC_SINGLE- See Also:
-
BOND_AROMATIC_DOUBLE
public static final int BOND_AROMATIC_DOUBLE- See Also:
-
BOND_AROMATIC
public static final int BOND_AROMATIC- See Also:
-
BOND_SULFUR_MASK
public static final int BOND_SULFUR_MASK- See Also:
-
BOND_PARTIAL_MASK
public static final int BOND_PARTIAL_MASK- See Also:
-
BOND_PARTIAL01
public static final int BOND_PARTIAL01- See Also:
-
BOND_PARTIAL12
public static final int BOND_PARTIAL12- See Also:
-
BOND_PARTIAL23
public static final int BOND_PARTIAL23- See Also:
-
BOND_PARTIAL32
public static final int BOND_PARTIAL32- See Also:
-
BOND_COVALENT_MASK
public static final int BOND_COVALENT_MASK- See Also:
-
BOND_COVALENT_SINGLE
public static final int BOND_COVALENT_SINGLE- See Also:
-
BOND_COVALENT_DOUBLE
public static final int BOND_COVALENT_DOUBLE- See Also:
-
BOND_COVALENT_TRIPLE
public static final int BOND_COVALENT_TRIPLE- See Also:
-
BOND_COVALENT_QUADRUPLE
public static final int BOND_COVALENT_QUADRUPLE- See Also:
-
BOND_COVALENT_QUINTUPLE
public static final int BOND_COVALENT_QUINTUPLE- See Also:
-
BOND_COVALENT_sextuple
public static final int BOND_COVALENT_sextuple- See Also:
-
BOND_ORDER_UNSPECIFIED
public static final int BOND_ORDER_UNSPECIFIED- See Also:
-
BOND_ORDER_ANY
public static final int BOND_ORDER_ANY- See Also:
-
BOND_ORDER_NULL
public static final int BOND_ORDER_NULL- See Also:
-
BOND_STRUT
public static final int BOND_STRUT- See Also:
-
BOND_PYMOL_NOMULT
public static final int BOND_PYMOL_NOMULT- See Also:
-
BOND_PYMOL_MULT
public static final int BOND_PYMOL_MULT- See Also:
-
BOND_NEW
public static final int BOND_NEW- See Also:
-
BOND_HBOND_SHIFT
public static final int BOND_HBOND_SHIFT- See Also:
-
BOND_HYDROGEN_MASK
public static final int BOND_HYDROGEN_MASK- See Also:
-
BOND_H_REGULAR
public static final int BOND_H_REGULAR- See Also:
-
BOND_H_CALC_MASK
public static final int BOND_H_CALC_MASK- See Also:
-
BOND_H_CALC
public static final int BOND_H_CALC- See Also:
-
BOND_H_PLUS_2
public static final int BOND_H_PLUS_2- See Also:
-
BOND_H_PLUS_3
public static final int BOND_H_PLUS_3- See Also:
-
BOND_H_PLUS_4
public static final int BOND_H_PLUS_4- See Also:
-
BOND_H_PLUS_5
public static final int BOND_H_PLUS_5- See Also:
-
BOND_H_MINUS_3
public static final int BOND_H_MINUS_3- See Also:
-
BOND_H_MINUS_4
public static final int BOND_H_MINUS_4- See Also:
-
BOND_H_NUCLEOTIDE
public static final int BOND_H_NUCLEOTIDE- See Also:
-
argbsHbondType
private static final int[] argbsHbondType -
index
public int index -
order
public int order
-
-
Constructor Details
-
Edge
public Edge()
-
-
Method Details
-
getAtomIndex1
public abstract int getAtomIndex1() -
getAtomIndex2
public abstract int getAtomIndex2() -
getCovalentOrder
public abstract int getCovalentOrder()- Specified by:
getCovalentOrder
in interfaceSimpleEdge
- Returns:
- the bond order 1-4 if it is covalent, or 0 if not.
-
isCovalent
public abstract boolean isCovalent()- Specified by:
isCovalent
in interfaceSimpleEdge
-
isPartial
public abstract boolean isPartial() -
isHydrogen
public abstract boolean isHydrogen() -
getArgbHbondType
public static int getArgbHbondType(int order) -
getBondOrderNumberFromOrder
used for formatting labels and in the connect PARTIAL command- Parameters:
order
-- Returns:
- a string representation to preserve float n.m
-
getCmlBondOrder
-
getBondOrderNameFromOrder
-
getAtropismOrder
public static int getAtropismOrder(int nn, int mm) -
getAtropismOrder12
public static int getAtropismOrder12(int nnmm) -
getAtropismCode
private static int getAtropismCode(int order) -
getAtropismNode
-
isAtropism
public static boolean isAtropism(int order) -
isOrderH
public static boolean isOrderH(int order) -
getPartialBondDotted
public static final int getPartialBondDotted(int order) -
getPartialBondOrder
public static final int getPartialBondOrder(int order) -
getCovalentBondOrder
protected static final int getCovalentBondOrder(int order) -
getBondOrderFromFloat
public static final int getBondOrderFromFloat(float fOrder) -
getBondOrderFromString
Encode name such as 1 2 3 2.1 3.1 single double triple atropisomer_12 or "partial 1.3"- Parameters:
s
-- Returns:
- encoded form of bond
-
getPartialBondOrderFromFloatEncodedInt
public static int getPartialBondOrderFromFloatEncodedInt(int bondOrderInteger) reads standard n.m double-as-integer (n*1000000 + m) and returns partial bond order as (n % 7) << 5 + (m % 0x1F)- Parameters:
bondOrderInteger
-- Returns:
- partial bond order encoded as an integer
-
getFloatEncodedInt
Encodes a string such as "2.10" as an integer instead of a double so as to distinguish "2.1" from "2.10". For n.m, returns n * 1000000 + m. 2147483647 is maxvalue, so this allows an encoding of up to n = 2147 and m = 999999 Used in Jmol for model numbers and partial bond orders.- Parameters:
strDecimal
-- Returns:
- double encoded as an integer
-
getBondType
public int getBondType()Description copied from interface:SimpleEdge
Get the order of the bond. This could be covalent order, but also could be NEAR, FAR, etc.- Specified by:
getBondType
in interfaceSimpleEdge
- Returns:
- order
-
setCIPChirality
public void setCIPChirality(int c) - Parameters:
c
-
-
getCIPChirality
- Parameters:
doCalculate
-- Returns:
- CIP chirality label
-