diff --git a/mofa/simulation/raspa.py b/mofa/simulation/raspa.py index 67b8ae8d..8e055943 100644 --- a/mofa/simulation/raspa.py +++ b/mofa/simulation/raspa.py @@ -557,7 +557,7 @@ def prep_raspa_single( report_frequency: How often to report structures Returns: raspa_path: a directory with the raspa simulation input files - return_code: cif2lammps running status, 0 means success (directory raspa_path will be kept), + return_code: cif2lammps running status, 0 means success (directory raspa_path will be kept), -1 means failure (directory raspa_path will be destroyed) """ cif_name = os.path.split(cif_path)[-1] @@ -770,15 +770,16 @@ def prep_raspa_single( # cwd=os.path.abspath(sim_dir), # stdout=subprocess.PIPE, # stderr=subprocess.STDOUT) + # read void fraction: - outdir = os.path.join(sim_dir, "Output") - outdir = os.path.join(outdir, os.listdir(outdir)[0]) - outfile = os.path.join(outdir, [x for x in os.listdir(outdir) if "2.2.2" in x][0]) - outstr = None - with io.open(outfile, "r", newline="\n") as rf: - outstr = rf.read() - He_Void_Faction = float(outstr.split("[helium] Average Widom Rosenbluth-weight:")[1].split("+/-")[0]) - #He_Void_Faction = 0.0 + # outdir = os.path.join(sim_dir, "Output") + # outdir = os.path.join(outdir, os.listdir(outdir)[0]) + # outfile = os.path.join(outdir, [x for x in os.listdir(outdir) if "2.2.2" in x][0]) + # outstr = None + # with io.open(outfile, "r", newline="\n") as rf: + # outstr = rf.read() + # He_Void_Faction = float(outstr.split("[helium] Average Widom Rosenbluth-weight:")[1].split("+/-")[0]) + He_Void_Faction = 0.0 # GCMC rigid!!! sim_dir = os.path.join(raspa_path, "co2_adsorption_rigid")