2.3.11. Configuration information — LAMMPS documentation

\(\renewcommand{\AA}{\text{Å}}\)

# 2.3.11. Configuration information

The following methods can be used to query the LAMMPS library about compile time settings and included packages and styles.

Example for using configuration settings functions

    from lammps import lammps

    lmp = lammps()

    try:
        lmp.file("in.missing")
    except Exception as e:
        print("LAMMPS failed with error:", e)

    # write compressed dump file depending on available of options

    if lmp.has_style("dump", "atom/zstd"):
        lmp.command("dump d1 all atom/zstd 100 dump.zst")
    elif lmp.has_style("dump", "atom/gz"):
        lmp.command("dump d1 all atom/gz 100 dump.gz")
    elif lmp.has_gzip_support():
        lmp.command("dump d1 all atom 100 dump.gz")
    else:
        lmp.command("dump d1 all atom 100 dump")

Methods:

- `lammps.has_mpi_support`

- `lammps.has_exceptions`

- `lammps.has_gzip_support`

- `lammps.has_png_support`

- `lammps.has_jpeg_support`

- `lammps.has_ffmpeg_support`

- `lammps.installed_packages`

- `lammps.get_accelerator_config`

- `lammps.has_style()`

- `lammps.available_styles()`