2.10. Retrieving LAMMPS 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()

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")
    lmp.command("dump d1 all atom 100 dump")