### Hello World Example: Convert POSCAR to extxyz and Inspect Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/quick_start.html A minimal end-to-end test to verify the installation by creating a POSCAR, converting it to extxyz, and checking the output. ```bash cat > POSCAR << 'EOF' Si 1.0 0 2.715 2.715 2.715 0 2.715 2.715 2.715 0 Si 1 direct 0 0 0 EOF ``` ```bash gpumdkit.sh -pos2exyz POSCAR model.xyz ``` ```bash head model.xyz ``` -------------------------------- ### Install GPUMDkit Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/index.html Clone the repository, navigate to the directory, and run the installation script. ```bash git clone https://github.com/zhyan0603/GPUMDkit.git cd GPUMDkit source ./install.sh ``` -------------------------------- ### Install GPUMDkit Source: https://github.com/zhyan0603/gpumdkit/blob/main/README.md Navigate to the cloned directory and run the installation script. ```bash cd GPUMDkit; source ./install.sh ``` -------------------------------- ### Install OVITO Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/tutorials/en/calculator_scripts.md Install the OVITO package, required for RDF calculation. ```bash pip install ovito ``` -------------------------------- ### CP2K Input Example Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/workflow_scripts.html Example of providing input files for CP2K SCF batch pretreatment. ```text dump.xyz template.inp H2O ``` -------------------------------- ### Set up Conda Environment and Install Dependencies Source: https://github.com/zhyan0603/gpumdkit/blob/main/README.md Create and activate a conda environment for GPUMDkit, then install the required Python packages using pip. ```bash conda create -n gpumdkit python=3.12 conda activate gpumdkit pip install neptrain ase pymatgen dpdata ``` -------------------------------- ### GPUMDkit CLI Examples Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/tutorials/en/quick_start.md Demonstrates common command-line operations for format conversion and calculation initiation. ```bash gpumdkit.sh -pos2exyz POSCAR model.xyz ``` ```bash gpumdkit.sh -plt train ``` ```bash gpumdkit.sh -calc msd trajectory.xyz Li 10 ``` -------------------------------- ### Python Script Example Source: https://github.com/zhyan0603/gpumdkit/blob/main/skills/gpumdkit-contributing/SKILL.md Example of a Python script to be placed in the Scripts/calculators/ subdirectory. ```bash # Python script example: Scripts/calculators/calc_new_feature.py ``` -------------------------------- ### Set up Conda Environment Source: https://github.com/zhyan0603/gpumdkit/blob/main/skills/gpumdkit-main/SKILL.md Create and activate a Conda environment for GPUMDkit, installing necessary Python packages. ```bash conda create -n gpumdkit python=3.12 conda activate gpumdkit pip install neptrain ase pymatgen dpdata numpy scipy matplotlib ``` -------------------------------- ### Install GPUMD-Kit Dependencies Source: https://github.com/zhyan0603/gpumdkit/blob/main/skills/gpumdkit-sampling/SKILL.md Install core dependencies like numpy and ase, and optional packages like neptrain or dpdata as needed. ```bash pip install numpy ase matplotlib scikit-learn scipy dpdata pip install neptrain # For FPS by NepTrain ``` -------------------------------- ### Tab Completion Examples Source: https://github.com/zhyan0603/gpumdkit/blob/main/README.md Demonstrates how to use Bash tab completion for GPUMDkit commands and their parameters. Pressing Tab suggests available options. ```shell gpumdkit.sh - ``` ```shell gpumdkit.sh -plt ``` ```shell gpumdkit.sh -time ``` -------------------------------- ### Install ferrodispcalc Package Source: https://github.com/zhyan0603/gpumdkit/blob/main/Scripts/calculators/README.md Installs the ferrodispcalc package required for neighbor list, displacement, polarization, tilt, and plane workflows. ```bash pip3 install git+https://github.com/MoseyQAQ/ferrodispcalc.git ``` -------------------------------- ### Template-Based Temperature Series Setup Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/workflow_scripts.html This shell loop automates the creation of directories for different temperatures, copies necessary files, and modifies a run template to set the temperature for each simulation. It's useful for setting up a series of simulations at varying temperatures. ```bash for temp in 300 500 700 900; do mkdir -p "${temp}K" cp model.xyz "${temp}K/" cp nep.txt "${temp}K/" sed "s/TEMPERATURE/$temp/g" run_template.in > "${temp}K/run.in" done ``` -------------------------------- ### Step 1: Get averaged structures Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Averages structures from the last half of each trajectory for temperature-driven phase transition analysis. ```bash gpumdkit.sh -calc avg-struct traj_*.xyz ``` -------------------------------- ### Get Help for Displacement Calculator Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Displays detailed argument information for the displacement calculator. ```bash gpumdkit.sh -calc disp -h ``` -------------------------------- ### Setup Directories for Temperature-Dependent MD Source: https://github.com/zhyan0603/gpumdkit/blob/main/skills/gpumdkit-workflows/SKILL.md This script automates the creation of directories for molecular dynamics simulations at different temperatures, copying necessary files and modifying run input scripts. ```bash # Setup directories for multiple temperatures for temp in 300 500 700 900; do mkdir -p "${temp}K" cp model.xyz "${temp}K/" cp nep.txt "${temp}K/" sed "s/TEMPERATURE/$temp/g" run_template.in > "${temp}K/run.in" done ``` -------------------------------- ### Modular Function Example (Bash) Source: https://github.com/zhyan0603/gpumdkit/blob/main/CONTRIBUTING.md Demonstrates good practice by accepting parameters for input and output files, promoting reusability. Avoid hardcoding values unless required by specific programs like GPUMD or NEP. ```bash # Good: accepts parameters function convert_file() { local input_file=$1 local output_file=$2 # processing logic } # Avoid: hardcoded values (unless required by GPUMD/NEP) function convert_file() { local input_file="hardcoded_input.xyz" # processing logic } ``` -------------------------------- ### Install and Activate GPUMDkit Environment Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/index.html Use these commands to create a new conda environment for GPUMDkit, activate it, and install necessary Python packages. ```bash conda create -n gpumdkit python=3.12 conda activate gpumdkit pip install neptrain dpdata calorine ``` -------------------------------- ### Get Help for Polarization Calculator Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Displays detailed argument information for the polarization calculator. ```bash gpumdkit.sh -calc pol-abo3 -h ``` -------------------------------- ### Install GPUMD-Kit Dependencies Source: https://github.com/zhyan0603/gpumdkit/blob/main/skills/gpumdkit-calculators/SKILL.md Install core Python packages required for GPUMD-Kit calculators, including numpy, ase, scipy, calorine, matplotlib, and tqdm. Also installs the ferrodispcalc package from GitHub. ```bash pip install numpy ase scipy calorine matplotlib tqdm pip3 install git+https://github.com/MoseyQAQ/ferrodispcalc.git ``` -------------------------------- ### Add a New Format Conversion Script Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/tutorials/zh/贡献指南.md Example of creating a new Python script for format conversion within the Scripts/format_conversion directory. ```bash # Example: Add a new format conversion script touch Scripts/format_conversion/new_converter.py ``` -------------------------------- ### Get Help for Plane Grid Plotting Tool Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Displays detailed argument information for the plane grid plotting tool. ```bash gpumdkit.sh -plt plane-grid -h ``` -------------------------------- ### Get Help for Octahedral Tilt Calculator Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Displays detailed argument information for the octahedral tilt calculator. ```bash gpumdkit.sh -calc oct-tilt -h ``` -------------------------------- ### VASP Input Directory Structure Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/workflow_scripts.html Example directory structures for VASP input files, supporting multiple .vasp files or a single .xyz file. ```text current directory/ ├── POSCAR_1.vasp ├── POSCAR_2.vasp └── POSCAR_3.vasp ``` ```text current directory/ └── sampled.xyz ``` -------------------------------- ### Preprocessing and Sampling Sequence Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/structure_sampling.html An example sequence of commands for preprocessing a trajectory and then sampling structures for training. Includes analyzer tools and a structure selection script. ```bash gpumdkit.sh -min_dist_pbc dump.xyz ``` ```bash gpumdkit.sh -filter_box dump.xyz 13 ``` ```python python Scripts/sample_structures/neptrain_select_structs.py dump.xyz train.xyz nep.txt ``` -------------------------------- ### Get Help for Neighbor List Calculator Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/htmls/en/polar_material_analysis.html Displays detailed argument information for the neighbor list calculator. ```bash gpumdkit.sh -calc nlist -h ``` -------------------------------- ### GPUMDkit Command Help Output Source: https://github.com/zhyan0603/gpumdkit/blob/main/docs/tutorials/en/command_reference.md Displays the main help table for GPUMDkit, outlining available commands and their brief descriptions. Use this to get an overview of the tool's capabilities. ```text +-------------------------------------------------------------------------------------------------------+ | GPUMDkit 1.5.6 (dev) (2026-06-17) Command Help | +-------------------------------------------------------------------------------------------------------+ | MAIN FUNCTIONS | +-------------------------------------------------------------------------------------------------------+ | -h Show this help table | -plt Plot and visualization tools | | -calc Calculator tools | -time Time-consuming analyzer | | -update Update GPUMDkit | -clean Clean extra files in current dir | +-------------------------------------------------------------------------------------------------------+ | FORMAT CONVERSION | +-------------------------------------------------------------------------------------------------------+ | -out2xyz OUTCAR -> extxyz (shell) | -out2exyz OUTCAR -> extxyz (python) | | -cp2k2xyz CP2K log -> xyz | -xdat2exyz XDATCAR -> extxyz | | -cif2pos cif -> POSCAR | -cif2exyz cif -> extxyz | | -pos2exyz POSCAR -> extxyz | -exyz2pos extxyz -> POSCAR | | -pos2lmp POSCAR -> LAMMPS data | -lmp2exyz LAMMPS dump -> extxyz | | -traj2exyz ASE traj -> extxyz | -replicate Replicate structure | | -addgroup Add group labels | -addweight Add structure weight in extxyz | | -clean_xyz Clean extra info in extxyz | -get_frame Extract specific frame | | -frame_range Extract frames by range | | +-------------------------------------------------------------------------------------------------------+ | ANALYSIS | +-------------------------------------------------------------------------------------------------------+ | -range Energy/force/virial statistics | -analyze_comp Analyze composition | | -chem_species Analyze chemical species | -cbc Charge balance check | | -min_dist Min distance (no PBC) | -min_dist_pbc Min distance with PBC | | -filter_dist Filter by min_dist (no PBC) | -filter_dist_pbc Filter by min_dist (PBC) | | -pda Probability density analysis | -filter_box Filter by box-edge length | | -pynep Deprecated PyNEP sampling | -nep_modifier Modify NEP model interactively | +-------------------------------------------------------------------------------------------------------+ | Detailed usage: gpumdkit.sh -