### Verify dpdata installation via command-line interface Source: https://github.com/deepmodeling/dpdata/blob/master/docs/installation.md Execute this command in your terminal to confirm that the dpdata library has been successfully installed and to display its current version. This helps in troubleshooting and confirming the correct setup of the library. ```bash dpdata --version ``` -------------------------------- ### Install dpdata Python library using various methods Source: https://github.com/deepmodeling/dpdata/blob/master/docs/installation.md This snippet provides commands to install the dpdata Python library using popular package managers like pip and conda, or directly from its source code. Ensure Python 3.8 or above is installed and a suitable environment is set up before execution. ```bash pip install dpdata ``` ```bash conda install -c conda-forge dpdata ``` ```bash git clone https://github.com/deepmodeling/dpdata && pip install ./dpdata ``` -------------------------------- ### Python: Import dpdata Library Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet imports the necessary `dpdata` library, which is essential for all subsequent data processing operations. It also includes `from __future__ import annotations` for type hint compatibility, ensuring modern Python syntax. ```python from __future__ import annotations import dpdata ``` -------------------------------- ### Install dpdata Library using pip Source: https://github.com/deepmodeling/dpdata/blob/master/plugin_example/README.md This snippet demonstrates how to install the dpdata library from its local directory using pip. Ensure you are in the project's root directory where `setup.py` or `pyproject.toml` is located. This command installs the package, making local changes reflect without reinstallation. ```sh pip install . ``` -------------------------------- ### VASP General Simulation Start Parameters Configuration Source: https://github.com/deepmodeling/dpdata/blob/master/tests/poscars/OUTCAR.h2o.md This snippet lists the fundamental start parameters for the VASP run, such as write flags, precision settings, job type, and charge initialization method. It also specifies whether spin-polarized, non-collinear, or spin-orbit coupling calculations are enabled. ```VASP Output Startparameter for this run: NWRITE = 2 write-flag & timer PREC = a normal or accurate (medium, high low for compatibility) ISTART = 0 job : 0-new 1-cont 2-samecut ICHARG = 2 charge: 1-file 2-atom 10-const ISPIN = 1 spin polarized calculation? LNONCOLLINEAR = F non collinear calculations LSORBIT = F spin-orbit coupling INIWAV = 1 electr: 0-lowe 1-rand 2-diag LASPH = T aspherical Exc in radial PAW METAGGA= F non-selfconsistent MetaGGA calc. ``` -------------------------------- ### Verify dpdata Python Installation Source: https://github.com/deepmodeling/dpdata/blob/master/README.md After installing dpdata, use this command to verify that the package has been successfully installed and is accessible in your environment. It will display the installed version of dpdata. ```Bash dpdata --version ``` -------------------------------- ### Example Simulation Trajectory Data Structure Source: https://github.com/deepmodeling/dpdata/blob/master/tests/openmx/Methane.md This snippet illustrates the structure of a simulation trajectory data file. Typically, each time step begins with an integer indicating the number of atoms, followed by a header line containing time, energy, temperature, and cell vectors. Subsequent lines detail each atom's species, coordinates (x, y, z), forces (fx, fy, fz), and additional simulation-specific properties. The provided example shows several consecutive frames, starting with atom data from an initial frame. ```Simulation Data H -0.92718 -0.02640 0.55516 -0.01787 0.00895 -0.00053 349.85459 -1543.44207 -395.81855 -0.02178 0.00000 0.00000 0.00000 1 H 0.29524 -0.99163 -0.05691 0.01149 -0.02710 -0.00967 -1686.54023 -1435.14809 153.63262 -0.00319 0.00000 0.00000 0.00000 1 5 time= 177.000 (fs) Energy= -8.21153 (Hartree) Temperature= 298.943 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.03793 0.01495 -0.04518 0.02505 0.00205 0.01994 347.79397 586.57018 578.93488 0.12794 0.00000 0.00000 0.00000 1 H -0.07463 0.46730 -1.02971 -0.00965 -0.00102 -0.00456 2380.72279 2181.51034 638.15197 -0.03667 0.00000 0.00000 0.00000 1 H 0.72330 0.56721 0.54716 -0.00558 -0.00293 -0.00390 -2356.86178 10.15510 -1832.51087 -0.04482 0.00000 0.00000 0.00000 1 H -0.92967 -0.03473 0.55411 -0.01748 0.01061 -0.00166 -248.86972 -832.87531 -104.09439 -0.02266 0.00000 0.00000 0.00000 1 H 0.28683 -1.01662 -0.05695 0.00780 -0.00883 -0.00969 -840.22166 -2499.23837 -4.41216 -0.02379 0.00000 0.00000 0.00000 1 5 time= 178.000 (fs) Energy= -8.21117 (Hartree) Temperature= 399.280 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.03086 0.02211 -0.03622 0.00858 -0.02363 0.00371 707.55212 715.29436 895.88290 0.13127 0.00000 0.00000 0.00000 1 H -0.05303 0.48982 -1.02324 -0.01126 -0.00480 -0.00120 2160.42699 2252.60671 647.11851 -0.04047 0.00000 0.00000 0.00000 1 H 0.69954 0.56708 0.52925 0.01139 0.00655 0.01129 -2376.56664 -12.62597 -1791.50973 -0.01688 0.00000 0.00000 0.00000 1 H -0.93821 -0.03662 0.55459 -0.01239 0.01152 -0.00494 -854.34233 -189.24057 47.66120 -0.02881 0.00000 0.00000 0.00000 1 H 0.28482 -1.04475 -0.05944 0.00383 0.01026 -0.00869 -201.19907 -2812.85222 -248.22634 -0.04511 0.00000 0.00000 0.00000 1 5 time= 179.000 (fs) Energy= -8.20876 (Hartree) Temperature= 358.528 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.000 ``` -------------------------------- ### Python: Read and Print LAMMPS Configuration File Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet demonstrates how to open and read the content of the newly generated LAMMPS configuration file (`conf.lmp`). It then prints the entire content of the file to the console, allowing for immediate verification of the data conversion. ```python with open("conf.lmp") as f: print(f.read()) ``` -------------------------------- ### Install dpdata Python Package Source: https://github.com/deepmodeling/dpdata/blob/master/README.md This snippet provides commands to install the dpdata Python package using pip, conda, or directly from the source code. dpdata requires Python 3.8 or above and can be installed into a new or existing environment. ```Bash pip install dpdata ``` ```Bash conda install -c conda-forge dpdata ``` ```Bash git clone https://github.com/deepmodeling/dpdata && pip install ./dpdata ``` -------------------------------- ### Python: Load VASP OUTCAR Data with dpdata Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet demonstrates how to load atomistic simulation data from a VASP OUTCAR file into a `dpdata.LabeledSystem` object. It specifies the file format as 'vasp/outcar' and maps atom types ('O', 'H') for proper data interpretation and labeling within the system. ```python system = dpdata.LabeledSystem("OUTCAR", fmt="vasp/outcar", type_map=["O", "H"]) ``` -------------------------------- ### Example POSCAR File for a Simple System Source: https://github.com/deepmodeling/dpdata/blob/master/tests/poscars/POSCAR.h2o.md This snippet presents a concrete example of a POSCAR file, illustrating the format for specifying lattice vectors, atom types (Oxygen and Hydrogen), and their fractional coordinates. It's a foundational data structure for defining atomic systems in materials science simulations and is processed by tools such as dpdata. ```POSCAR POSCAR file written by OVITO 1 10 0.0 0.0 -0.011409 10 0.0 0.1411083 -0.0595569 10 O H 2 4 d .428 .424 .520 .230 .628 .113 .458 .352 .458 .389 .384 .603 .137 .626 .150 .231 .589 .021 ``` -------------------------------- ### Overview of Molecular Dynamics Simulation Setup Source: https://github.com/deepmodeling/dpdata/blob/master/tests/poscars/OUTCAR.h2o.md This snippet provides an overview of the molecular dynamics simulation setup, including the use of a microcanonical ensemble and the update mechanisms for charge density and potential. It also details the specific algorithms employed for band diagonalization, mixing schemes, and the treatment of non-local parts and core corrections. This information is essential for understanding the underlying computational methodology. ```APIDOC molecular dynamics for ions using a microcanonical ensemble charge density and potential will be updated during run non-spin polarized calculation RMM-DIIS sequential band-by-band and variant of blocked Davidson during initial phase perform sub-space diagonalisation before iterative eigenvector-optimisation modified Broyden-mixing scheme, WC = 100.0 initial mixing is a Kerker type mixing with AMIX = 0.4000 and BMIX = 1.0000 Hartree-type preconditioning will be used using additional bands 4 real space projection scheme for non local part use partial core corrections calculate Harris-corrections to forces (improved forces if not selfconsistent) use gradient corrections use of overlap-Matrix (Vanderbilt PP) Gauss-broadening in eV SIGMA = 0.05 ``` -------------------------------- ### Example Molecular Dynamics Trajectory Timestep Source: https://github.com/deepmodeling/dpdata/blob/master/tests/openmx/Methane.md This snippet illustrates a single timestep from a molecular dynamics simulation trajectory. It begins with the number of atoms, followed by global simulation parameters (time, energy, temperature, cell vectors), and then lists per-atom data including element, coordinates (x, y, z), velocities (vx, vy, vz), forces (fx, fy, fz), and other properties. ```Simulation Data Format 5 time= 12.000 (fs) Energy= -8.21343 (Hartree) Temperature= 374.783 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C 0.00993 -0.00331 0.00571 -0.01392 0.02931 -0.01958 -702.71049 -1061.35859 238.31916 0.13134 0.00000 0.00000 0.00000 1 H -0.89909 -0.58705 -0.07605 -0.00726 -0.00346 -0.00372 -79.97526 -1236.07536 1453.85095 -0.02599 0.00000 0.00000 0.00000 1 H 0.09404 0.71102 -0.87520 -0.00303 -0.01463 0.01785 3200.28855 2440.56815 -1423.53003 -0.06232 0.00000 0.00000 0.00000 1 H -0.05385 0.57175 0.92958 0.00415 0.00159 0.00271 -645.06397 -962.94951 463.08095 -0.03307 0.00000 0.00000 0.00000 1 H 0.83860 -0.66453 -0.00545 0.02006 -0.01279 0.00267 -1495.12801 665.43008 -548.72000 -0.00996 0.00000 0.00000 0.00000 1 ``` -------------------------------- ### Python: Create and Print a dpdata System Object Source: https://github.com/deepmodeling/dpdata/blob/master/plugin_example/README.md This Python snippet shows how to import the `dpdata` library and create a `dpdata.System` object. It initializes a system with 12 frames using a 'random' format, then prints the system's summary to standard output. This demonstrates basic object instantiation and data summarization. ```python import dpdata print(dpdata.System(12, fmt="random")) ``` -------------------------------- ### Python: Access Forces from dpdata System Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet demonstrates how to retrieve the 'forces' property from a `dpdata.LabeledSystem` object. The forces are usually represented as a NumPy array, containing the forces on each atom for every frame in the simulation data. ```python system["forces"] ``` -------------------------------- ### Python: Access Energies from dpdata System Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet shows how to access the 'energies' property from a loaded `dpdata.LabeledSystem` object. The energies are typically stored as a NumPy array, representing the total energy for each frame in the simulation data. ```python system["energies"] ``` -------------------------------- ### APIDOC: dpdata.MultiSystems Class Reference Source: https://github.com/deepmodeling/dpdata/blob/master/docs/systems/multi.md Detailed API reference for the `dpdata.MultiSystems` class, including its constructors and key methods for handling multiple simulation systems. ```APIDOC class dpdata.MultiSystems: description: Can read data from a directory containing many files of different systems, or from a single xyz file containing different systems. methods: from_dir: description: Reads data from a directory. Recursively finds files with a specific file_name. Supports all file formats that dpdata.LabeledSystem supports. parameters: dir_name: type: string description: The directory to read from. file_name: type: string description: The specific file name or wildcard pattern to search for. fmt: type: string description: The format of the files (e.g., "vasp/outcar"). returns: type: dpdata.MultiSystems description: A new MultiSystems instance containing data from the directory. from_file: description: Reads data from a single file. Single-file support is available for `quip/gap/xyz` and `ase/structure` formats. parameters: file_name: type: string description: The path to the single file. fmt: type: string description: The format of the file (e.g., "quip/gap/xyz"). returns: type: dpdata.MultiSystems description: A new MultiSystems instance containing data from the file. ``` -------------------------------- ### Molecular Dynamics Trajectory Data Format Example Source: https://github.com/deepmodeling/dpdata/blob/master/tests/openmx/Methane.md This snippet illustrates the structure of a molecular dynamics dump file. Each complete block represents a time step, typically starting with the number of atoms, followed by global simulation properties (time, energy, temperature, cell vectors), and then individual atom data (type, coordinates, velocities, forces, and other properties). This format is commonly used for post-processing with tools like `dpdata`. ```Text H -0.59584 0.14512 0.91691 0.00775 -0.00181 0.00736 -77.03963 -2381.67435 -1205.04519 -0.03414 0.00000 0.00000 0.00000 1 H 0.54951 -0.95161 -0.01240 0.00702 -0.00502 0.00731 -3519.68936 1133.54901 915.96439 -0.02839 0.00000 0.00000 0.00000 1 5 time= 109.000 (fs) Energy= -8.20974 (Hartree) Temperature= 386.528 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C 0.03044 -0.01722 0.03802 -0.00633 0.04847 -0.01817 272.52613 -1117.55246 436.99624 0.11505 0.00000 0.00000 0.00000 1 H -0.66750 -0.01551 -0.78167 -0.01046 -0.00186 -0.01328 2643.95829 866.15881 154.58705 -0.01498 0.00000 0.00000 0.00000 1 H 0.68652 0.88238 -0.18704 -0.00746 -0.02103 0.01261 356.58056 1368.55376 -407.28892 -0.06616 0.00000 0.00000 0.00000 1 H -0.59385 0.12064 0.90719 0.00245 0.00137 0.01363 199.23038 -2447.63052 -971.50008 -0.02964 0.00000 0.00000 0.00000 1 H 0.51672 -0.94251 -0.00093 0.02167 -0.02680 0.00516 -3279.43423 909.61223 1147.12459 -0.00427 0.00000 0.00000 0.00000 1 5 time= 110.000 (fs) Energy= -8.20722 (Hartree) Temperature= 185.887 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C 0.03223 -0.02337 0.04010 -0.00612 0.06281 -0.01999 179.44041 -614.67920 208.05824 0.10400 0.00000 0.00000 0.00000 1 H -0.64687 -0.00475 -0.78819 -0.01414 -0.00286 -0.01533 2063.31483 1075.77771 -652.73668 -0.01316 0.00000 0.00000 0.00000 1 H 0.68575 0.88873 -0.18643 -0.00783 -0.02536 0.01510 -76.56431 634.44544 60.16190 -0.07261 0.00000 0.00000 0.00000 1 H -0.59131 0.09985 0.90265 -0.00171 0.00402 0.01697 254.22930 -2079.21707 -453.86418 -0.02652 0.00000 0.00000 0.00000 1 H 0.49394 -0.94360 0.01155 0.02965 -0.03840 0.00322 -2278.22522 -108.48366 1247.78588 0.00829 0.00000 0.00000 0.00000 1 5 time= 111.000 (fs) Energy= -8.20815 (Hartree) Temperature= 111.934 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C 0.03321 -0.02191 0.03964 -0.00586 0.05239 -0.02110 98.36917 146 ``` -------------------------------- ### dpdata CLI Reference and Usage Source: https://github.com/deepmodeling/dpdata/blob/master/docs/cli.rst This snippet details the structure and available commands of the dpdata command-line interface. It outlines the program name, general usage, and provides examples of common subcommands along with their expected arguments and options. This documentation is derived from the argparse definition of the dpdata CLI. ```APIDOC { "program": "dpdata", "description": "Command-line interface for dpdata, a data processing library for deep potential.", "usage": "dpdata [options]", "commands": [ { "name": "convert", "description": "Convert data between different formats.", "arguments": [ {"name": "", "type": "string", "description": "Path to the input data file."}, {"name": "", "type": "string", "description": "Path for the output data file."}, {"name": "--from", "type": "string", "description": "Input format (e.g., 'vasp', 'lammps', 'deepmd')."}, {"name": "--to", "type": "string", "description": "Output format (e.g., 'deepmd', 'npy', 'vasp')."} ] }, { "name": "merge", "description": "Merge multiple dpdata datasets into a single one.", "arguments": [ {"name": "", "type": "array", "description": "List of input data files to merge."}, {"name": "", "type": "string", "description": "Path for the merged output data file."} ] }, { "name": "split", "description": "Split a dpdata dataset into multiple smaller datasets.", "arguments": [ {"name": "", "type": "string", "description": "Path to the input data file."}, {"name": "--size", "type": "integer", "description": "Number of frames per split file."}, {"name": "--prefix", "type": "string", "description": "Prefix for output split files."} ] }, { "name": "info", "description": "Display information and statistics about a dpdata dataset.", "arguments": [ {"name": "", "type": "string", "description": "Path to the data file."} ] } ], "global_options": [ {"name": "--help", "type": "boolean", "description": "Show this help message and exit."}, {"name": "--version", "type": "boolean", "description": "Show program's version number and exit."} ] } ``` -------------------------------- ### Directly Dump LabeledSystem to DeepMD-kit Raw Format in Python Source: https://github.com/deepmodeling/dpdata/blob/master/docs/systems/system.md This snippet provides a more concise way to load data from an OUTCAR file and immediately dump it to DeepMD-kit raw format. It chains the `LabeledSystem` constructor with the `to` method. This streamlines the workflow for data preparation. ```python dpdata.LabeledSystem("OUTCAR").to("deepmd/raw", "dpmd_raw") ``` -------------------------------- ### Python: Convert dpdata System to LAMMPS Format Source: https://github.com/deepmodeling/dpdata/blob/master/docs/nb/try_dpdata.ipynb This snippet illustrates how to convert the loaded `dpdata.LabeledSystem` object into a LAMMPS data file format. It specifies the output format as 'lammps/lmp', the output filename as 'conf.lmp', and selects a specific frame (index 0) for conversion. ```python system.to("lammps/lmp", "conf.lmp", frame_idx=0) ``` -------------------------------- ### dpdata.System and LabeledSystem Properties API Reference Source: https://github.com/deepmodeling/dpdata/blob/master/docs/systems/system.md This API documentation details the available properties of `dpdata.System` and `LabeledSystem` objects. It lists keys, data types, dimensions, and whether the property represents a label. These properties provide access to various aspects of the loaded simulation data, such as atom names, types, cell information, coordinates, energies, forces, and virials. ```APIDOC { "atom_names": { "type": "list of str", "dimension": "ntypes", "is_label": false, "description": "The name of each atom type" }, "atom_numbs": { "type": "list of int", "dimension": "ntypes", "is_label": false, "description": "The number of atoms of each atom type" }, "atom_types": { "type": "np.ndarray", "dimension": "natoms", "is_label": false, "description": "Array assigning type to each atom" }, "cells": { "type": "np.ndarray", "dimension": "nframes x 3 x 3", "is_label": false, "description": "The cell tensor of each frame" }, "coords": { "type": "np.ndarray", "dimension": "nframes x natoms x 3", "is_label": false, "description": "The atom coordinates" }, "energies": { "type": "np.ndarray", "dimension": "nframes", "is_label": true, "description": "The frame energies" }, "forces": { "type": "np.ndarray", "dimension": "nframes x natoms x 3", "is_label": true, "description": "The atom forces" }, "virials": { "type": "np.ndarray", "dimension": "nframes x 3 x 3", "is_label": true, "description": "The virial tensor of each frame" } } ``` -------------------------------- ### Example Molecular Dynamics Trajectory File Format Source: https://github.com/deepmodeling/dpdata/blob/master/tests/openmx/Methane.md This snippet illustrates the structure of a typical molecular dynamics trajectory file. Each block represents a single time step, starting with atomic data (element, coordinates, forces, virial, charge) followed by a line indicating the number of atoms, and then a line detailing global simulation parameters such as time, total energy, temperature, and cell vectors. This format is commonly used in scientific computing for storing simulation results. ```Plain Text C -0.03874 0.00212 -0.01925 0.02224 -0.01296 0.01200 -826.88785 798.12213 -908.32600 0.15206 0.00000 0.00000 0.00000 1 H -0.95551 -0.61693 -0.07552 0.00631 0.00899 -0.00922 -1186.34119 237.17875 -1159.59460 -0.04220 0.00000 0.00000 0.00000 1 H 0.17863 0.72364 -0.81022 -0.01330 -0.00055 -0.00608 362.66447 -1227.30766 2858.90740 -0.02748 0.00000 0.00000 0.00000 1 H -0.06458 0.56073 0.93161 0.00200 -0.00372 -0.00225 248.02618 50.36064 -444.00728 -0.03330 0.00000 0.00000 0.00000 1 H 0.86946 -0.67364 -0.02873 -0.01719 0.00828 0.00560 990.11179 -39.97565 -248.36000 -0.04909 0.00000 0.00000 0.00000 1 5 time= 18.000 (fs) Energy= -8.21047 (Hartree) Temperature= 247.434 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.04428 0.00936 -0.02750 0.02168 -0.03301 0.03019 -553.23814 723.57385 -825.82650 0.13955 0.00000 0.00000 0.00000 1 H -0.96245 -0.61035 -0.09133 0.00767 0.00981 -0.00844 -694.79317 657.87611 -1581.55533 -0.04724 0.00000 0.00000 0.00000 1 H 0.17754 0.71085 -0.78424 -0.00861 0.01660 -0.02547 -109.48011 -1279.14936 2597.90094 -0.00161 0.00000 0.00000 0.00000 1 H -0.05929 0.55918 0.92639 0.00041 -0.00328 -0.00091 529.32519 -155.25841 -521.83094 -0.03461 0.00000 0.00000 0.00000 1 H 0.87273 -0.67018 -0.02812 -0.02107 0.00987 0.00477 326.98502 345.36929 61.03299 -0.05609 0.00000 0.00000 0.00000 1 5 time= 19.000 (fs) Energy= -8.20936 (Hartree) Temperature= 118.388 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.04694 0.01317 -0.03262 0.01948 -0.04360 0.04154 -266.28948 380.53451 -512.07536 0.12645 0.00000 0.00000 0.00000 1 H -0.96366 -0.60100 -0.10944 0.00633 0.00869 -0.00728 -120.45728 934.90747 -1810.93637 -0.04899 0.00000 0.00000 0.00000 1 H 0.17417 0.70414 -0.76888 -0.00435 0.02875 -0.03842 -336.44744 -671.11451 1536.45118 0.01479 0.00000 0.00000 0.00000 1 H -0.05181 0.55393 0.92260 -0.00140 -0.00210 0.00096 747.86726 -524.90932 -378.53649 -0.03530 0.00000 0.00000 0.00000 1 H 0.867 ``` -------------------------------- ### Load VASP POSCAR Data with Inferred Format in Python Source: https://github.com/deepmodeling/dpdata/blob/master/docs/systems/system.md This snippet demonstrates loading data from a VASP POSCAR file, allowing `dpdata` to infer the format from the file extension. It creates a `dpdata.System` object, which encapsulates the loaded atomic structure. This method simplifies loading by reducing the need for explicit format specification. ```python d_poscar = dpdata.System("my.POSCAR") ``` -------------------------------- ### VASP Execution Environment and Core Configuration Source: https://github.com/deepmodeling/dpdata/blob/master/tests/poscars/OUTCAR.h2o.md This snippet details the VASP version, build information, execution environment (LinuxIFC), and core distribution settings. It shows the VASP build date, the operating system, and how k-points and bands are distributed across available cores for the calculation. ```VASP Log vasp.5.4.4.18Apr17-6-g9f103f2a35 (build Sep 18 2018 16:57:57) complex executed on LinuxIFC date 2019.04.10 04:05:36 running on 1 total cores distrk: each k-point on 1 cores, 1 groups distr: one band on NCORES_PER_BAND= 1 cores, 1 groups ``` -------------------------------- ### Example Molecular Dynamics Trajectory Dump Source: https://github.com/deepmodeling/dpdata/blob/master/tests/openmx/Methane.md This snippet illustrates the typical structure of a molecular dynamics trajectory dump file. Each block represents a single timestep, starting with global simulation parameters like time, energy, temperature, and cell vectors. Subsequent lines within the block provide per-atom data, including atomic symbol, coordinates (x, y, z), velocities (vx, vy, vz), forces (fx, fy, fz), partial charge, and other flags. The number '5' after each atom block indicates the total number of atoms in the system for that timestep. ```Simulation Data Format time= 103.000 (fs) Energy= -8.21177 (Hartree) Temperature= 558.667 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.01877 0.00846 -0.00758 -0.00108 -0.02717 0.00086 1336.02864 1030.73498 899.11168 0.15565 0.00000 0.00000 0.00000 1 H -0.80318 -0.09158 -0.79654 0.01323 0.00543 0.00546 309.21546 1590.87085 -742.73209 -0.04445 0.00000 0.00000 0.00000 1 H 0.68527 0.81092 -0.16433 0.00073 0.01259 -0.00800 -1118.30133 -661.08736 620.63764 -0.01512 0.00000 0.00000 0.00000 1 H -0.54282 0.19732 0.95337 0.00781 -0.00820 -0.00522 -2547.97092 1026.06066 198.20116 -0.03943 0.00000 0.00000 0.00000 1 H 0.63180 -0.93264 -0.01880 -0.02065 0.01735 0.00687 1690.20472 -2962.38045 -1066.36381 -0.05665 0.00000 0.00000 0.00000 1 5 time= 104.000 (fs) Energy= -8.20935 (Hartree) Temperature= 459.090 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C -0.00485 0.01637 0.00167 -0.01675 -0.04564 -0.00151 1392.81189 791.03587 924.84459 0.15469 0.00000 0.00000 0.00000 1 H -0.79297 -0.07428 -0.80106 0.01698 0.00489 0.00925 1021.29022 1730.61483 -451.68696 -0.04774 0.00000 0.00000 0.00000 1 H 0.67505 0.80923 -0.16184 0.01202 0.02308 -0.00836 -1021.53045 -168.60710 249.43886 0.00293 0.00000 0.00000 0.00000 1 H -0.56385 0.20227 0.95300 0.01233 -0.00909 -0.00789 -2102.40735 495.19007 -36.58190 -0.04340 0.00000 0.00000 0.00000 1 H 0.63915 -0.95499 -0.02586 -0.02457 0.02679 0.00849 734.30656 -2235.61781 -705.58781 -0.06647 0.00000 0.00000 0.00000 1 5 time= 105.000 (fs) Energy= -8.20868 (Hartree) Temperature= 327.428 (Given Temp.= 300.000) Cell_Vectors= 10.00000 0.00000 0.00000 0.00000 10.00000 0.00000 0.00000 0.00000 10.00000 C 0.00758 0.01911 0.01083 -0.02481 -0.05046 -0.00436 1243.09847 273.96543 915.74544 0.15232 0.00000 0.00000 0.00000 1 H -0.77520 -0.05785 -0.80105 0.01666 0.00369 0.00957 1776.64376 1642.66327 0.84553 -0.04640 0.00000 0.00000 0.00000 1 H 0.66995 0.81562 -0.16349 0.01677 0.02575 -0.00689 -510.20365 638.92547 -164.69164 0.00793 0.00000 0.00000 0.00000 1 H -0.57961 0.19946 0.94872 0.01484 -0.00877 -0.00784 -1575.93375 -280.95959 -427.60335 -0.04489 0.00000 0.00000 0.00000 1 H 0.63359 -0.96745 -0.02876 -0.02350 0.02977 0.00947 -555.85297 -1245.44292 -290.35031 -0.06896 0.00000 0.00000 0.00000 1 5 t ```