Package org.jmol.smiles
Class SmilesBond
java.lang.Object
org.jmol.util.Edge
org.jmol.smiles.SmilesBond
- All Implemented Interfaces:
SimpleEdge
Bond in a SmilesMolecule
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
(package private) SmilesAtom
(package private) SmilesAtom
(package private) int[]
(package private) SmilesBond[]
boolean
(package private) boolean
(package private) boolean
(package private) Edge
(package private) int
(package private) int
private SmilesBond[]
private static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.jmol.util.Edge
BOND_AROMATIC, BOND_AROMATIC_DOUBLE, BOND_AROMATIC_MASK, BOND_AROMATIC_SINGLE, BOND_COVALENT_DOUBLE, BOND_COVALENT_MASK, BOND_COVALENT_QUADRUPLE, BOND_COVALENT_QUINTUPLE, BOND_COVALENT_sextuple, BOND_COVALENT_SINGLE, BOND_COVALENT_TRIPLE, BOND_H_CALC, BOND_H_CALC_MASK, BOND_H_MINUS_3, BOND_H_MINUS_4, BOND_H_NUCLEOTIDE, BOND_H_PLUS_2, BOND_H_PLUS_3, BOND_H_PLUS_4, BOND_H_PLUS_5, BOND_H_REGULAR, BOND_HBOND_SHIFT, BOND_HYDROGEN_MASK, BOND_NEW, BOND_ORDER_ANY, BOND_ORDER_NULL, BOND_ORDER_UNSPECIFIED, BOND_PARTIAL_MASK, BOND_PARTIAL01, BOND_PARTIAL12, BOND_PARTIAL23, BOND_PARTIAL32, BOND_PYMOL_MULT, BOND_PYMOL_NOMULT, BOND_RENDER_MASK, BOND_RENDER_SINGLE, BOND_STEREO_EITHER, BOND_STEREO_FAR, BOND_STEREO_MASK, BOND_STEREO_NEAR, BOND_STRUT, BOND_SULFUR_MASK, index, order, TYPE_ATROPISOMER, TYPE_ATROPISOMER_REV
-
Constructor Summary
ConstructorsConstructorDescriptionSmilesBond
(SmilesAtom atom1, SmilesAtom atom2, int bondType, boolean isNot) SmilesBond constructor -
Method Summary
Modifier and TypeMethodDescription(package private) SmilesBond
(package private) SmilesBond
getAtom
(int i) Get the respective atom, 0 or 1getAtom1()
int
int
(package private) static String
getBondOrderString
(int order) (package private) static int
getBondTypeFromCode
(char code) int
getOtherNode
(SimpleNode atom) int
int
(package private) static int
isBondType
(char ch, boolean isSearch, boolean isBioSequence) boolean
(package private) boolean
isFromPreviousTo
(SmilesAtom atom) Check to see if this is the bond to the previous atomboolean
boolean
(package private) void
set
(SmilesBond bond) void
set2
(int bondType, boolean isNot) (package private) void
set2a
(SmilesAtom a1, SmilesAtom a2) (package private) void
setAtom2
(SmilesAtom atom, SmilesSearch molecule) from parse ring(package private) void
setAtropType
(int nn) setPrimitive
(int i) (package private) void
Ensure that atom ordering is proper.toString()
Methods inherited from class org.jmol.util.Edge
getArgbHbondType, getAtropismNode, getAtropismOrder, getAtropismOrder12, getBondOrderFromFloat, getBondOrderFromString, getBondOrderNameFromOrder, getBondOrderNumberFromOrder, getBondType, getCIPChirality, getCmlBondOrder, getCovalentBondOrder, getFloatEncodedInt, getPartialBondDotted, getPartialBondOrder, getPartialBondOrderFromFloatEncodedInt, isAtropism, isOrderH, setCIPChirality
-
Field Details
-
TYPE_UNKNOWN
public static final int TYPE_UNKNOWN- See Also:
-
TYPE_NONE
public static final int TYPE_NONE- See Also:
-
TYPE_AROMATIC
public static final int TYPE_AROMATIC- See Also:
-
TYPE_RING
public static final int TYPE_RING- See Also:
-
TYPE_ANY
public static final int TYPE_ANY- See Also:
-
TYPE_BIO_SEQUENCE
public static final int TYPE_BIO_SEQUENCE- See Also:
-
TYPE_BIO_CROSSLINK
public static final int TYPE_BIO_CROSSLINK- See Also:
-
ALL_BONDS
- See Also:
-
SMILES_BONDS
- See Also:
-
atom1
SmilesAtom atom1 -
atom2
SmilesAtom atom2 -
isNot
boolean isNot -
matchingBond
Edge matchingBond -
primitives
-
nPrimitives
int nPrimitives -
bondsOr
SmilesBond[] bondsOr -
nBondsOr
int nBondsOr -
isConnection
boolean isConnection -
atropType
int[] atropType -
isChain
public boolean isChain
-
-
Constructor Details
-
SmilesBond
SmilesBond constructor- Parameters:
atom1
- First atomatom2
- Second atombondType
- Bond typeisNot
-
-
-
Method Details
-
getBondOrderString
-
getBondTypeFromCode
static int getBondTypeFromCode(char code) - Parameters:
code
- Bond code- Returns:
- Bond type
-
getAtom1
-
set
-
setAtropType
void setAtropType(int nn) -
setPrimitive
-
addBondOr
SmilesBond addBondOr() -
addPrimitive
SmilesBond addPrimitive() -
toString
-
set2
public void set2(int bondType, boolean isNot) -
set2a
-
setAtom2
from parse ring- Parameters:
atom
-molecule
-
-
isFromPreviousTo
Check to see if this is the bond to the previous atom- Parameters:
atom
-- Returns:
- TRUE if other atom is previous atom
-
isBondType
static int isBondType(char ch, boolean isSearch, boolean isBioSequence) throws InvalidSmilesException - Throws:
InvalidSmilesException
-
getValence
public int getValence() -
getOtherAtom
-
getAtomIndex1
public int getAtomIndex1()- Specified by:
getAtomIndex1
in classEdge
-
getAtomIndex2
public int getAtomIndex2()- Specified by:
getAtomIndex2
in classEdge
-
getCovalentOrder
public int getCovalentOrder()- Specified by:
getCovalentOrder
in interfaceSimpleEdge
- Specified by:
getCovalentOrder
in classEdge
- Returns:
- the bond order 1-4 if it is covalent, or 0 if not.
-
getOtherNode
-
isCovalent
public boolean isCovalent()- Specified by:
isCovalent
in interfaceSimpleEdge
- Specified by:
isCovalent
in classEdge
-
isPartial
public boolean isPartial() -
isHydrogen
public boolean isHydrogen()- Specified by:
isHydrogen
in classEdge
-
switchAtoms
void switchAtoms()Ensure that atom ordering is proper. possibly not fully tested -
getRealCovalentOrder
public int getRealCovalentOrder() -
getMatchingBond
-
getAtom
Description copied from interface:SimpleEdge
Get the respective atom, 0 or 1- Returns:
- SimpleNode
-