Constructor
# new MoorhenMolecule(commandCentre, glRef, storeopt, 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 | ||
store |
ToolkitStore
|
<optional> |
A Redux store. By default Moorhen Redux store will be used | |
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 |
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
Methods
# async SSMSuperpose(movChainId, refMolNo, refChainId, redrawopt) → {Promise.<void>}
Use SSM to superpose this molecule (as the moving structure) with another molecule isntance
Parameters:
Name | Type | Attributes | Default | 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 | ||
redraw |
boolean
|
<optional> |
true | Indicates if the molecule should be redrawn |
Promise.<void>
# async addDict(fileContent) → {Promise.<void>}
Associate ligand dictionary with this molecule instance
Parameters:
Name | Type | Description |
---|---|---|
fileContent |
string
|
The dictionary contents |
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") |
Promise.<moorhen.WorkerResponse>
# async addRepresentation(style, cid, isCustomopt, colourRulesopt, bondOptionsopt, m2tParamsopt)
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. | |
m2tParams |
moorhen.m2tParameters
|
<optional> |
An object that describes ribbon width, nucleotide style and other ribbon settings. |
# 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 |
# applyTransform()
Apply cached transformation matrix to molecule
# 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 |
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 |
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 |
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 |
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 |
- 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
- True if the current molecule has glycans
Promise.<boolean>
# checkIsLigand() → {boolean}
Check if the molecule instance consists of a ligand
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 |
# clearExtraRestraints() → {Promise.<moorhen.WorkerResponse>}
Clear all additional restraints
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 |
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) |
New molecule instance
Promise.<moorhen.Molecule>
# async copyMolecule(doRedraw) → {moorhen.Molecule}
Copy molecule into a new instance
Parameters:
Name | Type | Description |
---|---|---|
doRedraw |
boolean
|
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) |
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 |
- 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 |
# 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 |
void
# async drawEnvironment(selectionCid) → {Promise.<void>}
Draw enviroment distances for a given residue
Parameters:
Name | Type | Description |
---|---|---|
selectionCid |
string
|
The CID selection to draw the environment |
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 |
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 |
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 |
Promise.<void>
# async drawUnitCell()
Draw the unit cell of this molecule
# 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 |
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 |
- The contents of the gltf file in binary format
ArrayBuffer
# fetchBiomoleculeMatrix() → {void}
Fetch the matrices representing the biomolecule of the current model from gemmi
void
# async fetchDefaultColourRules()
Set the default colour rules for this molecule from libcoot API
# async fetchHeaderInfo(useCache) → {Promise.<libcootApi.headerInfoJS>}
Fetch header information for this molecule instance
Parameters:
Name | Type | Description |
---|---|---|
useCache |
boolean
|
Whether to use the cached results or not |
Object containing header information
Promise.<libcootApi.headerInfoJS>
# 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 |
Promise.<void>
# async fetchSymmetryMatrix() → {Promise.<void>}
Fetch the symmetry matrix for the current model from libcoot api
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 |
- 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 |
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 |
Promise.<void>
# 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 |
A string representation file contents
string
# getChainNames() → {Array.<string>}
Get a list with the names of the chains in the current model
- 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 |
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 |
A list of SVG descriptions for the ligands in this molecule instance
Promise.<Array.<string>>
# async getMoleculeDiameter() → {number}
Get the diameter of this molecule
The molecule diameter
number
# async getNcsRelatedChains() → {Array.<Array.<string>>}
Get chain IDs that are related by NCS or molecular symmetry
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 |
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 |
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
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 |
A list of results from privateer validation
Promise.<Array.<privateer.ResultsEntry>>
# getResidueBFactors() → {Array.<object>}
Get information about the residue B-factors
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 |
An array of objects containing the secondary structure information for each residue
Array.<object>
# getUnitCellParams()
Get the unit cell parameters for the molecule
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 |
# 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 |
Promise.<void>
# async isValidSelection(cid) → {boolean}
Test whether an atom selection is valid
Parameters:
Name | Type | Description |
---|---|---|
cid |
string
|
The CID selection |
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 |
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 |
Promise.<string>
# async loadMissingMonomers() → {Promise.<moorhen.Molecule>}
Attempt to load dictionaries for all missing monomers present in the molecule
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 |
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 |
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 |
The new molecule
Promise.<moorhen.Molecule>
# async lsqkbSuperpose(refMolNo, residueMatches, matchTypeopt, redrawopt) → {Promise.<void>}
Use LSQKB to superpose this molecule (as the moving structure) with another molecule isntance
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
refMolNo |
string
|
Molecule number for the reference structure | ||
residueMatches |
Array.<moorhen.lskqbResidueRangeMatch>
|
A list of objects describing the residue matches for LSQKB | ||
matchType |
number
|
<optional> |
1 | The match type for LSQKB: 0 - all | 1 - main | 2 - CAs |
redraw |
boolean
|
<optional> |
true | Indicates if the molecule should be redrawn |
Promise.<void>
# 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 |
# 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 |
Promise.<void>
# async minimizeEnergyUsingCidAnimated(cid, ncyc, nIterations, useRamaRestraints, ramaWeight, useTorsionRestraints, torsionWeight)
Minimize the energy of a given set of residues (usually a ligand)
Parameters:
Name | Type | Description |
---|---|---|
cid |
The CID for the input residues | |
ncyc |
The number of cycles | |
nIterations |
The number of iterations | |
useRamaRestraints |
Indicates whether ramachandran restraints should be used | |
ramaWeight |
Indicates the weight assigned to ramachandran restraints | |
useTorsionRestraints |
Indicates whether torsion restraints should be used | |
torsionWeight |
Indicates the weight assigned to torsion restraints |
# 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 |
Promise.<void>
# async parseCidIntoSelection(cid) → {object}
Parse a CID selection into a residue selection object
Parameters:
Name | Type | Description |
---|---|---|
cid |
string
|
The CID selection |
An object for the residue selection
object
# async redrawAdaptativeBonds(selectionString) → {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 |
Promise.<void>
# async redrawRepresentation(id)
Redraw a molecule representation
Parameters:
Name | Type | Description |
---|---|---|
id |
string
|
Unique identifier for the representation of interest |
# 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 |
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 |
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 |
# removeRepresentation(representationId)
Remove a representation for this molecule instance
Parameters:
Name | Type | Description |
---|---|---|
representationId |
string
|
The unique identifier for the representation |
# async replaceModelWithCoordData(coordData) → {Promise.<void>}
Replace the current molecule some file contents
Parameters:
Name | Type | Description |
---|---|---|
coordData |
string
|
The coord data for new model |
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 |
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 |
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 |
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 |
# async setDrawAdaptativeBonds(newValue)
Value setter for MoorhenMolecule.adaptativeBondsEnabled
Parameters:
Name | Type | Description |
---|---|---|
newValue |
boolean
|
The new value |
# 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 |
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 |
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 |
- A list with the new molecules
Array.<moorhen.Molecule>
# async transferLigandDicts(toMolecule, overrideopt)
Transfer ligand dictionaries stored in this molecule instance to other molecule
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
toMolecule |
morhen.Molecule
|
The molecule where the metadata will be transferred | ||
override |
boolean
|
<optional> |
false | Override ligand dictionaries already stored under the same ligand name in the other molecule instance |
# async transferMetaData(otherMolecule, transferDictsopt)
Transfer metadata stored in this molecule instance to other molecule
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
otherMolecule |
morhen.Molecule
|
The molecule where the metadata will be transferred | ||
transferDicts |
boolean
|
<optional> |
true | Indicates whether ligand dictionaries should also be transferred |
# 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 |
New atom information for the moved residues
Array.<Array.<moorhen.AtomInfo>>
# 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 |
# async updateAtoms()
Update the cached atoms with the latest information from the libcoot api
# async updateGemmiStructure(coordString) → {Promise.<void>}
Update the cached gemmi structure for this molecule
Parameters:
Name | Type | Description |
---|---|---|
coordString |
string
|
Promise.<void>
# async updateLigands() → {Promise.<void>}
Update the ligand dictionaries for this molecule instance
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 |
Promise.<void>
# static guessCoordFormat(coordDataString) → {string}
Guess the coordinate format from the file contents
Parameters:
Name | Type | Description |
---|---|---|
coordDataString |
string
|
The file contents |
- The file format
string