Bond Class
The Class for Bonds
Constructor
Bond
()
Item Index
Methods
is
(
Boolean
-
expression
Check if this bond matches with given expression
Parameters:
-
expression
String
Returns:
Boolean:
Returns the result
Example:
bond.is('Aromatic')
bond.is('InRing')
bond.is('Rotor')
bond.is('Amide')
bond.is('PrimaryAmide')
bond.is('SecondaryAmide')
bond.is('TertiaryAmide')
bond.is('Ester')
bond.is('Carbonyl')
bond.is('Single')
bond.is('Double')
bond.is('Triple')
bond.is('KSingle')
bond.is('KTriple')
bond.is('Closure')
bond.is('Up')
bond.is('Down')
bond.is('Wedge')
bond.is('Hash')
bond.is('WedgeOrHash')
bond.is('CisOrTrans')
Properties
index
Number
Index of this bond
Example:
mol.forEachBond(function(bond) {
console.log(bond.index);
});
console.log(mol.bonds[0].index); // Prints 1
order
Number
Order of this bond (1=single, 2=double, ..., 5= aromatic)
Example:
console.log(bond.order);
bond.order = 1; // Single bond