lammps_utils package

LAMMPS Utilities

lammps_utils is a Python package for LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator) that provides utilities for data manipulation, analysis, and visualization.

Subpackages

Submodules

lammps_utils.constants module

Constants and type definitions for working with atomic data and LAMMPS data file formatting.

This module provides: - The number of known chemical elements, - A mapping of element symbols to their atomic masses, - Type definitions for parsing atom and bond sections in LAMMPS data files.

lammps_utils.constants.COLS_ATOMS_LAMMPS_DATA_DTYPE = {'charge': <class 'float'>, 'id': <class 'int'>, 'mol': <class 'int'>, 'type': <class 'int'>, 'x': <class 'float'>, 'y': <class 'float'>, 'z': <class 'float'>}

Column name to data type mapping for atoms in a LAMMPS data file.

lammps_utils.constants.COLS_BONDS_LAMMPS_DATA_DTYPE = {'atom1': <class 'int'>, 'atom2': <class 'int'>, 'id': <class 'int'>, 'type': <class 'int'>}

Column name to data type mapping for bonds in a LAMMPS data file.

lammps_utils.constants.MAP_ELEMENT_MASSES: dict[str, float] = {'Ac': 227.0, 'Ag': 107.868, 'Al': 26.982, 'Am': 243.0, 'Ar': 39.948, 'As': 74.922, 'At': 210.0, 'Au': 196.967, 'B': 10.812, 'Ba': 137.328, 'Be': 9.012, 'Bh': 270.0, 'Bi': 208.98, 'Bk': 247.0, 'Br': 79.904, 'C': 12.011, 'Ca': 40.078, 'Cd': 112.412, 'Ce': 140.116, 'Cf': 251.0, 'Cl': 35.453, 'Cm': 247.0, 'Cn': 285.0, 'Co': 58.933, 'Cr': 51.996, 'Cs': 132.905, 'Cu': 63.546, 'Db': 268.0, 'Ds': 281.0, 'Dy': 162.5, 'Er': 167.26, 'Es': 252.0, 'Eu': 151.964, 'F': 18.998, 'Fe': 55.845, 'Fl': 289.0, 'Fm': 257.0, 'Fr': 223.0, 'Ga': 69.723, 'Gd': 157.25, 'Ge': 72.61, 'H': 1.008, 'He': 4.003, 'Hf': 178.49, 'Hg': 200.59, 'Ho': 164.93, 'Hs': 269.0, 'I': 126.904, 'In': 114.818, 'Ir': 192.217, 'K': 39.098, 'Kr': 83.8, 'La': 138.906, 'Li': 6.941, 'Lr': 262.0, 'Lu': 174.967, 'Lv': 293.0, 'Mc': 288.0, 'Md': 258.0, 'Mg': 24.305, 'Mn': 54.938, 'Mo': 95.94, 'Mt': 278.0, 'N': 14.007, 'Na': 22.99, 'Nb': 92.906, 'Nd': 144.24, 'Ne': 20.18, 'Nh': 284.0, 'Ni': 58.693, 'No': 259.0, 'Np': 237.0, 'O': 15.999, 'Og': 294.0, 'Os': 190.23, 'P': 30.974, 'Pa': 231.036, 'Pb': 207.2, 'Pd': 106.42, 'Pm': 145.0, 'Po': 209.0, 'Pr': 140.908, 'Pt': 195.078, 'Pu': 244.0, 'Ra': 226.0, 'Rb': 85.468, 'Re': 186.207, 'Rf': 267.0, 'Rg': 281.0, 'Rh': 102.906, 'Rn': 222.0, 'Ru': 101.07, 'S': 32.067, 'Sb': 121.76, 'Sc': 44.956, 'Se': 78.96, 'Sg': 269.0, 'Si': 28.086, 'Sm': 150.36, 'Sn': 118.711, 'Sr': 87.62, 'Ta': 180.948, 'Tb': 158.925, 'Tc': 98.0, 'Te': 127.6, 'Th': 232.038, 'Ti': 47.867, 'Tl': 204.383, 'Tm': 168.934, 'Ts': 292.0, 'U': 238.029, 'V': 50.944, 'W': 183.84, 'Xe': 131.29, 'Y': 88.906, 'Yb': 173.04, 'Zn': 65.39, 'Zr': 91.224}

Mapping from element symbols (e.g., ‘H’, ‘C’, ‘O’) to their atomic masses in atomic mass units (amu or g/mol).

lammps_utils.constants.MAP_VDW_RADIUS = {'Br': 1.85, 'C': 1.7, 'Cl': 1.75, 'F': 1.47, 'H': 1.2, 'I': 1.98, 'N': 1.55, 'O': 1.52, 'P': 1.8, 'S': 1.8}

Mapping from atomic symbols to van der Waals radii in angstroms.

lammps_utils.constants.N_ELEMENTS = 118

Total number of elements in the periodic table. The 118th element is Oganesson (Og).