Skip to content

Commit

Permalink
fix GBNSR6 calculation with multiple processors
Browse files Browse the repository at this point in the history
  • Loading branch information
marioernestovaldes committed Jan 17, 2024
1 parent 92e2b76 commit 607bbe2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions GMXMMPBSA/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ def _load_calc_list(self, pre, mutant, parm_system):
self.calc_list.append(c, ' calculating MM...', timer_key='gbnsr6',
output_basename=f'{prefix}complex_mm.mdout.%d')
# use pre directly to have only one folder per rank
files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}complex*.inpcrd")),
key=lambda x: int(x.stem.split('.')[1]))

files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}complex*.inpcrd")))

mdouts = [file.parent.joinpath(f"{file.name.split('.')[0]}_gbnsr6{file.suffixes[0]}.mdout").as_posix()
for file in files]
inpcrds = [file.as_posix() for file in files]
Expand Down Expand Up @@ -437,8 +438,7 @@ def _load_calc_list(self, pre, mutant, parm_system):

self.calc_list.append(c, ' calculating MM...', timer_key='gbnsr6',
output_basename=f'{prefix}receptor_mm.mdout.%d')
files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}receptor*.inpcrd")),
key=lambda x: int(x.stem.split('.')[1]))
files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}receptor*.inpcrd")))
mdouts = [
file.parent.joinpath(f"{file.name.split('.')[0]}_gbnsr6{file.suffixes[0]}.mdout").as_posix()
for file in files]
Expand Down Expand Up @@ -479,8 +479,7 @@ def _load_calc_list(self, pre, mutant, parm_system):

self.calc_list.append(c, ' calculating MM...', timer_key='gbnsr6',
output_basename=f'{prefix}ligand_mm.mdout.%d')
files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}ligand*.inpcrd")),
key=lambda x: int(x.stem.split('.')[1]))
files = sorted(list(Path(f"{pre}inpcrd_{self.mpi_rank}").glob(f"{prefix}ligand*.inpcrd")))
mdouts = [
file.parent.joinpath(f"{file.name.split('.')[0]}_gbnsr6{file.suffixes[0]}.mdout").as_posix()
for file in files]
Expand Down

0 comments on commit 607bbe2

Please sign in to comment.