Class: StructureConfigs

Kekule.Editor. StructureConfigs

new StructureConfigs()

Configs of molecule structure settings.
Properties:
Name Type Description
defBondType String Default type of bond.
defBondOrder Int Default order of bond.
defBondLength Int Default bond length.
defBondAngles Array A mapping of default 2D bond angles to different bond types, in arc. The mapping is a series of values like the following: angles[bondOrder1][0] = [defaultAngle]; angles[bondOrder1][bondOrder2] = [angle of two bonds];
bondConstrainedDirectionDelta Float When moving bond, the bond angle will be changed in n*delta in constrained mode.
bondConstrainedDirectionAngles Array When moving bond, besides bondConstrainedDirectionDelta, bond angle can also be "docked" to these values.
bondConstrainedDirectionAngleThreshold Float
initialBondDirection Float When create a brand new bond (without any existed bond connected), which direction should the bond be.
defIsotopeId String Default isotope of atom.
primaryOrgChemAtoms Array Atom symbols of most often seen in organic chemistry.
enableChargeAndRadicalMarker Bool If true, marker objects will be used in editor to represent charge and radical.
The Int max atom count when creating carbon chain using flex chain tool. 0 means no restricts.
minFlexRingAtomCount Int The min atom count when creating carbon ring using flex ring tool.
maxFlexRingAtomCount Int The max atom count when creating carbon ring using flex ring tool. 0 means no restricts. //@property {Int} initialFlexRingAtomCount The initial atom count when creating carbon ring using flex ring tool.
nonAtomNodeInputSetting Hash Settings to restrict the input types of non-atom node.
Source:

Extends

  • Kekule.AbstractConfigs

Methods

getDefAngleOfBonds(bondOrder1, bondOrder2) → {Float}

Get the default bond angle of two valence bonds.
Parameters:
Name Type Description
bondOrder1 Int
bondOrder2 Int
Source:
Returns:
Type
Float

getNewBondDefAngle(startObj, newBondOrder) → {Float}

Returns default angle when added new bond to startObj.
Parameters:
Name Type Description
startObj Kekule.ChemObject
newBondOrder Int
Source:
Returns:
Type
Float