Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
williamyxl authored Sep 11, 2023
1 parent 437f672 commit f9c5a06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mofa/simulation/raspa.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def rewrite_cif(
"""
atom_df["element"] = [re.sub("[0-9]+", "", x)
for x in atom_df["comment"]]
atom_str = atom_df[["comment", "element", "fx", "fy", "fz"]].to_string(
atom_str = atom_df[["comment", "element", "fx", "fy", "fz", "q"]].to_string(
header=None, index=None, col_space=[10, 8, 20, 20, 20], justify="left")
a, b, c, alpha, beta, gamma = [
float(x) for x in cifbox.split(":")[1].strip().split(",")]
Expand Down Expand Up @@ -508,6 +508,7 @@ def rewrite_cif(
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_charge
""" + atom_str
new_cif_name = "mof.cif"
with io.open(os.path.join(raspa_path, new_cif_name), "w", newline="\n") as wf:
Expand Down

0 comments on commit f9c5a06

Please sign in to comment.