Valdes-Tresanco-MS / gmx_MMPBSA

gmx_MMPBSA is a new tool based on AMBER's MMPBSA.py aiming to perform end-state free energy calculations with GROMACS files.
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
GNU General Public License v3.0
216 stars 64 forks source link

gmx_MMPBSA_test failed #99

Closed cyrushu closed 2 years ago

cyrushu commented 2 years ago

Describe the issue

"""
Traceback (most recent call last):
  File "/home/x/software/anaconda3/envs/amber/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/x/software/anaconda3/envs/amber/lib/python3.9/site-packages/GMXMMPBSA/tester.py", line 29, in calculatestar
    return run_process(*args)
  File "/home/x/software/anaconda3/envs/amber/lib/python3.9/site-packages/GMXMMPBSA/tester.py", line 33, in run_process
    os.chdir(system[0])
FileNotFoundError: [Errno 2] No such file or directory: 'gmx_MMPBSA_test/docs/examples/Protein_protein'
"""

If you will report an error, please complete this form To Reproduce Steps to reproduce the behavior:

gmx_MMPBSA_test

Additional context

[INFO   ] Cloning gmx_MMPBSA repository in gmx_MMPBSA_test
[INFO   ] Cloning gmx_MMPBSA repository...Done.
[INFO   ]                           Example                                STATE
[INFO   ] Protein-Ligand (Single trajectory approximation)               RUNNING
[INFO   ] Protein-Protein                                                RUNNING
[INFO   ] Protein-Ligand (Single trajectory approximation)       [ 1/12]    DONE
[INFO   ] Protein-DNA                                                    RUNNING
[INFO   ] Protein-Membrane                                               RUNNING

Suggest Fix fix the following function located at: https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/blob/master/GMXMMPBSA/tester.py#L31

into

def run_process(system, sys_name, args):
    logging.info(f"{system[1]:60}{'RUNNING':>10}")
    cwd = os.getcwd()
    os.chdir(system[0])
    system_log = open(sys_name + '.log', 'a')
    g_p = subprocess.Popen(args, stdout=system_log, stderr=system_log)
    os.chdir(cwd)
    if g_p.wait():
        return sys_name, False
    return sys_name, True
Valdes-Tresanco-MS commented 2 years ago

Thanks for reporting the bug. Definitely gmx_MMPBSA_test needs an improvement ... We plan to make this improvement as soon as we resume development of version 1.5.0 (#47) Cheers! Mario S.

Valdes-Tresanco-MS commented 2 years ago

This error is similar to #46 and was fixed via 4ec3b4f