update PyLammps to use added properties directly instead of parsing them.

This commit is contained in:
Axel Kohlmeyer
2024-06-14 20:21:19 -04:00
parent 1ce94e47d8
commit cb3aa07287

View File

@ -797,16 +797,15 @@ class PyLammps(object):
comm['nprocs'] = self.lmp.extract_setting("world_size")
comm['nthreads'] = self.lmp.extract_setting("nthreads")
comm['proc_grid'] = self.lmp.extract_global("proc_grid")
idx = self.lmp_extract_setting("comm_style")
comm['comm_style'] = ('brick', 'tiled')[idx]
idx = self.lmp_extract_setting("comm_style")
comm['comm_layout'] = ('uniform', 'nonuniform', 'irregular')[idx]
comm['ghost_velocity'] = self.lmp_extract_setting("ghost_velocity") == 1
for line in output:
if line.startswith("MPI library"):
comm['mpi_version'] = line.split(':')[1].strip()
elif line.startswith("Comm style"):
parts = self._split_values(line)
comm['comm_style'] = self._get_pair(parts[0])[1]
comm['comm_layout'] = self._get_pair(parts[1])[1]
elif line.startswith("Communicate velocities for ghost atoms"):
comm['ghost_velocity'] = (self._get_pair(line)[1] == "yes")
return comm
def _parse_element_list(self, output):