From b78b59f48598f6819abfe8cdb900829826aa893b Mon Sep 17 00:00:00 2001 From: James Krieger Date: Mon, 28 Mar 2022 14:50:21 +0200 Subject: [PATCH] clustenm accept sparse kdtree turbo --- prody/dynamics/clustenm.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/prody/dynamics/clustenm.py b/prody/dynamics/clustenm.py index c2c73592c..2b166edd7 100644 --- a/prody/dynamics/clustenm.py +++ b/prody/dynamics/clustenm.py @@ -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 @@ -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, @@ -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