Skip to content

Commit

Permalink
Merge pull request #1545 from jamesmkrieger/clustenm_simple_kwargs
Browse files Browse the repository at this point in the history
clustenm accept sparse kdtree turbo
  • Loading branch information
kaynakb authored May 10, 2022
2 parents c1f8893 + b78b59f commit 49d5666
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions prody/dynamics/clustenm.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ def _multi_targeted_sim(self, args):
def _buildANM(self, cg):

anm = ANM()
anm.buildHessian(cg, cutoff=self._cutoff, gamma=self._gamma)
anm.buildHessian(cg, cutoff=self._cutoff, gamma=self._gamma,
sparse=self._sparse, kdtree=self._kdtree)

return anm

Expand Down Expand Up @@ -513,7 +514,7 @@ def _sample(self, conf):
if not self._checkANM(anm_cg):
return None

anm_cg.calcModes(self._n_modes)
anm_cg.calcModes(self._n_modes, turbo=self._turbo)

anm_ex = self._extendModel(anm_cg, cg, tmp)
ens_ex = sampleModes(anm_ex, atoms=tmp,
Expand Down Expand Up @@ -980,6 +981,12 @@ def run(self, cutoff=15., n_modes=3, gamma=1., n_confs=50, rmsd=1.0,
self._cutoff = cutoff
self._n_modes = n_modes
self._gamma = gamma
self._sparse = kwargs.get('sparse', False)
self._kdtree = kwargs.get('kdtree', False)
self._turbo = kwargs.get('turbo', False)
if kwargs.get('zeros', False):
LOGGER.warn('ClustENM cannot use zero modes so ignoring this kwarg')

self._n_confs = n_confs
self._rmsd = (0.,) + rmsd if isinstance(rmsd, tuple) else (0.,) + (rmsd,) * n_gens
self._n_gens = n_gens
Expand Down

0 comments on commit 49d5666

Please sign in to comment.