pymatgen.cli package
This package contains various command line interfaces for common pymatgen functionality such as file conversion, etc. Entry points to these interfaces are defined in [project.scripts] of pyproject.toml.
Submodules
pymatgen.cli.feff_plot_cross_section module
Script for plotting cross sections generated by FEFF found in xmu.dat files.
pymatgen.cli.feff_plot_dos module
Script to plot density of states (DOS) generated by an FEFF run either by site, element, or orbital.
pymatgen.cli.get_environment module
Command line script to get the chemical environment of a structure.
pymatgen.cli.pmg module
A master convenience script with many tools for vasp and structure analysis.
pymatgen.cli.pmg_analyze module
Implementation for pmg analyze CLI.
- analyze(args: Namespace) int [source]
Main function controlling which analysis to call.
- Parameters:
args (Namespace) – args from argparse.
- get_energies(rootdir: str, reanalyze: bool, verbose: bool, quick: bool, sort: bool, fmt: str) int [source]
Get energies of all vaspruns in directory (nested).
- Parameters:
rootdir (str) – Root directory.
reanalyze (bool) – Whether to ignore saved results and reanalyze
verbose (bool) – Verbose mode or not.
quick (bool) – Whether to perform a quick analysis (using OSZICAR instead of vasprun.xml
sort (bool) – Whether to sort the results in ascending order.
fmt (str) – tablefmt passed to tabulate.
pymatgen.cli.pmg_config module
Implementation for pmg config CLI.
- add_config_var(tokens: list[str], backup_suffix: str) None [source]
Add/update keys in .pmgrc.yaml config file.
- build_bader(fortran_command='gfortran') bool [source]
Build bader package.
- Parameters:
fortran_command – The Fortran compiler command.
- build_enum(fortran_command: str = 'gfortran') bool [source]
Build enum.
- Parameters:
fortran_command – The Fortran compiler command.
- install_software(install: Literal['enumlib', 'bader']) None [source]
Install all optional external software.
pymatgen.cli.pmg_plot module
Implementation for pmg plot CLI.
- get_chgint_plot(args: Namespace, ax: plt.Axes | None = None) plt.Axes [source]
Plot integrated charge from CHGCAR file.
- Parameters:
args (Namespace) – args from argparse.
ax (plt.Axes) – Matplotlib Axes object for plotting.
- Returns:
Matplotlib Axes object.
- Return type:
plt.Axes
- get_dos_plot(args: Namespace) plt.Axes [source]
Plot DOS from vasprun.xml file.
- Parameters:
args (Namespace) – Args from argparse.
pymatgen.cli.pmg_potcar module
Implementation for pmg potcar CLI.
- gen_potcar(dirname: str, filename: str) None [source]
Generate POTCAR from POTCAR.spec in directories.
- Parameters:
dirname (str) – Directory name.
filename (str) – Filename in directory.
pymatgen.cli.pmg_structure module
Implementation for pmg structure CLI.
- analyze_localenv(args: Namespace) None [source]
Analyze local env of structures in files.
- Parameters:
args (Namespace) – Args for argparse.
- analyze_structures(args: Namespace) None [source]
Main function to handle which operation to perform.
- Parameters:
args (Namespace) – Args from argparse.
- analyze_symmetry(args: Namespace) None [source]
Analyze symmetry of structures in files.
- Parameters:
args (Namespace) – Args from argparse.