Skip to content

Commit

Permalink
CSV writer fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
knc6 committed Sep 17, 2024
1 parent 299a793 commit 3cd5ec5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions atomgpt/inverse_models/inverse_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class TrainingPropConfig(BaseSettings):
model_save_path: str = "lora_model_m"




instruction = "Below is a description of a superconductor material."
# model_save_path = "lora_model_m"

Expand Down Expand Up @@ -346,8 +344,15 @@ def run_atomgpt_inverse(config_file="config.json"):
print("target_mat", target_mat)
print("genmat", gen_mat)
# print(target_mat.composition.reduced_formula,gen_mat.composition.reduced_formula,target_mat.density,gen_mat.density )
# line = i['id']+","+Poscar(target_mat).to_string().replace('\n','\\n')+","+Poscar(gen_mat).to_string().replace('\n','\\n')+"\n"
# f.write(line)
line = (
i["id"]
+ ","
+ Poscar(target_mat).to_string().replace("\n", "\\n")
+ ","
+ Poscar(gen_mat).to_string().replace("\n", "\\n")
+ "\n"
)
f.write(line)
print()
f.close()

Expand Down

0 comments on commit 3cd5ec5

Please sign in to comment.