Skip to content

Commit

Permalink
Merge pull request #2022 from jamesmkrieger/anmd
Browse files Browse the repository at this point in the history
anmd fix for pca input
  • Loading branch information
jamesmkrieger authored Dec 27, 2024
2 parents 9bfeb99 + 8c49d02 commit e0df1f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions prody/dynamics/anmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from prody.dynamics.editing import extendModel
from prody.dynamics.modeset import ModeSet
from prody.dynamics.nma import NMA
from prody.dynamics.pca import PCA
from prody.dynamics.sampling import traverseMode


Expand Down Expand Up @@ -177,6 +178,12 @@ def runANMD(atoms, num_modes=2, max_rmsd=2., num_steps=5, tolerance=10.0,
anm=ANM()
anm.buildHessian(calphas)
anm.calcModes(n_modes=num_modes)
elif isinstance(anm, PCA):
eigvecs = anm.getEigvecs()
eigvals = 1/anm.getEigvals()
anm = ANM()
anm.setEigens(eigvecs, eigvals)

anm_ex, atoms_all = extendModel(anm, calphas, pdb_fixed)
anm_ex._indices = anm.getIndices()
eval_0=anm[0].getEigval()
Expand Down

0 comments on commit e0df1f1

Please sign in to comment.