From b00ce20ed166267f02b94e4c9fd7cd8a684efe23 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Fri, 10 Jun 2022 14:08:09 +0200 Subject: [PATCH 1/7] Fixing an issue in which the arrays names might not be compatible with what AiiDA enforces. For that the `[` and `]` that are usually given by lammps to arrays components are replaces by `__`. Fixes #42. --- aiida_lammps/common/generate_structure.py | 4 ++-- aiida_lammps/common/raw_parsers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aiida_lammps/common/generate_structure.py b/aiida_lammps/common/generate_structure.py index bda4832..282f07c 100644 --- a/aiida_lammps/common/generate_structure.py +++ b/aiida_lammps/common/generate_structure.py @@ -52,11 +52,11 @@ def generate_lammps_structure( :param structure: the structure to use in the simulation :type structure: orm.StructureData - :param atom_style: treatment of the particles accroding to lammps, defaults to 'atomic' + :param atom_style: treatment of the particles according to lammps, defaults to 'atomic' :type atom_style: str, optional :param charge_dict: dictionary with the charge for the particles, defaults to None :type charge_dict: dict, optional - :param round_dp: precision to which to round the postions, defaults to None + :param round_dp: precision to which to round the positions, defaults to None :type round_dp: float, optional :param docstring: header for the structure file, defaults to 'generated by aiida_lammps' :type docstring: str, optional diff --git a/aiida_lammps/common/raw_parsers.py b/aiida_lammps/common/raw_parsers.py index e20f39b..e51cbd2 100644 --- a/aiida_lammps/common/raw_parsers.py +++ b/aiida_lammps/common/raw_parsers.py @@ -80,7 +80,7 @@ def parse_logfile(filename: str = None, file_contents: str = None) -> Union[dict global_parsed_data["bin"] = line.split()[-1] if line.startswith("Step"): header_line_position = index - header_line = line.split() + header_line = line.replace('[','__').replace(']','__').split() if header_line_position > 0 and index != header_line_position and not end_found: if not line.split()[0].replace(".", "", 1).isdigit(): end_found = True From 83bd52bc3b2c4866cceab5b4e6ad6ee697bede28 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Jun 2022 12:13:45 +0000 Subject: [PATCH 2/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiida_lammps/common/raw_parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiida_lammps/common/raw_parsers.py b/aiida_lammps/common/raw_parsers.py index e51cbd2..6e012dd 100644 --- a/aiida_lammps/common/raw_parsers.py +++ b/aiida_lammps/common/raw_parsers.py @@ -80,7 +80,7 @@ def parse_logfile(filename: str = None, file_contents: str = None) -> Union[dict global_parsed_data["bin"] = line.split()[-1] if line.startswith("Step"): header_line_position = index - header_line = line.replace('[','__').replace(']','__').split() + header_line = line.replace("[", "__").replace("]", "__").split() if header_line_position > 0 and index != header_line_position and not end_found: if not line.split()[0].replace(".", "", 1).isdigit(): end_found = True From 499f490e795fc143eea9953ebebf22b68dffa3c3 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Fri, 10 Jun 2022 15:17:32 +0200 Subject: [PATCH 3/7] Updating the reference values for the parsing tests. --- tests/test_raw_parsers/test_parse_log.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_raw_parsers/test_parse_log.yaml b/tests/test_raw_parsers/test_parse_log.yaml index 3c1032b..9ed16d8 100644 --- a/tests/test_raw_parsers/test_parse_log.yaml +++ b/tests/test_raw_parsers/test_parse_log.yaml @@ -480,7 +480,7 @@ time_dependent: - -60616.181 - -60998.054 - -61353.826 - c_pressure_all_aiida[1]: + c_pressure_all_aiida__1__: - -65784.86 - -65754.123 - -65658.395 @@ -532,7 +532,7 @@ time_dependent: - -56496.14 - -56926.184 - -57340.453 - c_pressure_all_aiida[2]: + c_pressure_all_aiida__2__: - -66151.806 - -66129.949 - -66064.381 @@ -584,7 +584,7 @@ time_dependent: - -63084.235 - -63403.866 - -63702.654 - c_pressure_all_aiida[3]: + c_pressure_all_aiida__3__: - -65307.943 - -65282.65 - -65204.64 @@ -636,7 +636,7 @@ time_dependent: - -62268.168 - -62664.111 - -63018.371 - c_pressure_all_aiida[4]: + c_pressure_all_aiida__4__: - -968.80346 - -973.77775 - -989.84677 @@ -688,7 +688,7 @@ time_dependent: - -1884.7159 - -1744.5319 - -1602.112 - c_pressure_all_aiida[5]: + c_pressure_all_aiida__5__: - -1835.8858 - -1846.5829 - -1879.7798 @@ -740,7 +740,7 @@ time_dependent: - -4043.8155 - -3741.0193 - -3438.0051 - c_pressure_all_aiida[6]: + c_pressure_all_aiida__6__: - -293.61095 - -291.26981 - -286.53978 From 9c67b695480fa4f0001c2d4ee52741a68ebfb6e9 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 15 Jun 2022 16:43:08 +0200 Subject: [PATCH 4/7] Making a more general and consistent replacement of non aiida compatible array and variables names. Addresses #43 --- aiida_lammps/calculations/lammps/base.py | 2 +- aiida_lammps/common/input_generator.py | 3 ++- aiida_lammps/common/parse_trajectory.py | 5 ++++- aiida_lammps/common/raw_parsers.py | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/aiida_lammps/calculations/lammps/base.py b/aiida_lammps/calculations/lammps/base.py index 0504b21..2311558 100644 --- a/aiida_lammps/calculations/lammps/base.py +++ b/aiida_lammps/calculations/lammps/base.py @@ -31,7 +31,7 @@ class BaseLammpsCalculation(CalcJob): _DEFAULT_LOGFILE_FILENAME = "log.lammps" _DEFAULT_OUTPUT_FILENAME = "lammps_output" - _DEFAULT_TRAJECTORY_FILENAME = "aiida_lampps.trajectory.dump" + _DEFAULT_TRAJECTORY_FILENAME = "aiida_lammps.trajectory.dump" _DEFAULT_VARIABLES_FILENAME = "aiida_lammps.yaml" _DEFAULT_RESTART_FILENAME = "lammps.restart" _DEFAULT_POTENTIAL_FILENAME = "potential.dat" diff --git a/aiida_lammps/common/input_generator.py b/aiida_lammps/common/input_generator.py index 07d2fe3..4e9d637 100644 --- a/aiida_lammps/common/input_generator.py +++ b/aiida_lammps/common/input_generator.py @@ -13,6 +13,7 @@ from builtins import ValueError import json import os +import re from typing import Union from aiida import orm @@ -437,7 +438,7 @@ def write_final_variables_block( variables_block = generate_header("Start of the Final Variables information") for _thermo in fixed_thermo: - _variables.append(_thermo.replace("[", "_").replace("]", "")) + _variables.append(re.sub("[^a-zA-Z0-9_]", "__", _thermo)) variables_block += f"variable final_{_variables[-1]} equal {_thermo}\n" variables_block += generate_header("End of the Final Variables information") diff --git a/aiida_lammps/common/parse_trajectory.py b/aiida_lammps/common/parse_trajectory.py index d9e7cb3..0b6e70e 100644 --- a/aiida_lammps/common/parse_trajectory.py +++ b/aiida_lammps/common/parse_trajectory.py @@ -2,6 +2,7 @@ """ # pylint: disable=fixme from collections import namedtuple +import re from aiida import orm import numpy as np @@ -88,7 +89,9 @@ def parse_step(lines, initial_line=0) -> namedtuple: ] ) cell = super_cell.T - field_names = lines[8].split()[2:] + field_names = [ + re.sub("[^a-zA-Z0-9_]", "__", entry) for entry in lines[8].split()[2:] + ] fields = [] for i in range(number_of_atoms): fields.append(lines[9 + i].split()) diff --git a/aiida_lammps/common/raw_parsers.py b/aiida_lammps/common/raw_parsers.py index 6e012dd..e0c4f71 100644 --- a/aiida_lammps/common/raw_parsers.py +++ b/aiida_lammps/common/raw_parsers.py @@ -80,7 +80,9 @@ def parse_logfile(filename: str = None, file_contents: str = None) -> Union[dict global_parsed_data["bin"] = line.split()[-1] if line.startswith("Step"): header_line_position = index - header_line = line.replace("[", "__").replace("]", "__").split() + header_line = [ + re.sub("[^a-zA-Z0-9_]", "__", entry) for entry in line.split() + ] if header_line_position > 0 and index != header_line_position and not end_found: if not line.split()[0].replace(".", "", 1).isdigit(): end_found = True From 20006feb1acae2af0713b66c178826b384177d7e Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 15 Jun 2022 16:54:20 +0200 Subject: [PATCH 5/7] Updating the tests reference names for the new type of aiida compatible variable name. --- .../test_optimize_process_eam_.yml | 24 +++++++++---------- .../test_optimize_process_lennard_jones_.yml | 24 +++++++++---------- .../test_optimize_process_reaxff_.yml | 24 +++++++++---------- .../test_optimize_process_tersoff_.yml | 24 +++++++++---------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/tests/test_calculations/test_optimize_process_eam_.yml b/tests/test_calculations/test_optimize_process_eam_.yml index 7847415..ec90da0 100644 --- a/tests/test_calculations/test_optimize_process_eam_.yml +++ b/tests/test_calculations/test_optimize_process_eam_.yml @@ -21,22 +21,22 @@ trajectory_data: - fy - fz stresses: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ compression_method: 8 elements: - Fe field_names: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ - element - fx - fy diff --git a/tests/test_calculations/test_optimize_process_lennard_jones_.yml b/tests/test_calculations/test_optimize_process_lennard_jones_.yml index 445dd88..37c39d1 100644 --- a/tests/test_calculations/test_optimize_process_lennard_jones_.yml +++ b/tests/test_calculations/test_optimize_process_lennard_jones_.yml @@ -20,22 +20,22 @@ trajectory_data: - fy - fz stresses: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ compression_method: 8 elements: - Ar field_names: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ - element - fx - fy diff --git a/tests/test_calculations/test_optimize_process_reaxff_.yml b/tests/test_calculations/test_optimize_process_reaxff_.yml index 1d38888..e208bca 100644 --- a/tests/test_calculations/test_optimize_process_reaxff_.yml +++ b/tests/test_calculations/test_optimize_process_reaxff_.yml @@ -22,23 +22,23 @@ trajectory_data: - fy - fz stresses: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ compression_method: 8 elements: - Fe - S field_names: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ - element - fx - fy diff --git a/tests/test_calculations/test_optimize_process_tersoff_.yml b/tests/test_calculations/test_optimize_process_tersoff_.yml index 17ff504..422406b 100644 --- a/tests/test_calculations/test_optimize_process_tersoff_.yml +++ b/tests/test_calculations/test_optimize_process_tersoff_.yml @@ -21,23 +21,23 @@ trajectory_data: - fy - fz stresses: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ compression_method: 8 elements: - Ga - N field_names: - - c_stpa[1] - - c_stpa[2] - - c_stpa[3] - - c_stpa[4] - - c_stpa[5] - - c_stpa[6] + - c_stpa__1__ + - c_stpa__2__ + - c_stpa__3__ + - c_stpa__4__ + - c_stpa__5__ + - c_stpa__6__ - element - fx - fy From ea2f69c229d340aea9620d28549df279fe4c2037 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 15 Jun 2022 17:10:31 +0200 Subject: [PATCH 6/7] Updating reference files for the tests so that they follow the new naming convention. --- .../test_optimize_process_eam_.yml | 12 ++++---- .../test_optimize_process_lennard_jones_.yml | 12 ++++---- .../test_optimize_process_reaxff_.yml | 12 ++++---- .../test_optimize_process_tersoff_.yml | 12 ++++---- .../test_generate_input_eam_alloy_md.txt | 28 +++++++++---------- ...test_generate_input_eam_alloy_minimize.txt | 28 +++++++++---------- 6 files changed, 52 insertions(+), 52 deletions(-) diff --git a/tests/test_calculations/test_optimize_process_eam_.yml b/tests/test_calculations/test_optimize_process_eam_.yml index ec90da0..0cfed69 100644 --- a/tests/test_calculations/test_optimize_process_eam_.yml +++ b/tests/test_calculations/test_optimize_process_eam_.yml @@ -21,12 +21,12 @@ trajectory_data: - fy - fz stresses: - - c_stpa__1__ - - c_stpa__2__ - - c_stpa__3__ - - c_stpa__4__ - - c_stpa__5__ - - c_stpa__6__ + - c_stpa[1] + - c_stpa[2] + - c_stpa[3] + - c_stpa[4] + - c_stpa[5] + - c_stpa[6] compression_method: 8 elements: - Fe diff --git a/tests/test_calculations/test_optimize_process_lennard_jones_.yml b/tests/test_calculations/test_optimize_process_lennard_jones_.yml index 37c39d1..aa106ca 100644 --- a/tests/test_calculations/test_optimize_process_lennard_jones_.yml +++ b/tests/test_calculations/test_optimize_process_lennard_jones_.yml @@ -20,12 +20,12 @@ trajectory_data: - fy - fz stresses: - - c_stpa__1__ - - c_stpa__2__ - - c_stpa__3__ - - c_stpa__4__ - - c_stpa__5__ - - c_stpa__6__ + - c_stpa[1] + - c_stpa[2] + - c_stpa[3] + - c_stpa[4] + - c_stpa[5] + - c_stpa[6] compression_method: 8 elements: - Ar diff --git a/tests/test_calculations/test_optimize_process_reaxff_.yml b/tests/test_calculations/test_optimize_process_reaxff_.yml index e208bca..5c3d698 100644 --- a/tests/test_calculations/test_optimize_process_reaxff_.yml +++ b/tests/test_calculations/test_optimize_process_reaxff_.yml @@ -22,12 +22,12 @@ trajectory_data: - fy - fz stresses: - - c_stpa__1__ - - c_stpa__2__ - - c_stpa__3__ - - c_stpa__4__ - - c_stpa__5__ - - c_stpa__6__ + - c_stpa[1] + - c_stpa[2] + - c_stpa[3] + - c_stpa[4] + - c_stpa[5] + - c_stpa[6] compression_method: 8 elements: - Fe diff --git a/tests/test_calculations/test_optimize_process_tersoff_.yml b/tests/test_calculations/test_optimize_process_tersoff_.yml index 422406b..c940d6e 100644 --- a/tests/test_calculations/test_optimize_process_tersoff_.yml +++ b/tests/test_calculations/test_optimize_process_tersoff_.yml @@ -21,12 +21,12 @@ trajectory_data: - fy - fz stresses: - - c_stpa__1__ - - c_stpa__2__ - - c_stpa__3__ - - c_stpa__4__ - - c_stpa__5__ - - c_stpa__6__ + - c_stpa[1] + - c_stpa[2] + - c_stpa[3] + - c_stpa[4] + - c_stpa[5] + - c_stpa[6] compression_method: 8 elements: - Ga diff --git a/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt b/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt index 751438a..d94fb26 100644 --- a/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt +++ b/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt @@ -25,11 +25,11 @@ compute pressure_all_aiida all pressure thermo_temp compute stress_atom_all_aiida all stress/atom NULL #-------------------------End of the Compute information-------------------------# #------------------------Start of the Thermo information-------------------------# -thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida[1] c_pressure_all_aiida[2] c_pressure_all_aiida[3] c_pressure_all_aiida[4] c_pressure_all_aiida[5] c_pressure_all_aiida[6] +thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida__1__ c_pressure_all_aiida__2__ c_pressure_all_aiida__3__ c_pressure_all_aiida__4__ c_pressure_all_aiida__5__ c_pressure_all_aiida__6__ thermo 100 #-------------------------End of the Thermo information--------------------------# #-------------------------Start of the Dump information--------------------------# -dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida[1] c_stress_atom_all_aiida[2] c_stress_atom_all_aiida[3] c_stress_atom_all_aiida[4] c_stress_atom_all_aiida[5] c_stress_atom_all_aiida[6] +dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida__1__ c_stress_atom_all_aiida__2__ c_stress_atom_all_aiida__3__ c_stress_atom_all_aiida__4__ c_stress_atom_all_aiida__5__ c_stress_atom_all_aiida__6__ dump_modify aiida sort id dump_modify aiida element Fe Fe dump_modify aiida format line "%6d %4d %4s %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f" @@ -50,12 +50,12 @@ variable final_pyy equal pyy variable final_pzz equal pzz variable final_etotal equal etotal variable final_c_pressure_all_aiida equal c_pressure_all_aiida -variable final_c_pressure_all_aiida_1 equal c_pressure_all_aiida[1] -variable final_c_pressure_all_aiida_2 equal c_pressure_all_aiida[2] -variable final_c_pressure_all_aiida_3 equal c_pressure_all_aiida[3] -variable final_c_pressure_all_aiida_4 equal c_pressure_all_aiida[4] -variable final_c_pressure_all_aiida_5 equal c_pressure_all_aiida[5] -variable final_c_pressure_all_aiida_6 equal c_pressure_all_aiida[6] +variable final_c_pressure_all_aiida__1__ equal c_pressure_all_aiida[1] +variable final_c_pressure_all_aiida__2__ equal c_pressure_all_aiida[2] +variable final_c_pressure_all_aiida__3__ equal c_pressure_all_aiida[3] +variable final_c_pressure_all_aiida__4__ equal c_pressure_all_aiida[4] +variable final_c_pressure_all_aiida__5__ equal c_pressure_all_aiida[5] +variable final_c_pressure_all_aiida__6__ equal c_pressure_all_aiida[6] #---------------------End of the Final Variables information---------------------# #---------------Start of the Printing Final Variables information----------------# print "#Final results" file aiida_lammps.yaml @@ -68,12 +68,12 @@ print "final_pyy: ${final_pyy}" append aiida_lammps.yaml print "final_pzz: ${final_pzz}" append aiida_lammps.yaml print "final_etotal: ${final_etotal}" append aiida_lammps.yaml print "final_c_pressure_all_aiida: ${final_c_pressure_all_aiida}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_1: ${final_c_pressure_all_aiida_1}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_2: ${final_c_pressure_all_aiida_2}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_3: ${final_c_pressure_all_aiida_3}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_4: ${final_c_pressure_all_aiida_4}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_5: ${final_c_pressure_all_aiida_5}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_6: ${final_c_pressure_all_aiida_6}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__1__: ${final_c_pressure_all_aiida__1__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__2__: ${final_c_pressure_all_aiida__2__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__3__: ${final_c_pressure_all_aiida__3__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__4__: ${final_c_pressure_all_aiida__4__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__5__: ${final_c_pressure_all_aiida__5__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__6__: ${final_c_pressure_all_aiida__6__}" append aiida_lammps.yaml #----------------End of the Printing Final Variables information-----------------# #---------------------Start of the write restart information---------------------# write_restart restart.aiida diff --git a/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt b/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt index 1f2aec1..bed9881 100644 --- a/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt +++ b/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt @@ -25,11 +25,11 @@ compute pressure_all_aiida all pressure thermo_temp compute stress_atom_all_aiida all stress/atom NULL #-------------------------End of the Compute information-------------------------# #------------------------Start of the Thermo information-------------------------# -thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida[1] c_pressure_all_aiida[2] c_pressure_all_aiida[3] c_pressure_all_aiida[4] c_pressure_all_aiida[5] c_pressure_all_aiida[6] +thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida__1__ c_pressure_all_aiida__2__ c_pressure_all_aiida__3__ c_pressure_all_aiida__4__ c_pressure_all_aiida__5__ c_pressure_all_aiida__6__ thermo 100 #-------------------------End of the Thermo information--------------------------# #-------------------------Start of the Dump information--------------------------# -dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida[1] c_stress_atom_all_aiida[2] c_stress_atom_all_aiida[3] c_stress_atom_all_aiida[4] c_stress_atom_all_aiida[5] c_stress_atom_all_aiida[6] +dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida__1__ c_stress_atom_all_aiida__2__ c_stress_atom_all_aiida__3__ c_stress_atom_all_aiida__4__ c_stress_atom_all_aiida__5__ c_stress_atom_all_aiida__6__ dump_modify aiida sort id dump_modify aiida element Fe Fe dump_modify aiida format line "%6d %4d %4s %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f" @@ -48,12 +48,12 @@ variable final_pyy equal pyy variable final_pzz equal pzz variable final_etotal equal etotal variable final_c_pressure_all_aiida equal c_pressure_all_aiida -variable final_c_pressure_all_aiida_1 equal c_pressure_all_aiida[1] -variable final_c_pressure_all_aiida_2 equal c_pressure_all_aiida[2] -variable final_c_pressure_all_aiida_3 equal c_pressure_all_aiida[3] -variable final_c_pressure_all_aiida_4 equal c_pressure_all_aiida[4] -variable final_c_pressure_all_aiida_5 equal c_pressure_all_aiida[5] -variable final_c_pressure_all_aiida_6 equal c_pressure_all_aiida[6] +variable final_c_pressure_all_aiida__1__ equal c_pressure_all_aiida[1] +variable final_c_pressure_all_aiida__2__ equal c_pressure_all_aiida[2] +variable final_c_pressure_all_aiida__3__ equal c_pressure_all_aiida[3] +variable final_c_pressure_all_aiida__4__ equal c_pressure_all_aiida[4] +variable final_c_pressure_all_aiida__5__ equal c_pressure_all_aiida[5] +variable final_c_pressure_all_aiida__6__ equal c_pressure_all_aiida[6] #---------------------End of the Final Variables information---------------------# #---------------Start of the Printing Final Variables information----------------# print "#Final results" file aiida_lammps.yaml @@ -66,12 +66,12 @@ print "final_pyy: ${final_pyy}" append aiida_lammps.yaml print "final_pzz: ${final_pzz}" append aiida_lammps.yaml print "final_etotal: ${final_etotal}" append aiida_lammps.yaml print "final_c_pressure_all_aiida: ${final_c_pressure_all_aiida}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_1: ${final_c_pressure_all_aiida_1}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_2: ${final_c_pressure_all_aiida_2}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_3: ${final_c_pressure_all_aiida_3}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_4: ${final_c_pressure_all_aiida_4}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_5: ${final_c_pressure_all_aiida_5}" append aiida_lammps.yaml -print "final_c_pressure_all_aiida_6: ${final_c_pressure_all_aiida_6}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__1__: ${final_c_pressure_all_aiida__1__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__2__: ${final_c_pressure_all_aiida__2__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__3__: ${final_c_pressure_all_aiida__3__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__4__: ${final_c_pressure_all_aiida__4__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__5__: ${final_c_pressure_all_aiida__5__}" append aiida_lammps.yaml +print "final_c_pressure_all_aiida__6__: ${final_c_pressure_all_aiida__6__}" append aiida_lammps.yaml #----------------End of the Printing Final Variables information-----------------# #---------------------Start of the write restart information---------------------# write_restart restart.aiida From c612773ad1cef408d1664f8055e170b667bdefca Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 15 Jun 2022 17:19:08 +0200 Subject: [PATCH 7/7] Updating reference input files. --- .../test_generate_inputs/test_generate_input_eam_alloy_md.txt | 4 ++-- .../test_generate_input_eam_alloy_minimize.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt b/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt index d94fb26..5d246b4 100644 --- a/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt +++ b/tests/test_generate_inputs/test_generate_input_eam_alloy_md.txt @@ -25,11 +25,11 @@ compute pressure_all_aiida all pressure thermo_temp compute stress_atom_all_aiida all stress/atom NULL #-------------------------End of the Compute information-------------------------# #------------------------Start of the Thermo information-------------------------# -thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida__1__ c_pressure_all_aiida__2__ c_pressure_all_aiida__3__ c_pressure_all_aiida__4__ c_pressure_all_aiida__5__ c_pressure_all_aiida__6__ +thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida[1] c_pressure_all_aiida[2] c_pressure_all_aiida[3] c_pressure_all_aiida[4] c_pressure_all_aiida[5] c_pressure_all_aiida[6] thermo 100 #-------------------------End of the Thermo information--------------------------# #-------------------------Start of the Dump information--------------------------# -dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida__1__ c_stress_atom_all_aiida__2__ c_stress_atom_all_aiida__3__ c_stress_atom_all_aiida__4__ c_stress_atom_all_aiida__5__ c_stress_atom_all_aiida__6__ +dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida[1] c_stress_atom_all_aiida[2] c_stress_atom_all_aiida[3] c_stress_atom_all_aiida[4] c_stress_atom_all_aiida[5] c_stress_atom_all_aiida[6] dump_modify aiida sort id dump_modify aiida element Fe Fe dump_modify aiida format line "%6d %4d %4s %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f" diff --git a/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt b/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt index bed9881..389695f 100644 --- a/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt +++ b/tests/test_generate_inputs/test_generate_input_eam_alloy_minimize.txt @@ -25,11 +25,11 @@ compute pressure_all_aiida all pressure thermo_temp compute stress_atom_all_aiida all stress/atom NULL #-------------------------End of the Compute information-------------------------# #------------------------Start of the Thermo information-------------------------# -thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida__1__ c_pressure_all_aiida__2__ c_pressure_all_aiida__3__ c_pressure_all_aiida__4__ c_pressure_all_aiida__5__ c_pressure_all_aiida__6__ +thermo_style custom step ke pe press pxx pyy pzz etotal c_pressure_all_aiida c_pressure_all_aiida[1] c_pressure_all_aiida[2] c_pressure_all_aiida[3] c_pressure_all_aiida[4] c_pressure_all_aiida[5] c_pressure_all_aiida[6] thermo 100 #-------------------------End of the Thermo information--------------------------# #-------------------------Start of the Dump information--------------------------# -dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida__1__ c_stress_atom_all_aiida__2__ c_stress_atom_all_aiida__3__ c_stress_atom_all_aiida__4__ c_stress_atom_all_aiida__5__ c_stress_atom_all_aiida__6__ +dump aiida all custom 1000 temp.dump id type element x y z c_ke_atom_all_aiida c_pe_atom_all_aiida c_stress_atom_all_aiida[1] c_stress_atom_all_aiida[2] c_stress_atom_all_aiida[3] c_stress_atom_all_aiida[4] c_stress_atom_all_aiida[5] c_stress_atom_all_aiida[6] dump_modify aiida sort id dump_modify aiida element Fe Fe dump_modify aiida format line "%6d %4d %4s %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f %16.10f"