wham exit code
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from .runner import UmbrellaRunner
|
from .runner import UmbrellaRunner
|
||||||
|
from .wham2d import WHAM2DRunner
|
||||||
|
|
||||||
__all__ = ['AdaptiveUmbrella']
|
__all__ = ['AdaptiveUmbrella']
|
||||||
__version__ = "0.3.0"
|
__version__ = "0.3.1"
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ class WHAM2DRunner(UmbrellaRunner):
|
|||||||
path = os.path.join(self.tmp_folder, "{}_metadata.dat".format(self.num_iterations))
|
path = os.path.join(self.tmp_folder, "{}_metadata.dat".format(self.num_iterations))
|
||||||
with open(path, 'w') as out:
|
with open(path, 'w') as out:
|
||||||
for file in os.listdir(self.simulation_folder):
|
for file in os.listdir(self.simulation_folder):
|
||||||
|
if not os.path.exists(os.path.join(path, file, "COLVAR")):
|
||||||
|
continue
|
||||||
prefix, x, y = file.split("_")
|
prefix, x, y = file.split("_")
|
||||||
colvar_file = os.path.join(file, 'COLVAR')
|
colvar_file = os.path.join(file, 'COLVAR')
|
||||||
out.write("{file}\t{x}\t{y}\t{fc_x}\t{fc_y}\n".format(
|
out.write("{file}\t{x}\t{y}\t{fc_x}\t{fc_y}\n".format(
|
||||||
@@ -63,10 +65,9 @@ class WHAM2DRunner(UmbrellaRunner):
|
|||||||
outfile=output_path
|
outfile=output_path
|
||||||
)
|
)
|
||||||
print(cmd)
|
print(cmd)
|
||||||
try:
|
err_code = subprocess.call(cmd, shell=True)
|
||||||
subprocess.call(cmd, shell=True)
|
if err_code != 0:
|
||||||
except OSError:
|
print("wham exited with error code {}".format(err_corde))
|
||||||
print("wham failed.")
|
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
def load_wham_pmf(self, wham_file):
|
def load_wham_pmf(self, wham_file):
|
||||||
|
|||||||
Reference in New Issue
Block a user