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) intprivate SmilesBond[]private static final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields 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) SmilesBondgetAtom(int i) Get the respective atom, 0 or 1getAtom1()intint(package private) static StringgetBondOrderString(int order) (package private) static intgetBondTypeFromCode(char code) intgetOtherNode(SimpleNode atom) intint(package private) static intisBondType(char ch, boolean isSearch, boolean isBioSequence) boolean(package private) booleanisFromPreviousTo(SmilesAtom atom) Check to see if this is the bond to the previous atombooleanboolean(package private) voidset(SmilesBond bond) voidset2(int bondType, boolean isNot) (package private) voidset2a(SmilesAtom a1, SmilesAtom a2) (package private) voidsetAtom2(SmilesAtom atom, SmilesSearch molecule) from parse ring(package private) voidsetAtropType(int nn) setPrimitive(int i) (package private) voidEnsure 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:
getAtomIndex1in classEdge
-
getAtomIndex2
public int getAtomIndex2()- Specified by:
getAtomIndex2in classEdge
-
getCovalentOrder
public int getCovalentOrder()- Specified by:
getCovalentOrderin interfaceSimpleEdge- Specified by:
getCovalentOrderin classEdge- Returns:
- the bond order 1-4 if it is covalent, or 0 if not.
-
getOtherNode
-
isCovalent
public boolean isCovalent()- Specified by:
isCovalentin interfaceSimpleEdge- Specified by:
isCovalentin classEdge
-
isPartial
public boolean isPartial() -
isHydrogen
public boolean isHydrogen()- Specified by:
isHydrogenin classEdge
-
switchAtoms
void switchAtoms()Ensure that atom ordering is proper. possibly not fully tested -
getRealCovalentOrder
public int getRealCovalentOrder() -
getMatchingBond
-
getAtom
Description copied from interface:SimpleEdgeGet the respective atom, 0 or 1- Returns:
- SimpleNode
-