Révision 017c5dbc
b/modules/calculation.py | ||
---|---|---|
143 | 143 |
"not found." |
144 | 144 |
logger.error(err_msg) |
145 | 145 |
raise FileNotFoundError(err_msg) |
146 |
incar = "" |
|
146 | 147 |
for i, inp_file in enumerate(inp_files): |
147 | 148 |
file_name = inp_file.split("/")[-1] |
148 | 149 |
if "INCAR" in file_name: |
149 | 150 |
incar = Incar.from_file(inp_file) |
150 | 151 |
incar["SYSTEM"] = proj_name+"_"+run_type |
151 |
check_bak("INCAR") |
|
152 |
incar.write_file("INCAR") |
|
153 |
inp_files[i] = "INCAR" |
|
152 |
|
|
154 | 153 |
for c, conf in enumerate(atms_list): |
155 | 154 |
subdir = f'{run_type}/conf_{c}/' |
156 | 155 |
os.mkdir(subdir) |
157 | 156 |
for inp_file in inp_files: |
158 | 157 |
file_name = inp_file.split("/")[-1] |
159 | 158 |
if file_name == "INCAR": |
160 |
copy("INCAR", subdir) |
|
159 |
incar.write_file(subdir+"INCAR") |
|
160 |
elif "KPOINTS" in file_name and "KPOINTS" != file_name: |
|
161 |
copy(inp_file, subdir+"KPOINTS") |
|
162 |
elif "POTCAR" in file_name and "POTCAR" != file_name: |
|
163 |
copy(inp_file, subdir+"POTCAR") |
|
161 | 164 |
else: |
162 | 165 |
copy(inp_file, subdir) |
163 | 166 |
if cell is not False and np.linalg.det(cell) != 0.0: |
Formats disponibles : Unified diff