ClustENM(D) simulations

Copyright (c) 2020-2022 Burak Kaynak, Pemra Doruker.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

class ClustENM(title=None)[source]

ClustENMv2 is the new version of ClustENM(v1) conformation sampling algorithm [KZ16]. This ANM-based hybrid algorithm requires PDBFixer and OpenMM for performing energy minimization and MD simulations in implicit/explicit solvent. It is Python 3.6 compatible and has been only tested on Linux machines.

[KZ16]Kurkcuoglu Z., Bahar I., Doruker P., ClustENM: ENM-based sampling of essential conformational space at full atomic resolution. J Chem 2016 12(9):4549-4562.
[PE17]Eastman P., Swails J., Chodera J.D., McGibbon R.T., Zhao Y., Beauchamp K.A., Wang L.P., Simmonett A.C., Harrigan M.P., Stern C.D., Wiewiora R.P., Brooks B.R., Pande V.S., OpenMM 7: Rapid Development of High Performance Algorithms for Molecular Dynamics. PLoS Comput Biol 2017 13:e1005659.

Instantiate a ClustENM object.

addCoordset(coords)[source]

Add coordinate set(s) to the ensemble.

Parameters:coords (ndarray) – coordinate set(s)
delCoordset(index)

Delete a coordinate set from the ensemble.

delData(label)

Return data associated with label and remove from the instance. If data associated with label is not found, return None.

deselect()

Undoes the selection.

getAtoms(selected=True)[source]

Returns atoms.

getConformation(index)

Returns conformation at given index.

getCoords(selected=True)

Returns a copy of reference coordinates for selected atoms.

getCoordsets(indices=None, selected=True)

Returns a copy of coordinate set(s) at given indices, which may be an integer, a list of integers or None. None returns all coordinate sets. For reference coordinates, use getCoords() method.

getData(key, gen=None)[source]

Returns data.

Parameters:
  • key (str) – Key
  • gen (int) – Generation
getDataLabels(which=None)

Returns data labels. For which='user', return only labels of user provided data.

getDataType(label)

Returns type of the data (i.e. data.dtype) associated with label, or None label is not used.

getDefvecs(pairwise=False)

Calculate and return deformation vectors (defvecs). Note that you might need to align the conformations using superpose() or iterpose() before calculating defvecs.

Parameters:pairwise (bool) – if True then it will return pairwise defvecs as an n-by-n matrix. n is the number of conformations.
getDeviations()

Returns deviations from reference coordinates for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to calculating deviations.

getIndices()

Returns a copy of indices of selected columns

getKeys(gen=None)[source]

Returns keys.

Parameters:gen (int) – Generation number.
getLabels(gen=None)[source]

Returns labels.

Parameters:gen (int) – Generation number.
getMSFs()

Returns mean square fluctuations (MSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to MSF calculation.

getPotentials(gen=None)[source]

Returns potentials.

Parameters:gen (int) – Generation number.
getRMSDs(pairwise=False)

Returns root mean square deviations (RMSDs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSD calculation.

Parameters:pairwise (bool) – if True then it will return pairwise RMSDs as an n-by-n matrix. n is the number of conformations.
getRMSFs()

Returns root mean square fluctuations (RMSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSF calculation.

getSizes(gen=None)[source]

Returns the number of unminimized conformers represented by a cluster centroid.

Parameters:gen (int) – Generation number.
getTitle()[source]

Returns the title.

getWeights(selected=True)

Returns a copy of weights of selected atoms.

isDataLabel(label)

Returns True if data associated with label is present.

isSelected()

Returns if a subset of atoms are selected.

iterCoordsets()

Iterate over coordinate sets. A copy of each coordinate set for selected atoms is returned. Reference coordinates are not included.

iterpose(rmsd=0.0001, quiet=False)

Iteratively superpose the ensemble until convergence. Initially, all conformations are aligned with the reference coordinates. Then mean coordinates are calculated, and are set as the new reference coordinates. This is repeated until reference coordinates do not change. This is determined by the value of RMSD between the new and old reference coordinates. Note that at the end of the iterative procedure the reference coordinate set will be average of conformations in the ensemble.

Parameters:rmsd (float) – change in reference coordinates to determine convergence, default is 0.0001 Å RMSD
numAtoms(selected=True)

Returns number of atoms.

numConfs(gen=None)[source]

Returns the number of conformers.

Parameters:gen (int) – Generation number.
numCoordsets()

Returns number of conformations.

numGenerations()[source]

Returns the number of generations.

numSelected()

Returns number of selected atoms. Number of all atoms will be returned if a selection is not made. A subset of atoms can be selected by passing a selection to setAtoms().

run(cutoff=15.0, n_modes=3, gamma=1.0, n_confs=50, rmsd=1.0, n_gens=5, maxclust=None, threshold=None, solvent='imp', sim=True, force_field=None, temp=303.15, t_steps_i=1000, t_steps_g=7500, outlier=True, mzscore=3.5, **kwargs)[source]

Performs a ClustENM run.

Parameters:
  • cutoff (float) – Cutoff distance (A) for pairwise interactions used in ANM computations, default is 15.0 A.
  • gamma (float) – Spring constant of ANM, default is 1.0.
  • n_modes (int) – Number of non-zero eigenvalues/vectors to calculate.
  • n_confs (int) – Number of new conformers to be generated based on any conformer from the previous generation, default is 50.
  • rmsd (float, tuple of floats) – Average RMSD of the new conformers with respect to the conformer from which they are generated, default is 1.0 A. A tuple of floats can be given, e.g. (1.0, 1.5, 1.5) for subsequent generations. Note: In the case of ClustENMv1, this value is the maximum rmsd, not the average.
  • n_gens (int) – Number of generations.
  • maxclust (int or tuple of integers) – Maximum number of clusters for each generation, default in None. A tuple of integers can be given, e.g. (10, 30, 50) for subsequent generations. Warning: Either maxclust or RMSD threshold should be given! For large number of generations and/or structures, specifying maxclust is more efficient.
  • threshold (float or tuple of floats) – RMSD threshold to apply when forming clusters, default is None. This parameter has been used in ClustENMv1, setting it to 75% of the maximum RMSD value used for sampling. A tuple of floats can be given, e.g. (1.5, 2.0, 2.5) for subsequent generations. Warning: This threshold should be chosen carefully in ClustENMv2 for efficiency.
  • solvent (str) – Solvent model to be used. If it is set to ‘imp’ (default), implicit solvent model will be used, whereas ‘exp’ stands for explicit solvent model. Warning: In the case of nucleotide chains, explicit solvent model is automatically set.
  • padding (float) – Padding distance to use for solvation. Default is 1.0 nm.
  • ionicStrength (float) – Total concentration of ions (both positive and negative) to add. This does not include ions that are added to neutralize the system. Default concentration is 0.0 molar.
  • force_field (tuple of strings) – Implicit solvent force field is (‘amber99sbildn.xml’, ‘amber99_obc.xml’). Explicit solvent force field is (‘amber14-all.xml’, ‘amber14/tip3pfb.xml’). Experimental feature: Forcefields already implemented in OpenMM can be used.
  • tolerance (float) – Energy tolerance to which the system should be minimized, default is 10.0 kJ/mole.
  • maxIterations (int) – Maximum number of iterations to perform during energy minimization. If this is 0 (default), minimization is continued until the results converge without regard to how many iterations it takes.
  • sim (bool) – If it is True (default), a short MD simulation is performed after energy minimization. Note: There is also a heating-up phase until the desired temperature is reached.
  • temp (float) – Temperature at which the simulations are conducted, default is 303.15 K.
  • t_steps_i – Duration of MD simulation (number of time steps) for the starting structure following the heating-up phase, default is 1000. Each time step is 2.0 fs. Note: Default value reduces possible drift from the starting structure.

:type t_steps_i : int

Parameters:
  • t_steps_g (int or tuple of integers) – Duration of MD simulations (number of time steps) to run for each conformer following the heating-up phase, default is 7500. Each time step is 2.0 fs. A tuple of integers can be given, e.g. (3000, 5000, 7000) for subsequent generations.
  • outlier (bool) – Exclusion of conformers detected as outliers in each generation. Default is True for implicit solvent. Outliers, if any, are detected by the modified z-scores of the conformers’ potential energies over a generation. Note: It is automatically set to False when explicit solvent model is being used.
  • mzscore (float) – Modified z-score threshold to label conformers as outliers. Default is 3.5.
  • v1 (bool) – Original sampling method with complete enumeration of desired ANM modes is used. Default is False. Maximum number of modes should not exceed 5 for efficiency.
  • platform (str) – Architecture on which the OpenMM part runs, default is None. It can be chosen as ‘CUDA’, ‘OpenCL’ or ‘CPU’. For efficiency, ‘CUDA’ or ‘OpenCL’ is recommended.
  • parallel (bool) – If it is True (default is False), conformer generation will be parallelized.
  • fitmap (EMDMAP) – Cryo-EM map for fitting using a protocol similar to MDeNM-EMFit Default None
  • fit_resolution (float) – Resolution for comparing to cryo-EM map for fitting Default 5 Angstroms
  • replace_filtered (bool) – If it is True (default is False), conformer sampling and filtering will be repeated until the desired number of conformers have been kept.
select(selection)

Selects columns corresponding to a part of the atoms.

setAtoms(atoms, pH=7.0)[source]

Sets atoms.

Parameters:
  • atomsatoms parsed by parsePDB
  • pH (float) – pH based on which to select protonation states for adding missing hydrogens, default is 7.0.
setCoords(coords)

Set coords as the ensemble reference coordinate set. coords may be an array with suitable data type, shape, and dimensionality, or an object with getCoords() method.

setData(label, data)

Store atomic data under label, which must:

  • start with a letter
  • contain only alphanumeric characters and underscore
  • not be a reserved word (see listReservedWords())

data must be a list() or a ndarray and its length must be equal to the number of atoms. If the dimension of the data array is 1, i.e. data.ndim==1, label may be used to make atom selections, e.g. "label 1 to 10" or "label C1 C2". Note that, if data with label is present, it will be overwritten.

setTitle(title)[source]

Set title.

Parameters:title (str) – Title of the ClustENM object.
setWeights(weights)

Set atomic weights.

superpose(**kwargs)

Superpose the ensemble onto the reference coordinates.

Parameters:ref (int) – index of the reference coordinate. If None, the average coordinate will be assumed as the reference. Default is None
writePDB(filename=None, single=True, **kwargs)[source]

Write conformers in PDB format to a file.

Parameters:
  • filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
  • single (bool) – If it is True (default), then the conformers will be saved into a single PDB file with each conformer as a model. Otherwise, a directory will be created with the filename, and each conformer will be saved as a separate PDB file.
writePDBFixed()[source]

Write the fixed (initial) structure to a pdb file.

writeParameters(filename=None)[source]

Write the parameters defined to a text file.

Parameters:filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
class ClustRTB(title=None)[source]

Experimental.

addCoordset(coords)

Add coordinate set(s) to the ensemble.

Parameters:coords (ndarray) – coordinate set(s)
delCoordset(index)

Delete a coordinate set from the ensemble.

delData(label)

Return data associated with label and remove from the instance. If data associated with label is not found, return None.

deselect()

Undoes the selection.

getAtoms(selected=True)

Returns atoms.

getConformation(index)

Returns conformation at given index.

getCoords(selected=True)

Returns a copy of reference coordinates for selected atoms.

getCoordsets(indices=None, selected=True)

Returns a copy of coordinate set(s) at given indices, which may be an integer, a list of integers or None. None returns all coordinate sets. For reference coordinates, use getCoords() method.

getData(key, gen=None)

Returns data.

Parameters:
  • key (str) – Key
  • gen (int) – Generation
getDataLabels(which=None)

Returns data labels. For which='user', return only labels of user provided data.

getDataType(label)

Returns type of the data (i.e. data.dtype) associated with label, or None label is not used.

getDefvecs(pairwise=False)

Calculate and return deformation vectors (defvecs). Note that you might need to align the conformations using superpose() or iterpose() before calculating defvecs.

Parameters:pairwise (bool) – if True then it will return pairwise defvecs as an n-by-n matrix. n is the number of conformations.
getDeviations()

Returns deviations from reference coordinates for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to calculating deviations.

getIndices()

Returns a copy of indices of selected columns

getKeys(gen=None)

Returns keys.

Parameters:gen (int) – Generation number.
getLabels(gen=None)

Returns labels.

Parameters:gen (int) – Generation number.
getMSFs()

Returns mean square fluctuations (MSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to MSF calculation.

getPotentials(gen=None)

Returns potentials.

Parameters:gen (int) – Generation number.
getRMSDs(pairwise=False)

Returns root mean square deviations (RMSDs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSD calculation.

Parameters:pairwise (bool) – if True then it will return pairwise RMSDs as an n-by-n matrix. n is the number of conformations.
getRMSFs()

Returns root mean square fluctuations (RMSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSF calculation.

getSizes(gen=None)

Returns the number of unminimized conformers represented by a cluster centroid.

Parameters:gen (int) – Generation number.
getTitle()

Returns the title.

getWeights(selected=True)

Returns a copy of weights of selected atoms.

isDataLabel(label)

Returns True if data associated with label is present.

isSelected()

Returns if a subset of atoms are selected.

iterCoordsets()

Iterate over coordinate sets. A copy of each coordinate set for selected atoms is returned. Reference coordinates are not included.

iterpose(rmsd=0.0001, quiet=False)

Iteratively superpose the ensemble until convergence. Initially, all conformations are aligned with the reference coordinates. Then mean coordinates are calculated, and are set as the new reference coordinates. This is repeated until reference coordinates do not change. This is determined by the value of RMSD between the new and old reference coordinates. Note that at the end of the iterative procedure the reference coordinate set will be average of conformations in the ensemble.

Parameters:rmsd (float) – change in reference coordinates to determine convergence, default is 0.0001 Å RMSD
numAtoms(selected=True)

Returns number of atoms.

numConfs(gen=None)

Returns the number of conformers.

Parameters:gen (int) – Generation number.
numCoordsets()

Returns number of conformations.

numGenerations()

Returns the number of generations.

numSelected()

Returns number of selected atoms. Number of all atoms will be returned if a selection is not made. A subset of atoms can be selected by passing a selection to setAtoms().

select(selection)

Selects columns corresponding to a part of the atoms.

setAtoms(atoms, pH=7.0)

Sets atoms.

Parameters:
  • atomsatoms parsed by parsePDB
  • pH (float) – pH based on which to select protonation states for adding missing hydrogens, default is 7.0.
setCoords(coords)

Set coords as the ensemble reference coordinate set. coords may be an array with suitable data type, shape, and dimensionality, or an object with getCoords() method.

setData(label, data)

Store atomic data under label, which must:

  • start with a letter
  • contain only alphanumeric characters and underscore
  • not be a reserved word (see listReservedWords())

data must be a list() or a ndarray and its length must be equal to the number of atoms. If the dimension of the data array is 1, i.e. data.ndim==1, label may be used to make atom selections, e.g. "label 1 to 10" or "label C1 C2". Note that, if data with label is present, it will be overwritten.

setTitle(title)

Set title.

Parameters:title (str) – Title of the ClustENM object.
setWeights(weights)

Set atomic weights.

superpose(**kwargs)

Superpose the ensemble onto the reference coordinates.

Parameters:ref (int) – index of the reference coordinate. If None, the average coordinate will be assumed as the reference. Default is None
writePDB(filename=None, single=True, **kwargs)

Write conformers in PDB format to a file.

Parameters:
  • filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
  • single (bool) – If it is True (default), then the conformers will be saved into a single PDB file with each conformer as a model. Otherwise, a directory will be created with the filename, and each conformer will be saved as a separate PDB file.
writePDBFixed()

Write the fixed (initial) structure to a pdb file.

writeParameters(filename=None)

Write the parameters defined to a text file.

Parameters:filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
class ClustImANM(title=None)[source]

Experimental.

addCoordset(coords)

Add coordinate set(s) to the ensemble.

Parameters:coords (ndarray) – coordinate set(s)
delCoordset(index)

Delete a coordinate set from the ensemble.

delData(label)

Return data associated with label and remove from the instance. If data associated with label is not found, return None.

deselect()

Undoes the selection.

getAtoms(selected=True)

Returns atoms.

getConformation(index)

Returns conformation at given index.

getCoords(selected=True)

Returns a copy of reference coordinates for selected atoms.

getCoordsets(indices=None, selected=True)

Returns a copy of coordinate set(s) at given indices, which may be an integer, a list of integers or None. None returns all coordinate sets. For reference coordinates, use getCoords() method.

getData(key, gen=None)

Returns data.

Parameters:
  • key (str) – Key
  • gen (int) – Generation
getDataLabels(which=None)

Returns data labels. For which='user', return only labels of user provided data.

getDataType(label)

Returns type of the data (i.e. data.dtype) associated with label, or None label is not used.

getDefvecs(pairwise=False)

Calculate and return deformation vectors (defvecs). Note that you might need to align the conformations using superpose() or iterpose() before calculating defvecs.

Parameters:pairwise (bool) – if True then it will return pairwise defvecs as an n-by-n matrix. n is the number of conformations.
getDeviations()

Returns deviations from reference coordinates for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to calculating deviations.

getIndices()

Returns a copy of indices of selected columns

getKeys(gen=None)

Returns keys.

Parameters:gen (int) – Generation number.
getLabels(gen=None)

Returns labels.

Parameters:gen (int) – Generation number.
getMSFs()

Returns mean square fluctuations (MSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to MSF calculation.

getPotentials(gen=None)

Returns potentials.

Parameters:gen (int) – Generation number.
getRMSDs(pairwise=False)

Returns root mean square deviations (RMSDs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSD calculation.

Parameters:pairwise (bool) – if True then it will return pairwise RMSDs as an n-by-n matrix. n is the number of conformations.
getRMSFs()

Returns root mean square fluctuations (RMSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSF calculation.

getSizes(gen=None)

Returns the number of unminimized conformers represented by a cluster centroid.

Parameters:gen (int) – Generation number.
getTitle()

Returns the title.

getWeights(selected=True)

Returns a copy of weights of selected atoms.

isDataLabel(label)

Returns True if data associated with label is present.

isSelected()

Returns if a subset of atoms are selected.

iterCoordsets()

Iterate over coordinate sets. A copy of each coordinate set for selected atoms is returned. Reference coordinates are not included.

iterpose(rmsd=0.0001, quiet=False)

Iteratively superpose the ensemble until convergence. Initially, all conformations are aligned with the reference coordinates. Then mean coordinates are calculated, and are set as the new reference coordinates. This is repeated until reference coordinates do not change. This is determined by the value of RMSD between the new and old reference coordinates. Note that at the end of the iterative procedure the reference coordinate set will be average of conformations in the ensemble.

Parameters:rmsd (float) – change in reference coordinates to determine convergence, default is 0.0001 Å RMSD
numAtoms(selected=True)

Returns number of atoms.

numConfs(gen=None)

Returns the number of conformers.

Parameters:gen (int) – Generation number.
numCoordsets()

Returns number of conformations.

numGenerations()

Returns the number of generations.

numSelected()

Returns number of selected atoms. Number of all atoms will be returned if a selection is not made. A subset of atoms can be selected by passing a selection to setAtoms().

select(selection)

Selects columns corresponding to a part of the atoms.

setAtoms(atoms, pH=7.0)

Sets atoms.

Parameters:
  • atomsatoms parsed by parsePDB
  • pH (float) – pH based on which to select protonation states for adding missing hydrogens, default is 7.0.
setCoords(coords)

Set coords as the ensemble reference coordinate set. coords may be an array with suitable data type, shape, and dimensionality, or an object with getCoords() method.

setData(label, data)

Store atomic data under label, which must:

  • start with a letter
  • contain only alphanumeric characters and underscore
  • not be a reserved word (see listReservedWords())

data must be a list() or a ndarray and its length must be equal to the number of atoms. If the dimension of the data array is 1, i.e. data.ndim==1, label may be used to make atom selections, e.g. "label 1 to 10" or "label C1 C2". Note that, if data with label is present, it will be overwritten.

setTitle(title)

Set title.

Parameters:title (str) – Title of the ClustENM object.
setWeights(weights)

Set atomic weights.

superpose(**kwargs)

Superpose the ensemble onto the reference coordinates.

Parameters:ref (int) – index of the reference coordinate. If None, the average coordinate will be assumed as the reference. Default is None
writePDB(filename=None, single=True, **kwargs)

Write conformers in PDB format to a file.

Parameters:
  • filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
  • single (bool) – If it is True (default), then the conformers will be saved into a single PDB file with each conformer as a model. Otherwise, a directory will be created with the filename, and each conformer will be saved as a separate PDB file.
writePDBFixed()

Write the fixed (initial) structure to a pdb file.

writeParameters(filename=None)

Write the parameters defined to a text file.

Parameters:filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
class ClustExANM(title=None)[source]

Experimental.

addCoordset(coords)

Add coordinate set(s) to the ensemble.

Parameters:coords (ndarray) – coordinate set(s)
delCoordset(index)

Delete a coordinate set from the ensemble.

delData(label)

Return data associated with label and remove from the instance. If data associated with label is not found, return None.

deselect()

Undoes the selection.

getAtoms(selected=True)

Returns atoms.

getConformation(index)

Returns conformation at given index.

getCoords(selected=True)

Returns a copy of reference coordinates for selected atoms.

getCoordsets(indices=None, selected=True)

Returns a copy of coordinate set(s) at given indices, which may be an integer, a list of integers or None. None returns all coordinate sets. For reference coordinates, use getCoords() method.

getData(key, gen=None)

Returns data.

Parameters:
  • key (str) – Key
  • gen (int) – Generation
getDataLabels(which=None)

Returns data labels. For which='user', return only labels of user provided data.

getDataType(label)

Returns type of the data (i.e. data.dtype) associated with label, or None label is not used.

getDefvecs(pairwise=False)

Calculate and return deformation vectors (defvecs). Note that you might need to align the conformations using superpose() or iterpose() before calculating defvecs.

Parameters:pairwise (bool) – if True then it will return pairwise defvecs as an n-by-n matrix. n is the number of conformations.
getDeviations()

Returns deviations from reference coordinates for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to calculating deviations.

getIndices()

Returns a copy of indices of selected columns

getKeys(gen=None)

Returns keys.

Parameters:gen (int) – Generation number.
getLabels(gen=None)

Returns labels.

Parameters:gen (int) – Generation number.
getMSFs()

Returns mean square fluctuations (MSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to MSF calculation.

getPotentials(gen=None)

Returns potentials.

Parameters:gen (int) – Generation number.
getRMSDs(pairwise=False)

Returns root mean square deviations (RMSDs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSD calculation.

Parameters:pairwise (bool) – if True then it will return pairwise RMSDs as an n-by-n matrix. n is the number of conformations.
getRMSFs()

Returns root mean square fluctuations (RMSFs) for selected atoms. Conformations can be aligned using one of superpose() or iterpose() methods prior to RMSF calculation.

getSizes(gen=None)

Returns the number of unminimized conformers represented by a cluster centroid.

Parameters:gen (int) – Generation number.
getTitle()

Returns the title.

getWeights(selected=True)

Returns a copy of weights of selected atoms.

isDataLabel(label)

Returns True if data associated with label is present.

isSelected()

Returns if a subset of atoms are selected.

iterCoordsets()

Iterate over coordinate sets. A copy of each coordinate set for selected atoms is returned. Reference coordinates are not included.

iterpose(rmsd=0.0001, quiet=False)

Iteratively superpose the ensemble until convergence. Initially, all conformations are aligned with the reference coordinates. Then mean coordinates are calculated, and are set as the new reference coordinates. This is repeated until reference coordinates do not change. This is determined by the value of RMSD between the new and old reference coordinates. Note that at the end of the iterative procedure the reference coordinate set will be average of conformations in the ensemble.

Parameters:rmsd (float) – change in reference coordinates to determine convergence, default is 0.0001 Å RMSD
numAtoms(selected=True)

Returns number of atoms.

numConfs(gen=None)

Returns the number of conformers.

Parameters:gen (int) – Generation number.
numCoordsets()

Returns number of conformations.

numGenerations()

Returns the number of generations.

numSelected()

Returns number of selected atoms. Number of all atoms will be returned if a selection is not made. A subset of atoms can be selected by passing a selection to setAtoms().

select(selection)

Selects columns corresponding to a part of the atoms.

setAtoms(atoms, pH=7.0)

Sets atoms.

Parameters:
  • atomsatoms parsed by parsePDB
  • pH (float) – pH based on which to select protonation states for adding missing hydrogens, default is 7.0.
setCoords(coords)

Set coords as the ensemble reference coordinate set. coords may be an array with suitable data type, shape, and dimensionality, or an object with getCoords() method.

setData(label, data)

Store atomic data under label, which must:

  • start with a letter
  • contain only alphanumeric characters and underscore
  • not be a reserved word (see listReservedWords())

data must be a list() or a ndarray and its length must be equal to the number of atoms. If the dimension of the data array is 1, i.e. data.ndim==1, label may be used to make atom selections, e.g. "label 1 to 10" or "label C1 C2". Note that, if data with label is present, it will be overwritten.

setTitle(title)

Set title.

Parameters:title (str) – Title of the ClustENM object.
setWeights(weights)

Set atomic weights.

superpose(**kwargs)

Superpose the ensemble onto the reference coordinates.

Parameters:ref (int) – index of the reference coordinate. If None, the average coordinate will be assumed as the reference. Default is None
writePDB(filename=None, single=True, **kwargs)

Write conformers in PDB format to a file.

Parameters:
  • filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.
  • single (bool) – If it is True (default), then the conformers will be saved into a single PDB file with each conformer as a model. Otherwise, a directory will be created with the filename, and each conformer will be saved as a separate PDB file.
writePDBFixed()

Write the fixed (initial) structure to a pdb file.

writeParameters(filename=None)

Write the parameters defined to a text file.

Parameters:filename (str) – The name of the file. If it is None (default), the title of the ClustENM will be used.