From 9417e5170c8ef74d01bce91b6fd72a218ba5f35e Mon Sep 17 00:00:00 2001 From: James Krieger Date: Tue, 29 Oct 2024 19:16:24 +0000 Subject: [PATCH] add file writing for script mode --- prody/dynamics/anmd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prody/dynamics/anmd.py b/prody/dynamics/anmd.py index 0d87ceec9..83fb1470c 100755 --- a/prody/dynamics/anmd.py +++ b/prody/dynamics/anmd.py @@ -221,3 +221,9 @@ def runANMD(atoms, num_modes=2, max_rmsd=2., num_steps=2, pdb = parsePDB(pdb_name_ext, compressed=False) x = runANMD(pdb, num_modes, max_rmsd, num_steps, tol) + + pdb_basename = os.path.basename(pdb_name) + for ens in x: + filename = pdb_basename + '_' + ens.getTitle().replace(' ', '_') + LOGGER.info('writing PDB file {0}'.format(filename)) + writePDB(filename, ens)