API Docs for:
Show:

Bond Class

The Class for Bonds

Methods

getBegin

() Atom

Get Begin Atom

Returns:

Atom:

The Atom

getEnd

() Atom

Get End Atom

Returns:

Atom:

The Atom

getLength

() Atom

Get Length of this bond

Returns:

Atom:

Returns the length value

getOrder

() Atom

Get this bond's order

Returns:

Atom:

Returns the length value

getParent

() Molecule

Get this bond's molecule parent

Returns:

Molecule:

Returns the pranet

is

(
  • expression
)
Boolean

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')

setBegin

() Atom

Set Begin Atom

Returns:

Atom:

Returns this

setEnd

() Atom

Set End Atom

Returns:

Atom:

Returns this

setLength

(
  • length
)
Atom

Set Length of this bond

Parameters:

  • length Number

Returns:

Atom:

Returns this

setOrder

() Atom

Set this bond's order

Returns:

Atom:

Returns this

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