Constructor
new Molecule()
Atomic model
Extends
Members
(static) threeToOne :string
Three to One Letter Converter for amino-acids and nucleotides
Type:
- string
Example
var aa = Structure.threeToOne("GLN"); // returns 'Q' in uppercase
var nucl = Structure.threeToOne("DA"); // returns 'a' in lowercase
atoms :Array(Atom)
Atoms - Array of module:mol.Atom
Type:
- Array(Atom)
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
atom |
Atom |
Properties
|
- See:
bbox
Bounding Box
Properties:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
min |
vec3 | Top-left-front corner of the bounding box Properties
|
||||||||||||
max |
vec3 | Bottom-right-back corner of the bounding box Properties
|
- Inherited From:
bonds :Array(Bond)
Bonds
Type:
- Array(Bond)
- See:
-
- mol.Bond
centroid :vec3
Center of Gravity - Centroid
Type:
- vec3
Properties:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
centroid |
vec3 | Center of gravity or centroid of this structure Properties
|
- Inherited From:
chains
Chains
colors :Array(RGBColor)
RGB Colors
Type:
- Array(RGBColor)
ID :string
Identifier
Type:
- string
- Inherited From:
information :object
Information
Type:
- object
- Inherited From:
Methods
atomFinder(callback) → {Array(Atom)}
Filter the atoms in function of their properties
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | A function for filtering |
Returns:
- Type
- Array(Atom)
Example
// Extract CA atoms from mystructure
var selA = mystructure.atomFinder(
function (atom) {
if ( atom.name === 'CA') {
return true;
}
}
);
calcPhiPsi()
Compute the phi and psi dihedral angles of this structure. The angles are stored in the CA atom of each group.
Example
// Compute phi and psi dihedral angles from mystructure
mystructure.calcPhiPsi();
console.log(mystructure.getAtomByLabel("[10].CA").phi); //
fasta() → {string}
Return the primary sequence in FASTA format
Returns:
The sequence in FASTA format
- Type
- string
finder(src, callback) → {Array(Atom)}
Filter the atoms or bonds in function of their properties
Parameters:
Name | Type | Description |
---|---|---|
src |
string | The type of objects (ATOM or BOND ) on which the filter is applied |
callback |
function | A function for filtering |
Returns:
- Type
- Array(Atom)
Example
// Extract CA atoms from mystructure
var selA = mystructure.finder(
'ATOM',
function (atom) {
if ( atom.name === 'CA') {
return true;
}
}
);
getAtomByLabel(pattern) → {Atom}
Get first atom corresponding to the pattern In MOWGLI, each atom has a label following the following syntax:
- <PDBID>.<modelID>.<chainID>[<secStruct>].<groupName>([<groupSerial>].<atomName>[<atomSerial>]
- A.[1].CA corresponds to the alpha carbon belonging to the first residue of chain A of the PDB structure 1ZNI
- .CA corresponds to the first alpha carbon found in this structure
Parameters:
Name | Type | Description |
---|---|---|
pattern |
string | A simplified regular expression |
Returns:
- Type
- Atom
Example
// Get the first atom carbon alpha (CA) found in chain B
var atom = mystructure.getAtomByLabel("B*.CA");
isMolecule() → {boolean}
Is this structure an atomic model? (instance of class Molecule)
- Inherited From:
Returns:
- true if this structure is an atomic model.
- Type
- boolean
isRaster() → {boolean}
Is this structure a 2D/3D-raster? (instance of class Raster)
- Inherited From:
Returns:
- true if this structure is a 2D- or 3D-raster (image or volume/map).
- Type
- boolean
secondary() → {string}
Return the secondary structures in FASTA format -- if available.
Returns:
The secondary structures of sequence in FASTA format
- Type
- string
setTitle(str)
Set Title
Parameters:
Name | Type | Description |
---|---|---|
str |
string | Set a new title |
- Inherited From: