diff --git a/hmtpbsa/pbsa/pbsarun.py b/hmtpbsa/pbsa/pbsarun.py index 9be6d53..d5cb72d 100644 --- a/hmtpbsa/pbsa/pbsarun.py +++ b/hmtpbsa/pbsa/pbsarun.py @@ -173,5 +173,5 @@ def save_results(self, energyfile='Energy.csv', decfile='Dec.csv', mmxsafile=Non return deltaG, resG = parse_GMXMMPBSA_RESULTS(mmxsafile=mmxsafile) deltaG.to_csv(energyfile) - if resG: + if resG is not None: resG.to_csv(decfile) \ No newline at end of file diff --git a/hmtpbsa/pipeline.py b/hmtpbsa/pipeline.py index 6eefb82..4823e65 100644 --- a/hmtpbsa/pipeline.py +++ b/hmtpbsa/pipeline.py @@ -97,8 +97,8 @@ def base_pipeline(receptorfile, ligandfiles, paras, nt=1, mmpbsafile=None, outfi statu = 'F_GBSA' dl = d logging.warning('Failed to run GBSA for ligand: %s'%ligandName) - ligandnames.append(ligandName) - status.append(statu) + ligandnames.extend([ligandName]*len(dl)) + status.extend([statu]*len(dl)) if df is None: df = dl else: @@ -179,8 +179,8 @@ def minim_pipeline(receptorfile, ligandfiles, paras, mmpbsafile=None, nt=1, outf statu = 'F_GBSA' dl = d logging.warning('Failed to run GBSA for ligand: %s'%ligandName) - ligandnames.append(ligandName) - status.append(statu) + ligandnames.extend([ligandName]*len(dl)) + status.extend([statu]*len(dl)) if df is None: df = dl else: