diff --git a/src/aiida_lammps/calculations/base.py b/src/aiida_lammps/calculations/base.py index 2db4963..2900630 100644 --- a/src/aiida_lammps/calculations/base.py +++ b/src/aiida_lammps/calculations/base.py @@ -366,8 +366,12 @@ def prepare_for_submission(self, folder): handle.write(structure_filecontent) # Write the potential to the remote folder - with folder.open(self._POTENTIAL_FILENAME, "w") as handle: - handle.write(self.inputs.potential.get_content()) + with folder.open(self._POTENTIAL_FILENAME, "wb") as handle: + # Read the contents of the potential file in binary mode + with self.inputs.potential.open(mode="rb") as potential_handle: + potential_content = potential_handle.read() + + handle.write(potential_content) # Write the input file content. This function will also check the # sanity of the passed parameters when comparing it to a schema diff --git a/src/aiida_lammps/data/lammps_potentials.json b/src/aiida_lammps/data/lammps_potentials.json index a8df82d..1da6500 100644 --- a/src/aiida_lammps/data/lammps_potentials.json +++ b/src/aiida_lammps/data/lammps_potentials.json @@ -189,6 +189,8 @@ "lj/mdf":{"units": "metal", "atom_style": "atomic", "read_from_file": false}, "buck/mdf":{"units": "unknown", "atom_style": "atomic", "read_from_file": false}, "lennard/mdf":{"units": "unknown", "atom_style": "atomic", "read_from_file": false}, + "mace":{"units": "unknown", "atom_style": "atomic", "read_from_file": true}, + "mace no_domain_decomposition":{"units": "unknown", "atom_style": "atomic", "read_from_file": true}, "meam":{"units": "unknown", "atom_style": "atomic", "read_from_file": true}, "meam/spline":{"units": "unknown", "atom_style": "atomic", "read_from_file": true}, "meam/sw/spline":{"units": "unknown", "atom_style": "atomic", "read_from_file": true}, diff --git a/src/aiida_lammps/parsers/inputfile.py b/src/aiida_lammps/parsers/inputfile.py index fc305d9..58949a1 100644 --- a/src/aiida_lammps/parsers/inputfile.py +++ b/src/aiida_lammps/parsers/inputfile.py @@ -320,6 +320,11 @@ def write_structure_block( # Set the atom style for the structure structure_block += f'atom_style {parameters_structure["atom_style"]}\n' + + # Set the atom modify for the structure + if "atom_modify" in parameters_structure: + structure_block += "atom_modify" + structure_block += f' {parameters_structure["atom_modify"]}\n' # Write the command to read the structure from a file structure_block += f"read_data {structure_filename}\n" # Set the groups which will be used for the calculations diff --git a/src/aiida_lammps/validation/schemas/lammps_schema.json b/src/aiida_lammps/validation/schemas/lammps_schema.json index fc58401..836b8e6 100644 --- a/src/aiida_lammps/validation/schemas/lammps_schema.json +++ b/src/aiida_lammps/validation/schemas/lammps_schema.json @@ -114,6 +114,9 @@ ] } }, + "atom_modify": { + "type": "array" + }, "box_tilt": { "type": "string", "propertyNames": {