Class

MoorhenMolecule

MoorhenMolecule(commandCentre, glRef, monomerLibraryPathopt)

Represents a molecule
Constructor

# new MoorhenMolecule(commandCentre, glRef, monomerLibraryPathopt)

Parameters:
Name Type Attributes Default Description
commandCentre React.RefObject.<moorhen.CommandCentre> A react reference to the command centre instance
glRef React.RefObject.<webGL.MGWebGL> A react reference to the MGWebGL instance
monomerLibraryPath string <optional>
"./baby-gru/monomers" A string with the path to the monomer library, relative to the root of the app
Properties:
Name Type Description
name string The name assigned to this molecule instance
molNo number The imol assigned to this molecule instance
atomsDirty boolean Whether the cached atoms are outdated
symmetryOn boolean Whether the symmetry is currently being displayed
sequences object List of sequences present in the molecule
gemmiStructure object Object representation of the cached gemmi structure for this molecule
commandCentre React.RefObject.<moorhen.CommandCentre> A react reference to the command centre instance
glRef React.RefObject.<webGL.MGWebGL> A react reference to the MGWebGL instance
monomerLibraryPath string A string with the path to the monomer library, relative to the root of the app

View Source utils/MoorhenMolecule.ts, line 47

Example
import { MoorhenMolecule } from 'moorhen';

// Create a new molecule
const molecule = new MoorhenMolecule(commandCentre, glRef, monomerLibraryPath);

// Set some defaults
molecule.setBackgroundColour(glRef.current.background_colour)

// Load file from a URL
molecule.loadToCootFromURL('/uri/to/file.pdb', 'mol-1');

// Draw coot bond representation and centre on molecule
molecule.fetchIfDirtyAndDraw('CBs');
molecule.centreOn();

// Delete molecule
molecule.delete();

Classes

MoorhenMolecule

Methods

# SSMSuperpose(movChainId, refMolNo, refChainId) → {Promise.<moorhen.WorkerResponse>}

Use SSM to superpose this molecule (as the moving structure) with another molecule isntance
Parameters:
Name Type Description
movChainId string Chain ID for the moving structure
refMolNo string Molecule number for the reference structure
refChainId string Chain ID for the reference structure

View Source utils/MoorhenMolecule.ts, line 2819

Promise.<moorhen.WorkerResponse>

# async addDict(fileContent) → {Promise.<void>}

Associate ligand dictionary with this molecule instance
Parameters:
Name Type Description
fileContent string The dictionary contents

View Source utils/MoorhenMolecule.ts, line 2676

Promise.<void>

# async addLigandOfType(resType, fromMolNoopt) → {Promise.<moorhen.WorkerResponse>}

Add a ligand of a given type to this molecule isntance
Parameters:
Name Type Attributes Default Description
resType string Three letter code for the ligand of interest
fromMolNo number <optional>
-999999 Indicate the molecule number to which the ligand dictionary was associated (use -999999 for "any")

View Source utils/MoorhenMolecule.ts, line 2654

Promise.<moorhen.WorkerResponse>

# async addRepresentation(style, cid, isCustomopt, colourRulesopt, bondOptionsopt, applyColourToNonCarbonAtomsopt)

Add a representation to the molecule
Parameters:
Name Type Attributes Default Description
style string The style of the new representation
cid string The CID selection for the residues included in the new representation
isCustom boolean <optional>
false Indicates if the representation is considered "custom"
colourRules Array.<moorhen.ColourRule> <optional>
A list of colour rules that will be applied to the new representation
bondOptions moorhen.cootBondOptions <optional>
An object that describes bond width, atom/bond ratio and other bond settings.
applyColourToNonCarbonAtoms boolean <optional>
If true then colours are applied to non-carbon atoms also.

View Source utils/MoorhenMolecule.ts, line 2508

# async animateRefine(n_cyc, n_iteration, final_n_cycopt)

Refine a molecule with animation effect
Parameters:
Name Type Attributes Default Description
n_cyc number The total number of refinement cycles for each iteration
n_iteration number The number of iterations
final_n_cyc number <optional>
100 Number of refinement cycles in the last iteration

View Source utils/MoorhenMolecule.ts, line 2801

# applyTransform()

Apply cached transformation matrix to molecule

View Source utils/MoorhenMolecule.ts, line 2630

# buffersInclude(bufferIn) → {boolean}

Check whether a particular buffer is included within the representation buffer for this molecule
Parameters:
Name Type Description
bufferIn The buffer with the ID to search for

View Source utils/MoorhenMolecule.ts, line 2549

True if the buffer is included in this molecule
boolean

# cacheLigandDict(fileContent) → {void}

Internal function used to store a ligand dictionary in the cache for this molecule instance
Parameters:
Name Type Description
fileContent string The dictionary contents

View Source utils/MoorhenMolecule.ts, line 2668

void

# async centreAndAlignViewOn(selectionCid, alignWithCBopt, zoomLevelopt) → {Promise.<void>}

Centre the view and align it with the axis of a particular residue
Parameters:
Name Type Attributes Default Description
selectionCid string CID selection for the residue to centre the view on
alignWithCB boolean <optional>
false Indicates whether to align with the CB atom for better view of the side chain (when present in the residue)
zoomLevel number <optional>
0.3 Indicates the zoom level to use

View Source utils/MoorhenMolecule.ts, line 2477

Promise.<void>

# async centreOn(selectionCid, animateopt) → {Promise.<void>}

Centre the view on a particular residue
Parameters:
Name Type Attributes Default Description
selectionCid string CID selection for the residue to centre the view on
animate boolean <optional>
true Indicates whether the change will be animated

View Source utils/MoorhenMolecule.ts, line 2486

Promise.<void>

# async changeChainId(oldId, newId, startResNo, endResNo) → {number}

Change the ID of a given chain
Parameters:
Name Type Description
oldId string The old chain ID
newId string The new chain ID
startResNo number The start residue number
endResNo number The end residue number

View Source utils/MoorhenMolecule.ts, line 2929

- Status code -1 on a conflict, 1 on good, 0 on did nothing
number

# async checkHasGlycans() → {Promise.<boolean>}

Check if the current molecule has glycans

View Source utils/MoorhenMolecule.ts, line 2446

- True if the current molecule has glycans
Promise.<boolean>

# checkIsLigand() → {boolean}

Check if the molecule instance consists of a ligand

View Source utils/MoorhenMolecule.ts, line 2319

True if the molecule is a ligand
boolean

# clearBuffersOfStyle(style)

Clears the representation buffers for a particular style
Parameters:
Name Type Description
style string The style to clear

View Source utils/MoorhenMolecule.ts, line 2536

# clearExtraRestraints() → {Promise.<moorhen.WorkerResponse>}

Clear all additional restraints

View Source utils/MoorhenMolecule.ts, line 2758

Promise.<moorhen.WorkerResponse>

# async copyFragmentForRefinement(cid, refinementMap, redraw, redrawFragmentFirst) → {moorhen.Molecule}

Copy a fragment of the current model into a new molecule for refinement
Parameters:
Name Type Description
cid Array.<string> The CID selection indicating the residues that will be copied into the new fragment
refinementMap moorhen.Map The map instance used in the refinement
redraw boolean Indicate if the molecules should be redrawn
redrawFragmentFirst boolean Indicate if the fragment should be redrawn first

View Source utils/MoorhenMolecule.ts, line 2356

A new molecule instance that can be used for refinement
moorhen.Molecule

# async copyFragmentUsingCid(cid, doRecentreopt, styleopt) → {Promise.<moorhen.Molecule>}

Copy a fragment of the current model into a new molecule using a selection CID
Parameters:
Name Type Attributes Default Description
cid string The CID selection indicating the residues that will be copied into the new fragment
doRecentre boolean <optional>
true Indicates whether the view should re-centre on the new copied fragment
style boolean <optional>
"CBs" Indicates the style used to draw the copied fragment (only takes effect if doRecentre=true)

View Source utils/MoorhenMolecule.ts, line 2345

New molecule instance
Promise.<moorhen.Molecule>

# async copyMolecule(doRedraw) → {moorhen.Molecule}

Copy molecule into a new instance
Parameters:
Name Type Description
doRedraw boolean

View Source utils/MoorhenMolecule.ts, line 2335

New molecule instance
moorhen.Molecule

# async delete(popBackImolopt) → {Promise.<moorhen.WorkerResponse>}

Delete this molecule instance
Parameters:
Name Type Attributes Default Description
popBackImol boolean <optional>
false Indicates whether the imol for this molecule instance should be popped back (useful for ephemeral molecules)

View Source utils/MoorhenMolecule.ts, line 2327

Promise.<moorhen.WorkerResponse>

# async deleteCid(cid, redrawopt) → {object}

Delete residues in a given CID
Parameters:
Name Type Attributes Default Description
cid string The CID to delete
redraw boolean <optional>
true Indicates if the molecule should be redrawn

View Source utils/MoorhenMolecule.ts, line 2810

- A pair where first is the return status and second is the atom count of the molecule after deletion
object

# async downloadAtoms(formatopt)

Download the PDB file contents of the molecule in its current state
Parameters:
Name Type Attributes Default Description
format string <optional>
'pdb' File format will match the one of the original file unless specified here

View Source utils/MoorhenMolecule.ts, line 2439

# drawBiomolecule(fetchSymMatrixopt) → {void}

Draw symmetry mates for the current molecule
Parameters:
Name Type Attributes Default Description
fetchSymMatrix boolean <optional>
true Indicates whether a new symmetry matrix must be fetched from libcoot api

View Source utils/MoorhenMolecule.ts, line 2268

void

# async drawEnvironment(selectionCid, labelledopt) → {Promise.<void>}

Draw enviroment distances for a given residue
Parameters:
Name Type Attributes Default Description
selectionCid string The CID
labelled boolean <optional>
false Indicates whether the distances should be labelled

View Source utils/MoorhenMolecule.ts, line 2603

Promise.<void>

# async drawHover(selectionString) → {Promise.<void>}

Draw a hover effect over a selected residue
Parameters:
Name Type Description
selectionString string The CID selection for the residue that will be highlighted

View Source utils/MoorhenMolecule.ts, line 2563

Promise.<void>

# async drawResidueSelection(selectionString) → {Promise.<void>}

Highlight residues in a selected CID range
Parameters:
Name Type Description
selectionString string The CID selection for the residues that will be highlighted

View Source utils/MoorhenMolecule.ts, line 2571

Promise.<void>

# async drawSymmetry(fetchSymMatrixopt) → {Promise.<void>}

Draw symmetry mates for the current molecule
Parameters:
Name Type Attributes Default Description
fetchSymMatrix boolean <optional>
true Indicates whether a new symmetry matrix must be fetched from libcoot api

View Source utils/MoorhenMolecule.ts, line 2276

Promise.<void>

# async drawUnitCell()

Draw the unit cell of this molecule

View Source utils/MoorhenMolecule.ts, line 2555

# async drawWithStyleFromMesh(style, meshObjects, cidopt) → {Promise.<void>}

Draw molecule from a given mesh
Parameters:
Name Type Attributes Description
style string Indicate the style to be drawn
meshObjects Array.<any> The mesh obects that will be drawn
cid string <optional>
The new buffer CID selection

View Source utils/MoorhenMolecule.ts, line 2496

Promise.<void>

# async exportAsGltf(representationId) → {ArrayBuffer}

Export the current molecule as a gltf file in binary format
Parameters:
Name Type Description
representationId string The id of the representation to export

View Source utils/MoorhenMolecule.ts, line 2901

- The contents of the gltf file in binary format
ArrayBuffer

# fetchBiomoleculeMatrix() → {void}

Fetch the matrices representing the biomolecule of the current model from gemmi

View Source utils/MoorhenMolecule.ts, line 2254

void

# async fetchDefaultColourRules()

Set the default colour rules for this molecule from libcoot API

View Source utils/MoorhenMolecule.ts, line 2718

# async fetchIfDirtyAndDraw(style) → {Promise.<void>}

Draw the molecule with a particular style. If the molecule atoms are marked as "dirty" then fetch new atoms.
Parameters:
Name Type Description
style string The style that will be drawn

View Source utils/MoorhenMolecule.ts, line 2467

Promise.<void>

# async fetchSymmetryMatrix() → {Promise.<void>}

Fetch the symmetry matrix for the current model from libcoot api

View Source utils/MoorhenMolecule.ts, line 2261

Promise.<void>

# async fitLigand(mapMolNo, ligandMolNo, fitRightHereopt, redrawopt, useConformersopt, conformerCountopt) → {Promise.<Array.<moorhen.Molecule>>}

A function to fit a given ligand
Parameters:
Name Type Attributes Default Description
mapMolNo number The map iMol that will be used for ligand fitting
ligandMolNo number The ligand iMol that will be fitted
fitRightHere boolean <optional>
true Indicates if the ligand should be fitted at the current origin
redraw boolean <optional>
false Indicates if the fitted ligands should be drawn
useConformers boolean <optional>
false Indicates if there is need to test multiple conformers
conformerCount number <optional>
0 Conformer count

View Source utils/MoorhenMolecule.ts, line 2832

- A list of fitted ligands
Promise.<Array.<moorhen.Molecule>>

# async gemmiAtomsForCid(cid) → {Promise.<Array.<moorhen.AtomInfo>>}

Get atom information for a given CID selection
Parameters:
Name Type Description
cid string The CID selection

View Source utils/MoorhenMolecule.ts, line 2705

JS objects containing atom information
Promise.<Array.<moorhen.AtomInfo>>

# async generateSelfRestraints(cidopt, maxRadiusopt) → {Promise.<void>}

Generate self restraints
Parameters:
Name Type Attributes Default Description
cid string <optional>
"//" The CID for local restraints
maxRadius number <optional>
4.2 The maximum radius for the restraints

View Source utils/MoorhenMolecule.ts, line 2752

Promise.<void>

# async getActiveAtom() → {string}

Get the active atom for this molecule

View Source utils/MoorhenMolecule.ts, line 2578

The active atom CID
string

# async getAtoms(formatopt) → {string}

Get a string with the PDB file contents of the molecule in its current state
Parameters:
Name Type Attributes Default Description
format string <optional>
'pdb' File format will match the one of the original file unless specified here

View Source utils/MoorhenMolecule.ts, line 2432

A string representation file contents
string

# getChainNames() → {Array.<string>}

Get a list with the names of the chains in the current model

View Source utils/MoorhenMolecule.ts, line 2636

- A list of chain names in the current structure
Array.<string>

# getDict(comp_id) → {string}

Get dictionary for a ligand associated with this molecule
Parameters:
Name Type Description
comp_id string Three letter code for the ligand of interest

View Source utils/MoorhenMolecule.ts, line 2661

The ligand dictionary
string

# async getLigandSVG(resName, useCache) → {Promise.<Array.<string>>}

Get SVG descriptions for the ligands in this molecule instance
Parameters:
Name Type Description
resName string The name of the ligand to get SVG descriptions for
useCache boolean Whether to use the cached results or not

View Source utils/MoorhenMolecule.ts, line 2918

A list of SVG descriptions for the ligands in this molecule instance
Promise.<Array.<string>>

# async getMoleculeDiameter() → {number}

Get the diameter of this molecule

View Source utils/MoorhenMolecule.ts, line 2453

The molecule diameter
number

# async getNcsRelatedChains() → {Array.<Array.<string>>}

Get chain IDs that are related by NCS or molecular symmetry

View Source utils/MoorhenMolecule.ts, line 2845

An array of arrays where chain IDs are grouped together
Array.<Array.<string>>

# async getNeighborResiduesCids(selectionCid, radius, minDist, maxDist) → {Promise.<Array.<string>>}

Get the CIDs for all residues wihtin a distance threshold of a set of residues
Parameters:
Name Type Description
selectionCid string The CID indicating the selection of residues used for the search
radius number The radius used in the search
minDist number Minimum distance for the serch
maxDist number Maximum distance for the search

View Source utils/MoorhenMolecule.ts, line 2307

List of CIDs with the residues found within the radius of search
Promise.<Array.<string>>

# getNonSelectedCids(cid) → {Array.<string>}

Get the CIDs of residues not included in the input CID
Parameters:
Name Type Description
cid string The input CID selection

View Source utils/MoorhenMolecule.ts, line 2885

An array of CIDs for the residue ranges not included in the input CID
Array.<string>

# async getNumberOfAtoms() → {Promise.<number>}

A function to get the number of atoms in the current molecule

View Source utils/MoorhenMolecule.ts, line 2852

The number of atoms in the molecule
Promise.<number>

# async getPrivateerValidation(useCache) → {Promise.<Array.<privateer.ResultsEntry>>}

Get results of privateer validation for this molecule instance
Parameters:
Name Type Description
useCache boolean Whether to use the cached results or not

View Source utils/MoorhenMolecule.ts, line 2909

A list of results from privateer validation
Promise.<Array.<privateer.ResultsEntry>>

# getResidueBFactors() → {Array.<object>}

Get information about the residue B-factors

View Source utils/MoorhenMolecule.ts, line 2838

An array of objects indicating the residue CID and B-factor
Array.<object>

# async getSecondaryStructInfo(modelNumber) → {Array.<object>}

Get the secondary structure information for the residues in the current molecule
Parameters:
Name Type Description
modelNumber number The model number to extract secondary structure information from

View Source utils/MoorhenMolecule.ts, line 2893

An array of objects containing the secondary structure information for each residue
Array.<object>

# getUnitCellParams()

Get the unit cell parameters for the molecule

View Source utils/MoorhenMolecule.ts, line 2296

An object with the unit cell parameters

# hide(style, cidopt)

Hide a type of representation for the molecule
Parameters:
Name Type Attributes Description
style string The representation style to hide
cid string <optional>
The CID selection for the representation

View Source utils/MoorhenMolecule.ts, line 2530

# async hideCid(cid, redrawopt) → {Promise.<void>}

Hide representations for a given CID selection
Parameters:
Name Type Attributes Default Description
cid string The CID selection
redraw boolean <optional>
true Indicates if the molecule should be redrawn

View Source utils/MoorhenMolecule.ts, line 2727

Promise.<void>

# async isValidSelection(cid) → {boolean}

Test whether an atom selection is valid
Parameters:
Name Type Description
cid string The CID selection

View Source utils/MoorhenMolecule.ts, line 2878

Whether the selection is valid
boolean

# isVisible(excludeStyles) → {boolean}

Determine whether this molecule instance has any visible buffers
Parameters:
Name Type Description
excludeStyles Array.<string> A list of representation styles that should be excluded from this check

View Source utils/MoorhenMolecule.ts, line 2712

True if the molecule has any visible buffers
boolean

# async loadMissingMonomer(newTlc, attachToMolecule) → {Promise.<string>}

Load a the missing dictionary for a monomer. First attempts to load it from the monomer library, if it fails it will load from the EBI.
Parameters:
Name Type Description
newTlc string Three letter code for the monomer
attachToMolecule number Molecule number for which the dicitonary will be associated

View Source utils/MoorhenMolecule.ts, line 2409

Promise.<string>

# async loadMissingMonomers() → {Promise.<moorhen.Molecule>}

Attempt to load dictionaries for all missing monomers present in the molecule

View Source utils/MoorhenMolecule.ts, line 2416

This molecule instance
Promise.<moorhen.Molecule>

# async loadToCootFromFile(source) → {Promise.<moorhen.Molecule>}

Load a new molecule from the contents of a file
Parameters:
Name Type Description
source File The input file

View Source utils/MoorhenMolecule.ts, line 2384

The new molecule
Promise.<moorhen.Molecule>

# async loadToCootFromString(coordData, name) → {Promise.<moorhen.Molecule>}

Load a new molecule from a string
Parameters:
Name Type Description
coordData string The molecule data
name string The new molecule name

View Source utils/MoorhenMolecule.ts, line 2400

The new molecule
Promise.<moorhen.Molecule>

# async loadToCootFromURL(url, molName, optionsopt) → {Promise.<moorhen.Molecule>}

Load a new molecule from a file URL
Parameters:
Name Type Attributes Description
url string The url to the path with the data for the new molecule
molName string The new molecule name
options object <optional>
Options passed to fetch API

View Source utils/MoorhenMolecule.ts, line 2376

The new molecule
Promise.<moorhen.Molecule>

# async mergeFragmentFromRefinement(cid, fragmentMolecule, acceptTransformopt, refineAfterMergeopt)

Merge a fragment that was used for refinement into the current molecule
Parameters:
Name Type Attributes Default Description
cid Array.<string> The CID selection used to create the fragment
fragmentMolecule moorhen.Molecule The fragment molecule
acceptTransform boolean <optional>
true Indicates whether the transformation should be accepted
refineAfterMerge boolean <optional>
false Indicates whether another cycle of refinement should be run after merging the fragment

View Source utils/MoorhenMolecule.ts, line 2366

# async mergeMolecules(otherMolecules, doHideopt) → {Promise.<void>}

Merge a set of molecules in this molecule instance
Parameters:
Name Type Attributes Default Description
otherMolecules moorhen.Molecule A list of other molecules to merge into this instance
doHide boolean <optional>
false Indicates whether the source molecules should be hidden when finish

View Source utils/MoorhenMolecule.ts, line 2645

Promise.<void>

# async moveMoleculeHere(x, y, z) → {Promise.<void>}

Move the molecule to a new position
Parameters:
Name Type Description
x number Coordinate X
y number Coordinate Y
z number Coordinate Z

View Source utils/MoorhenMolecule.ts, line 2862

Promise.<void>

# async parseCidIntoSelection(cid) → {object}

Parse a CID selection into a residue selection object
Parameters:
Name Type Description
cid string The CID selection

View Source utils/MoorhenMolecule.ts, line 2870

An object for the residue selection
object

# parseSequences() → {void}

Parse the sequences in the molecule

View Source utils/MoorhenMolecule.ts, line 2313

void

# async redo() → {Promise.<void>}

Redo last action performed on this molecule

View Source utils/MoorhenMolecule.ts, line 2690

Promise.<void>

# async redraw() → {Promise.<void>}

Redraw the molecule representations

View Source utils/MoorhenMolecule.ts, line 2610

Promise.<void>

# async redrawAdaptativeBonds(selectionString, maxDist) → {Promise.<void>}

Draw bonds for a given glRef origin
Parameters:
Name Type Description
selectionString string The CID selection for the residues that will be highlighted
maxDist number The maximum distance from the central residue to draw bonds

View Source utils/MoorhenMolecule.ts, line 2594

Promise.<void>

# async redrawRepresentation(id)

Redraw a molecule representation
Parameters:
Name Type Description
id string Unique identifier for the representation of interest

View Source utils/MoorhenMolecule.ts, line 2515

# async refineResidueRange(chainId, start, stop, ncycopt, redrawopt) → {Promise.<void>}

Refine a residue range
Parameters:
Name Type Attributes Default Description
chainId string The chain ID for the residue range
start string First residue number in the range
stop string Last residue number in the range
ncyc number <optional>
4000 Number of refinement cycles
redraw boolean <optional>
true Indicates if the molecule should be redrawn

View Source utils/MoorhenMolecule.ts, line 2781

Promise.<void>

# async refineResiduesUsingAtomCid(cid, mode, ncycopt, redrawopt) → {Promise.<void>}

Refine a set of residues
Parameters:
Name Type Attributes Default Description
cid string The CID selection with the atoms that should be refined
mode string Refinement mode (SINGLE, TRIPLE ...etc.)
ncyc number <optional>
4000 Number of refinement cycles
redraw boolean <optional>
true Indicates if the molecule should be redrawn

View Source utils/MoorhenMolecule.ts, line 2769

Promise.<void>

# async refineResiduesUsingAtomCidAnimated(cid, activeMap, dist, redraw, redrawFragmentFirst)

Refine a residue CID with animation
Parameters:
Name Type Description
cid Array.<string> The CID selection used to create the fragment
activeMap moorhen.Map The map instance used in the refinement
dist number The maximum distance used to get neighboring residues for the refinement. Use -1 for literal CID instead of neighbours.
redraw boolean Indicate if the molecules should be redrawn
redrawFragmentFirst boolean Indicate if the fragment should be redrawn first

View Source utils/MoorhenMolecule.ts, line 2792

# removeRepresentation(representationId)

Remove a representation for this molecule instance
Parameters:
Name Type Description
representationId string The unique identifier for the representation

View Source utils/MoorhenMolecule.ts, line 2542

# async replaceModelWithCoordData(coordData) → {Promise.<void>}

Replace the current molecule some file contents
Parameters:
Name Type Description
coordData string The coord data for new model

View Source utils/MoorhenMolecule.ts, line 2229

Promise.<void>

# async replaceModelWithFile(fileUrl) → {Promise.<void>}

Replace the current molecule with the model in a file
Parameters:
Name Type Description
fileUrl string The uri to the file with the new model

View Source utils/MoorhenMolecule.ts, line 2221

Promise.<void>

# async rigidBodyFit(cidsString, mapNo) → {Promise.<void>}

Run rigid body fitting
Parameters:
Name Type Description
cidsString string Residue CID selection
mapNo number Map number that should be used

View Source utils/MoorhenMolecule.ts, line 2743

Promise.<void>

# setAtomsDirty(state) → {void}

Set the cached molecule atoms as "dirty". This means new bond representations need to be fetched next time the molecule is redrawn.
Parameters:
Name Type Description
state boolean Indicate whether the current atom representation is dirty

View Source utils/MoorhenMolecule.ts, line 2424

void

# setBackgroundColour(backgroundColour)

Set the background colour where the molecule is being drawn. Used to detect whether the background is dark and molecule needs to be rendered using lighter colours.
Parameters:
Name Type Description
backgroundColour Array.<number> The rgba indicating the background colour

View Source utils/MoorhenMolecule.ts, line 2282

# async setDrawAdaptativeBonds(newValue)

Value setter for MoorhenMolecule.adaptativeBondsEnabled
Parameters:
Name Type Description
newValue boolean The new value

View Source utils/MoorhenMolecule.ts, line 2585

# setSymmetryRadius(radius) → {Promise.<void>}

Set the radius to draw symmetry mates
Parameters:
Name Type Description
radius number Symmetry mates with an atom within this radius will be drawn

View Source utils/MoorhenMolecule.ts, line 2248

Promise.<void>

# show(style, cidopt) → {void}

Show the representation for the molecule
Parameters:
Name Type Attributes Description
style string The representation style to show
cid string <optional>
The CID selection for the representation

View Source utils/MoorhenMolecule.ts, line 2523

void

# async splitMultiModels(drawopt) → {Array.<moorhen.Molecule>}

Split a molecule with multiple models into separate molecules (one for each model)
Parameters:
Name Type Attributes Default Description
draw boolean <optional>
false Indicates whether the new molecules should be drawn

View Source utils/MoorhenMolecule.ts, line 2937

- A list with the new molecules
Array.<moorhen.Molecule>

# toggleBiomolecule() → {void}

Turn on/off molecule symmetry

View Source utils/MoorhenMolecule.ts, line 2235

void

# toggleSymmetry() → {Promise.<void>}

Turn on/off molecule symmetry

View Source utils/MoorhenMolecule.ts, line 2241

Promise.<void>

# transformedCachedAtomsAsMovedAtoms(selectionCid) → {Array.<Array.<moorhen.AtomInfo>>}

Move residues by applying a series of cached matrix transformations
Parameters:
Name Type Description
selectionCid string The CID selection for the set of residues that will be moved

View Source utils/MoorhenMolecule.ts, line 2617

New atom information for the moved residues
Array.<Array.<moorhen.AtomInfo>>

# async undo() → {Promise.<void>}

Undo last action performed on this molecule

View Source utils/MoorhenMolecule.ts, line 2683

Promise.<void>

# async unhideAll(redrawopt)

Unhide all the molecule representations
Parameters:
Name Type Attributes Default Description
redraw boolean <optional>
true Indicates if the molecule should be redrawn

View Source utils/MoorhenMolecule.ts, line 2734

# async updateAtoms()

Update the cached atoms with the latest information from the libcoot api

View Source utils/MoorhenMolecule.ts, line 2459

# async updateGemmiStructure(coordString) → {Promise.<void>}

Update the cached gemmi structure for this molecule
Parameters:
Name Type Description
coordString string

View Source utils/MoorhenMolecule.ts, line 2290

Promise.<void>

# async updateLigands() → {Promise.<void>}

Update the ligand dictionaries for this molecule instance

View Source utils/MoorhenMolecule.ts, line 2697

Promise.<void>

# async updateWithMovedAtoms(movedResidues) → {Promise.<void>}

Update the molecule with a set of moved residues
Parameters:
Name Type Description
movedResidues Array.<Array.<moorhen.AtomInfo>> Set of moved residues

View Source utils/MoorhenMolecule.ts, line 2625

Promise.<void>

# static guessCoordFormat(coordDataString) → {string}

Guess the coordinate format from the file contents
Parameters:
Name Type Description
coordDataString string The file contents

View Source utils/MoorhenMolecule.ts, line 2391

- The file format
string