### Download Example Data using wget Source: https://bohrium-doc.dp.tech/docs/bestpractice/Docker This command downloads a zip file containing example input data for DeePMD-kit from a specified URL. Ensure you have `wget` installed and network connectivity. ```bash wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_DeePMD-kit_example.zip ``` -------------------------------- ### Install Latest Lebesgue Utility (LBG CLI) - Python Source: https://bohrium-doc.dp.tech/docs/commandline/about Installs the latest version of the Lebesgue Utility (LBG CLI) using pip. If the default installation is slow, it provides an alternative command using a domestic mirror source. ```bash pip install lbg ``` ```bash pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ lbg ``` -------------------------------- ### Download VASP Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/VASP This command downloads the VASP example input files from a specified URL. Ensure you have `wget` installed and an active internet connection. The downloaded file is a zip archive. ```shell wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_VASP_example.zip ``` -------------------------------- ### Download and Unzip CALYPSO Example Files (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command downloads a zip archive containing example input files for CALYPSO structure prediction tasks on Bohrium. After downloading, it unzips the archive to prepare the example data. Ensure you are in the target directory (e.g., /personal) before executing. ```shell cd /personal wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/CALYPSO-Bohrium-example.zip unzip CALYPSO-Bohrium-example.zip cd /personal/CALYPSO-Bohrium-example ``` -------------------------------- ### Apt-get Software Installation with Chinese Mirror Source: https://bohrium-doc.dp.tech/docs/software/OtherSoftwares Shows how to update the package list and install software using apt-get with a Chinese mirror source. This ensures faster and more reliable package installations for Debian-based systems within the container. ```dockerfile RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list RUN apt-get update RUN apt-get install -y some-package ``` -------------------------------- ### Unzip Example Data using unzip Source: https://bohrium-doc.dp.tech/docs/bestpractice/Docker This command unzips the downloaded example data file, extracting the necessary input files and directories for the DeePMD-kit example. Ensure `unzip` is installed. ```bash unzip Bohrium_DeePMD-kit_example.zip ``` -------------------------------- ### Yum Software Installation with Chinese Mirror Source: https://bohrium-doc.dp.tech/docs/software/OtherSoftwares Illustrates installing software using yum with a Chinese mirror source. This method is applicable for Red Hat-based systems and helps in achieving faster and more stable package installations. ```dockerfile RUN yum install -y some-package ``` -------------------------------- ### Configure LBG CLI Account - Shell Source: https://bohrium-doc.dp.tech/docs/commandline/about This command initiates the configuration process for the LBG CLI, prompting the user to enter their account email and password. This information is stored in `~/.lbg/lbg_cli_context.json`. ```bash lbg config account ``` -------------------------------- ### Download Example Data Source: https://bohrium-doc.dp.tech/docs/software/QuantumEspresso Downloads and unzips example input files for Quantum Espresso from a provided URL. This step is essential for preparing the necessary input data for the simulation. ```bash wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_Quantum-Espresso_example.zip unzip Bohrium_Quantum-Espresso_example.zip cd Bohrium_Quantum-Espresso_example ``` -------------------------------- ### Conda Package Installation with Chinese Mirror Source: https://bohrium-doc.dp.tech/docs/software/OtherSoftwares Provides an example of installing packages using conda with a Chinese mirror source. This is beneficial for users who rely on the Anaconda distribution and need to accelerate their package downloads. ```dockerfile RUN conda install -y some-package ``` -------------------------------- ### Download CP2K Example Data (Bash) Source: https://bohrium-doc.dp.tech/docs/software/CP2K Downloads and unzips example input files for CP2K from a specified URL. This is the first step in preparing your simulation environment. ```bash wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_CP2K_example.zip unzip Bohrium_CP2K_example.zip cd Bohrium_CP2K_example ``` -------------------------------- ### Download GROMACS Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/GROMACS This command downloads a zip file containing GROMACS input files from a specified URL. It requires `wget` to be installed. The downloaded file is a zip archive. ```shell wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_GROMACS_example.zip ``` -------------------------------- ### SSH Login Component Installation Source: https://bohrium-doc.dp.tech/docs/software/OtherSoftwares Lists the essential components required for SSH login within a custom image. Installing these ensures the image can be used on a management node for tasks requiring remote access. The example shows the package names. ```dockerfile # openssh-server # supervisor # net-tools ``` -------------------------------- ### Unzip VASP Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/VASP This command extracts the contents of the downloaded VASP example data zip file. It requires the `unzip` utility to be installed on your system. The files will be extracted into the current directory. ```shell unzip Bohrium_VASP_example.zip ``` -------------------------------- ### Download DP-GEN Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN This command downloads a zip archive containing example input files for a DP-GEN methane simulation. This is a necessary step to prepare the necessary input data for running the DP-GEN task on Bohrium. It requires an active internet connection to fetch the file from the provided URL. ```shell wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_DP-GEN_run_example.zip ``` -------------------------------- ### Pip Package Installation with Chinese Mirror Source: https://bohrium-doc.dp.tech/docs/software/OtherSoftwares Demonstrates how to install Python packages using pip with a Chinese mirror source to improve download speeds and reliability. This is crucial for avoiding download failures when accessing international package repositories. ```dockerfile RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package ``` -------------------------------- ### Copy VASP Example Input File (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command copies a specific example input file for Variable Composition Structure (VSC) prediction using VASP as the first-principles calculator. This file will be used to overwrite the default input.dat in the vasp_example directory. ```shell cp /personal/CALYPSO-Bohrium-example/templates/input.dat.example/pso/input.dat.vsc /personal/CALYPSO-Bohrium-example/templates/vasp_example/input.dat ``` -------------------------------- ### Download and run Bohrium CLI installer for Windows using curl Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This command downloads the Bohrium CLI installer batch file for Windows using curl and then executes it. It requires curl to be available in your command prompt's PATH. The installer will set up the CLI. ```bash curl -o install_bohr_windows_wget.bat https://dp-public.oss-cn-beijing.aliyuncs.com/bohrctl/1.0.0/install_bohr_windows_curl.bat && install_bohr_windows_wget.bat ``` -------------------------------- ### Enable LBG CLI Command Auto-completion - BASH Source: https://bohrium-doc.dp.tech/docs/commandline/about Enables command auto-completion for the LBG CLI in BASH. Users need to add a specific command to their `~/.bashrc` file and then source the file to activate the feature. ```bash eval "$(register-python-argcomplete lbg)" ``` -------------------------------- ### Navigate to VASP Example Directory (Shell) Source: https://bohrium-doc.dp.tech/docs/software/VASP This command changes the current directory to the 'Bohrium_VASP_example' folder, which contains the extracted VASP input files. This is a necessary step before proceeding with job configuration. ```shell cd Bohrium_VASP_example ``` -------------------------------- ### Download LAMMPS Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/LAMMPS Downloads and unzips example input files for LAMMPS simulations from a specified URL. This is the first step in preparing your simulation environment. ```shell wget https://bohrium-example.oss-cn-zhangjiakou.aliyuncs.com/Bohrium_LAMMPS_example.zip unzip Bohrium_LAMMPS_example.zip cd Bohrium_LAMMPS_example ``` -------------------------------- ### Unzip DP-GEN Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN This command extracts the contents of the downloaded DP-GEN example data zip file. After downloading, this step is essential to unpack the input files and configuration necessary for running the DP-GEN task. It operates on the zip file downloaded in the previous step. ```shell unzip Bohrium_DP-GEN_run_example.zip ``` -------------------------------- ### Navigate to GROMACS Example Directory (Shell) Source: https://bohrium-doc.dp.tech/docs/software/GROMACS This command changes the current directory to the extracted GROMACS example folder. This is necessary to access the input files for running the simulation. ```shell cd Bohrium_GROMACS_example ``` -------------------------------- ### Upgrade Lebesgue Utility (LBG CLI) - Python Source: https://bohrium-doc.dp.tech/docs/commandline/about Upgrades the Lebesgue Utility (LBG CLI) to the latest version using pip. It also includes an option to use a domestic mirror source if the upgrade process is slow. ```bash pip install -U lbg ``` ```bash pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -U lbg ``` -------------------------------- ### Display DP-GEN Example Input File Structure (Shell) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN This command displays the directory structure of the DP-GEN example input files, showing key files like POSCAR, INCAR, POTCAR, and configuration JSON files. Understanding this structure is vital for configuring and running DP-GEN tasks. The command operates on the current directory after unzipping the example data. ```shell tree . -L 2 ``` -------------------------------- ### DP-GEN Simplify Input File Structure Example (Tree Command) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_simplify Illustrates the directory and file structure required for DP-GEN simplify, showing data organization for initial configurations and VASP input files. This structure is crucial for the tool to correctly parse and utilize the provided data. ```shell (base) ➜ example tree . ├── data │ ├── init.000 │ │ ├── set.000 │ │ │ ├── box.npy │ │ │ ├── coord.npy │ │ │ ├── energy.npy │ │ │ ├── force.npy │ │ │ └── virial.npy │ │ ├── type_map.raw │ │ └── type.raw │ ├── sys.000 │ │ ├── set.000 │ │ │ ├── box.npy │ │ │ ├── coord.npy │ │ │ ├── energy.npy │ │ │ ├── force.npy │ │ │ └── virial.npy │ │ ├── type_map.raw │ │ └── type.raw │ └── sys.001 │ ├── set.000 │ │ ├── box.npy │ │ ├── coord.npy │ │ ├── energy.npy │ │ ├── force.npy │ │ └── virial.npy │ ├── type_map.raw │ └── type.raw ├── simplify_example │ ├── INCAR │ ├── machine_test_simplify.json │ └── simplify.json └── vasp_inputs ├── POTCAR_C ├── POTCAR_H ├── POTCAR_I ├── POTCAR_N └── POTCAR_Pb_d ``` -------------------------------- ### DP-GEN Simplify Configuration Example (simplify.json) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_simplify Provides a detailed JSON configuration file for DP-GEN simplify, specifying parameters for data handling, model training, and force field calculations. This file controls the behavior and settings of the DP-GEN simplify process. ```json { "type_map": ["I","Pb","C","N","H"], "mass_map": [126.90447, 207.2, 12.0108, 14.0067, 1.00795], "pick_data": "../data", "init_data_prefix": "", "init_data_sys": [], "sys_configs": [null], "sys_batch_size": [1,1,1], "_comment": " 00.train ", "numb_models": 4, "model_devi_activation_func":[["tanh","tanh"],["tanh","gelu"],["gelu","gelu"],["gelu","tanh"]], "train_param": "input.json", "default_training_param": { "model": { "type_map": ["I","Pb","C","N","H"], "descriptor": { "type": "se_e2_a", "sel": [ 20, 8, 8, 8, 48 ], "rcut_smth": 2.00, "rcut": 6.00, "neuron": [25, 50, 100], "resnet_dt": false, "type_one_side": true, "trainable": true, "axis_neuron": 12, "seed": 0 }, "fitting_net": { "neuron": [240, 240, 240], "resnet_dt": true, "trainable": [true, true, true, true], "seed": 0 } }, "loss": { "start_pref_e": 0.02, "limit_pref_e": 2, "start_pref_f": 1000, "limit_pref_f": 2, "start_pref_v": 0.01, "limit_pref_v": 1 }, "learning_rate": { "type": "exp", "start_lr": 0.001, "decay_steps": 100000, "decay_rate": 0.95 }, "training": { "set_prefix": "set", "stop_batch": 1000000, "batch_size": "auto", "seed": 1, "_comment": "frequencies counted in batch", "disp_file": "lcurve.out", "disp_freq": 100000, "numb_test": 4, "save_freq": 100000, "save_ckpt": "model.ckpt", "disp_training": true, "time_training": true, "profiling": false, "profiling_file": "timeline.json" } }, "_comment": "02.fp", "fp_style": "vasp", "fp_skip_bad_box": "length_ratio:5;height_ratio:5", "fp_accurate_threshold": 0.95, "fp_accurate_soft_threshold": 0.90, "shuffle_poscar": false, "fp_task_max": 20, "fp_task_min": 5, "ratio_failed": 0.30, "fp_pp_path": "../vasp_inputs/", "fp_pp_files": ["POTCAR_I","POTCAR_Pb_d","POTCAR_C","POTCAR_N","POTCAR_H"], "fp_incar": "INCAR", "use_clusters": false, "labeled": false, "init_pick_number":20, "iter_pick_number":20, "model_devi_f_trust_lo":0.30, "model_devi_f_trust_hi":100.00, "cvasp": false } ``` -------------------------------- ### Enable LBG CLI Command Auto-completion - ZSH Source: https://bohrium-doc.dp.tech/docs/commandline/about Configures command auto-completion for the LBG CLI in ZSH. This involves adding specific commands to the `~/.zshrc` file and sourcing the file to apply the changes. ```bash autoload -U bashcompinit bashcompinit eval "$(register-python-argcomplete lbg)" ``` -------------------------------- ### Unzip GROMACS Example Data (Shell) Source: https://bohrium-doc.dp.tech/docs/software/GROMACS This command extracts the contents of the downloaded GROMACS example zip file. It requires the `unzip` utility. The extracted files will be placed in the current directory. ```shell unzip Bohrium_GROMACS_example.zip ``` -------------------------------- ### Set LBG CLI Version Check Level - Shell Source: https://bohrium-doc.dp.tech/docs/commandline/about Configures the version check level for the LBG CLI. Users can set it to major, minor, patch, or ignore, controlling the granularity of update notifications. ```bash lbg config version ``` -------------------------------- ### Verify DP-GEN Installation and Dependencies (Shell) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN This command checks if DP-GEN is installed correctly and lists its dependencies along with their versions. It's a crucial first step to ensure the environment is set up for running DP-GEN tasks. No specific inputs are required, and the output displays version information and dependency details. ```shell dpgen -h ``` -------------------------------- ### Uninstall Lebesgue Utility (LBG CLI) - Python Source: https://bohrium-doc.dp.tech/docs/commandline/about This command uninstalls previous versions of the Lebesgue Utility (LBG Utility) and LebesgueCommand Line Interface (LBG CLI) using pip. It ensures a clean slate before installing a new version. ```bash pip uninstall -y lbg LebesgueUtility ``` -------------------------------- ### Download Bohrium CLI for Linux using curl Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This script downloads and installs the Bohrium CLI for Linux systems. It requires curl to be installed on your system. The script is executed directly from the provided URL. ```bash /bin/bash -c "$(curl -fsSL https://dp-public.oss-cn-beijing.aliyuncs.com/bohrctl/1.0.0/install_bohr_linux_curl.sh)" ``` -------------------------------- ### Download Bohrium CLI for macOS using curl Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This script downloads and installs the Bohrium CLI for macOS systems. It requires curl to be installed on your system. The script is executed directly from the provided URL. ```bash /bin/bash -c "$(curl -fsSL https://dp-public.oss-cn-beijing.aliyuncs.com/bohrctl/1.0.0/install_bohr_mac_curl.sh)" ``` -------------------------------- ### Set LBG CLI Default Output Format - Shell Source: https://bohrium-doc.dp.tech/docs/commandline/about Sets the default output format for the LBG CLI. Supported formats include table, json, csv, and yaml. This command allows overriding the default and specifying a preferred format for command outputs. ```bash lbg config format ``` -------------------------------- ### Configure ACCESS_KEY for BASH shell Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This command appends the ACCESS_KEY environment variable to your BASH configuration file (~/.bashrc) and then sources the file to apply the changes immediately. Replace 'XXXX' with your actual Access Key. ```bash echo 'export ACCESS_KEY=XXXX' >> ~/.bashrc source ~/.bashrc ``` -------------------------------- ### Configure ACCESS_KEY for ZSH shell Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This command appends the ACCESS_KEY environment variable to your ZSH configuration file (~/.zshrc) and then sources the file to apply the changes immediately. Replace 'XXXX' with your actual Access Key. ```bash echo 'export ACCESS_KEY=XXXX' >> ~/.zshrc source ~/.zshrc ``` -------------------------------- ### Prepare Input Files for DP-Dispatcher (Bash) Source: https://bohrium-doc.dp.tech/docs/bestpractice/DP-Dispatcher This bash script creates a directory structure and copies an example file to prepare for DP-Dispatcher tasks. It ensures the necessary files and directories are in place before running the Python submission script. ```bash mkdir -p dp_dispatcher/test && cd dp_dispatcher echo "hello world" > example.txt for i in {1..4} do mkdir test/dir${i} cp example.txt test/dir${i}/ done ``` -------------------------------- ### Change Directory using cd Source: https://bohrium-doc.dp.tech/docs/bestpractice/Docker This command changes the current working directory to the extracted example data folder. This is a standard navigation command in shell environments. ```bash cd Bohrium_DeePMD-kit_example ``` -------------------------------- ### Configure ACCESS_KEY for Windows CMD Source: https://bohrium-doc.dp.tech/docs/bohrctl/install This command sets the ACCESS_KEY environment variable for the current Windows Command Prompt session and makes it persistent across sessions. Replace 'XXXX' with your actual Access Key. Note that changes made with setx require a new CMD window to take effect. ```cmd setx ACCESS_KEY XXXX ``` -------------------------------- ### Submit a New Job (Bohrium CLI) Source: https://bohrium-doc.dp.tech/docs/bohrctl/job This command submits a new job to the Bohrium platform. It requires essential parameters like the image address and machine type, and supports various optional configurations such as command, config file, input/output directories, job group ID, and resource limits. A JSON configuration file can also be provided for detailed job setup. ```json { "job_name": "DeePMD-kit test", "command": "cd se_e2_a && dp train input.json > tmp_log 2>&1 && dp freeze -o graph.pb", "log_file": "se_e2_a/tmp_log", "backward_files": ["se_e2_a/lcurve.out","se_e2_a/graph.pb"], "project_id": 0000, "machine_type": "c32_m64_cpu", "image_address": "registry.dp.tech/dptech/lammps:29Sep2021", "input_directory": "./Bohrium_LAMMPS_example", "job_group_id": 0000, "result_path": "/personal", "dataset_path": ["/bohr/test-rihu/v1"], "max_reschedule_times": 2, "max_run_time": 12, "nnode": 1 } ``` ```bash bohr job submit [flags] Flags: -c, --command string command -i, --config_file string config file -h, --help help for submit -m, --image_address string image name -p, --input_directory string input directory path (default "./") -g, --job_group_id int job group id -n, --job_name string job name -l, --log_file string log file -t, --machine_type string machine type --max_reschedule_times int max reschedule times --max_run_time int max run time(measured in minutes) --nnode int nnode (default 1) --project_id int project id -r, --result_path string result path Examples: $ bohr job submit -i job.json -p ./input # 使用job.json下的文件并用input目录下的文件当作输入 ``` -------------------------------- ### Visualize Structure Prediction Evolution (Python) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command runs the 'cak3.py' script with the '--plotevo' flag to visualize the evolution process of structure prediction. It generates an 'evo.png' file that can be directly viewed in a WebShell. ```python cak3.py --plotevo ``` -------------------------------- ### View Job Submission Success Message Source: https://bohrium-doc.dp.tech/docs/software/QuantumEspresso Example output indicating a successful job submission via the Bohrium CLI. It provides the Job ID and Job Group ID for tracking the job's progress. ```text Submit job succeed. JobId: JobGroupId: ``` -------------------------------- ### Edit Bohrium Configuration File (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This demonstrates how to edit the 'machine.json' file using the 'vi' editor in a command-line interface. This file configures dpdispatcher for CALYPSO-SaaS tasks, specifying parameters like batch type, context type, local root directory, and remote profile details for job submission and authentication. ```shell vi machine.json ``` -------------------------------- ### Submit Container Job using Bohrium CLI Source: https://bohrium-doc.dp.tech/docs/bestpractice/Docker This command submits a container job to Bohrium using the job configuration file (`job.json`) and specifies the current directory (`./`) as the project path. Ensure the Bohrium CLI is installed and configured. ```bash bohr job submit -i job.json -p ./ ``` -------------------------------- ### List Nodes with Bohrium CLI Source: https://bohrium-doc.dp.tech/docs/bohrctl/node Lists nodes with various filtering and output format options. Supports CSV, JSON, and YAML output. Filters include showing paused, pending, started, or waiting nodes, as well as only displaying node IDs and names. ```bash bohr node list bohr node list --json -p bohr node list -q ``` -------------------------------- ### Set Maximum Task Run Time in job.json Source: https://bohrium-doc.dp.tech/docs/faq/UtilityFaq This JSON example demonstrates how to set a maximum runtime for a task in Bohrium CLI by adding the 'max_run_time' field to a JSON configuration file. The time is specified in minutes, and the task will be terminated if it exceeds this limit. ```json { "max_run_time":2 } ``` -------------------------------- ### Job Group ID in JSON Configuration Source: https://bohrium-doc.dp.tech/docs/bohrctl/job_group Example of how to specify a job group ID within a JSON configuration file for Bohrium CLI task submission. ```json { "job_group_id":0000 } ``` -------------------------------- ### Submit CALYPSO Task (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command submits the CALYPSO task to the Bohrium cloud platform using the 'run.sh' script. The output and errors are redirected to an 'out' file for logging. Alternatively, 'nohup run_calypso > out 2>&1 &' can be used for background execution. ```shell bash run.sh ``` -------------------------------- ### Configure Automatic Task Retries in job.json Source: https://bohrium-doc.dp.tech/docs/faq/UtilityFaq This JSON example shows how to configure Bohrium CLI to automatically retry tasks that are abnormally interrupted. By adding 'max_reschedule_times' to the job.json file, you can specify the number of times the system should attempt to recompute the entire task. ```json { "max_reschedule_times":2 } ``` -------------------------------- ### Specify Job Group ID in job.json Source: https://bohrium-doc.dp.tech/docs/faq/UtilityFaq This JSON example shows how to specify a job group ID within a job.json file when submitting tasks to a specific group using Bohrium CLI. The job_group_id should be obtained from 'bohr job_group create'. ```json { "job_group_id":0000 } ``` -------------------------------- ### Check Job Status (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command displays the status of submitted jobs on the Bohrium platform. It lists the job name, PID, and work path, allowing users to monitor the progress of their CALYPSO calculations. ```shell showjob ``` -------------------------------- ### Configure DP-GEN model_devi Jobs with Custom LAMMPS Template Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_lmp_template This JSON snippet shows how to configure the 'model_devi_jobs' section in 'param.json' to use a custom LAMMPS input file ('lmp/input.lammps') as a template. It also includes parameters for plumed and defines variables that will be revised in the template. ```json "model_devi_jobs": [ { "sys_idx": [0],"traj_freq": 10,"_idx": "00", "template":{ "lmp": "lmp/input.lammps", "plm": "lmp/input.plumed" }, "rev_mat":{ "lmp": {"V_NSTEPS": [20000], "V_TEMP": [300], "V_PRES": [1]}, "plm": {"V_TEMP": [300], "V_STRIDE": [10]} } }, ``` -------------------------------- ### Visualize Variable Composition Phase Diagram (Python) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command uses 'cak3.py' with the '--plotch' option to generate a convex hull diagram for variable composition structure predictions. This requires pre-defined energies for individual elements in 'input.dat'. The output includes 'convexhull.csv' and 'convexhull.png'. ```python cak3.py --plotch ``` -------------------------------- ### Modify LAMMPS Dump Command for DP-GEN Compatibility Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_lmp_template This code snippet demonstrates the necessary modification to the LAMMPS input script. The 'dump' line needs to be changed to 'dump dpgen_dump' to allow DP-GEN to correctly manage trajectory frequency. ```lammps dump dpgen_dump #dump 2 all custom 100 vel.xyz id type vx vy vz ``` -------------------------------- ### Clean Calculation Directory (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This script 'del.sh' is used to clean up unnecessary files in the calculation directory before re-running a task. It removes various log, output, and temporary files generated during the CALYPSO and VASP calculations. Exercise caution as it permanently deletes files. ```shell bash del.sh ``` -------------------------------- ### Analyze CALYPSO Prediction Results (Python) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command executes the 'cak3.py' script to analyze CALYPSO prediction results. It extracts information for the top 50 lowest enthalpy structures and saves them to 'Analysis_Output.dat'. Options include specifying VASP output format (--vasp), outputting all structures (-a), and setting symmetry tolerance (-m). ```python cak3.py cak3.py --vasp -a -m "0.1 0.3 0.5" ``` -------------------------------- ### Resume Interrupted CALYPSO Task (Bash) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This snippet shows how to resume an interrupted CALYPSO task. It involves modifying the input.dat file to enable pickup and specify the restart step. The previous output files (OUTCAR, CONTCAR, POSCAR) need to be copied and renamed, and a 'restart' file must be created before running the script. ```bash bash run.sh # or nohup run_calypso >> out 2>&1 & ``` ```bash # Example for copying and renaming output files # Assuming restart from generation n cp ./data/OUTCAR_n OUTCAR cp ./data/CONTCAR_n CONTCAR cp ./data/POSCAR_n POSCAR touch restart bash run.sh ``` -------------------------------- ### Aborting CALYPSO Task (Shell) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This outlines the process for aborting a CALYPSO task. It involves killing the CALYPSO process on the control node using its PID, and then manually terminating the tasks on the compute nodes. Bohrium CLI commands or the web interface can be used to manage tasks by group_id or job_id. ```shell # On the control node: showjob # to find the PID kill # On compute nodes (or using Bohrium CLI): bohr abort bohr delete ``` -------------------------------- ### Checking CALYPSO Log for Current Generation (Bash) Source: https://bohrium-doc.dp.tech/docs/software/CALYPSO This command demonstrates how to check the CALYPSO log file to determine the current generation number for resuming a task. The log file, typically named 'out' when running via 'run.sh', can be inspected to count generated structures or find the 'step=n' indicator. ```bash cat out | grep "step=" # or manually inspect the 'out' file for the number of generated structures ``` -------------------------------- ### Create Bohrium Project (CLI) Source: https://bohrium-doc.dp.tech/docs/bohrctl/project Creates a new Bohrium project. Optional parameters include the project name, month cost limit, and total cost limit. If no name is provided, it defaults to 'default'. ```bash bohr project create --name bohr project create -n bohr project create --month_cost_limit bohr project create -m bohr project create --total_cost_limit bohr project create -t ``` -------------------------------- ### Submit Quantum Espresso Job with Bohrium CLI Source: https://bohrium-doc.dp.tech/docs/software/QuantumEspresso Submits a Quantum Espresso job to the Bohrium platform using the Bohrium CLI. It requires a configuration file (`job.json`) and the directory containing input files. ```bash bohr job submit -i job.json -p ./ ``` -------------------------------- ### DP-GEN Task Parameters (param.json) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_init This JSON object defines the parameters for a DP-GEN computational task. It includes settings for calculation stages, chemical elements, cell type, lattice constant, potential files, INCAR files for relaxation and molecular dynamics, perturbation parameters, and mapping types. Paths for input files need to be adjusted by the user. ```json { "stages" : [1,2,3,4], "elements": ["Li","Si"], "cell_type": "diamond", "latt": 10.0, "super_cell": [1, 1, 1], "potcars": ["..../POTCAR_Li","..../POTCAR_Si"], "relax_incar": "./INCAR_rlx", "md_incar" : "./INCAR_md", "skip_relax": false, "scale": [0.990,1.00,1.01], "pert_numb": 10, "pert_box": 0.03, "pert_atom": 0.01, "md_nstep" : 10, "coll_ndata": 5000, "type_map" : ["Li","Si"], "_comment": "that's all" } ``` -------------------------------- ### INCAR for Molecular Dynamics (init_bulk) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_init This INCAR file configures parameters for molecular dynamics (MD) simulations, essential for collecting dynamic data in bulk system generation. It includes settings for electronic relaxation, ionic relaxation, and specific MD parameters like temperature and time steps. ```text INCAR_md #Parameters SYSTEM = dpgen_md PREC = A ISTART = 0 ICHARG = 2 #Electronic Relaxation ENCUT = 650 NELM = 100 NELMIN = 6 NELMDL = -5 EDIFF = 1e-06 LREAL = False ALGO = Fast # or normal #Ionic relaxation IBRION = 0 ISIF = 2 #EDIFFG = -0.01 in ISYM = 0 NSW = 10 ISMEAR = 0 SIGMA = 0.1 # MD related SMASS = 0 POTIM = 2 TEBEG = 100 TEEND = 100 NBLOCK = 1 KBLOCK = 100 # Write flags LWAVE = False LCHARG = False #parallel related #KPAR = 4 #NPAR = 1 KSPACING = 0.16 KGAMMA = False PSTRESS = 0.0 NCORE = 4 ``` -------------------------------- ### 使用 Docker CLI 拉取 Bohrium 镜像 Source: https://bohrium-doc.dp.tech/docs/userguide/image 此代码段展示了如何使用 Docker 命令行界面登录到 Bohrium 的镜像仓库并拉取公共镜像。您需要替换 `xxx@dp.tech` 为您的 Bohrium 用户名,并提供您的密码。拉取的镜像地址格式为 `registry.bohrium.dp.tech/dptech/ubuntu:22.04-py3.10-intel2022`。 ```shell docker login registry.bohrium.dp.tech Username: xxx@dp.tech Password: Login Succeeded docker pull registry.bohrium.dp.tech/dptech/ubuntu:22.04-py3.10-intel2022 ``` -------------------------------- ### DP-GEN Machine Configuration (machine.json) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_init This JSON object configures the computational environment for DP-GEN. It specifies API versions, DeepMD versions, and details for different execution blocks ('train', 'model_devi', 'fp'). Each block defines commands, machine settings (batch type, context type, local root), remote profiles (credentials, input data for job submission), and resource allocation (nodes, CPUs, GPUs, queue names). Container image addresses are crucial for specifying the software environment. ```json { "api_version": "1.0", "deepmd_version": "2.1.0", "train" :[ { "command": "dp", "machine": { "batch_type": "Lebesgue", "context_type": "LebesgueContext", "local_root" : "./", "remote_profile":{ "email": "", "password": "", "program_id": , "keep_backup":true, "input_data":{ "job_type": "indicate", "log_file": "00*/train.log", "grouped":true, "job_name": "dpgen_train_job", "disk_size": 100, "scass_type":"c4_m15_1 * NVIDIA T4", "checkpoint_files":["00*/checkpoint","00*/model.ckpt*"], "checkpoint_time":30, "platform": "ali", "job_type": "container", "image_address": "registry.dp.tech/dptech/deepmd-kit:2.1.5-cuda11.6" , "on_demand":0 } } }, "resources": { "number_node": 1, "cpu_per_node": 4, "gpu_per_node": 1, "queue_name": "T4_4_15", "group_size": 1 } } ], "model_devi": [{ "command": "lmp -i input.lammps -v restart 0", "machine": { "batch_type": "Lebesgue", "context_type": "LebesgueContext", "local_root" : "./", "remote_profile":{ "email": "", "password": "", "program_id": , "keep_backup":true, "input_data":{ "job_type": "indicate", "log_file": "*/model_devi.log", "grouped":true, "job_name": "dpgen_model_devi_job", "disk_size": 200, "scass_type":"c4_m15_1 * NVIDIA T4", "platform": "ali", "job_type": "container", "image_address": "registry.dp.tech/dptech/deepmd-kit:2.1.5-cuda11.6" , "on_demand":0 } } }, "resources": { "number_node": 1, "cpu_per_node": 4, "gpu_per_node": 1, "queue_name": "T4_4_15", "group_size": 50 } } ], "fp": [{ "command": "limit -m unlimited; ulimit -s unlimited; mpirun vasp_std", "machine": { "batch_type": "Lebesgue", "context_type": "LebesgueContext", "local_root" : "./", "remote_profile":{ "email": "", "password": "", "program_id": , "input_data":{ "api_version":2, "job_type": "indicate", "log_file": "task*/fp.log", "grouped":true, "job_name": "dpgen_fp_job", "disk_size": 100, "scass_type":"c16_m32_cpu", "platform": "ali", "job_type": "container", "image_address":"# 此处填写VASP镜像名", "on_demand":0 } } }, "resources": { "number_node": 1, "cpu_per_node": 16, "gpu_per_node": 0, "queue_name": "CPU", "group_size": 50, "source_list": ["/opt/intel/oneapi/setvars.sh"] } } ] } ``` -------------------------------- ### INCAR for Atomic Relaxation (init_bulk) Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_init This INCAR file specifies parameters for ionic relaxation calculations, used in the initial stages of generating bulk system data. It defines electronic and ionic relaxation settings, as well as write flags and parallel execution options. ```text INCAR_rlx #Parameters SYSTEM = dpgen_rlx PREC = A ISTART = 0 ICHARG = 2 #Electronic Relaxation ENCUT = 650 NELM = 100 NELMIN = 6 NELMDL = -5 EDIFF = 1e-06 LREAL = .False. ALGO = Fast # or Normal #Ionic Relaxation IBRION = 2 POTIM = 0.2 ISIF = 3 EDIFFG = -0.01 ISYM = 0 NSW = 100 ISMEAR = 0 SIGMA = 0.1 # Write flags LWAVE = .False. LCHARG = .False. KSPACING = 0.16 KGAMMA = .False. #KPAR = 1 #NPAR = 1 PSTRESS = 0.0 NCORE = 4 ``` -------------------------------- ### DP-GEN POSCAR Initialization Parameters Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_init These parameters can be added to param.json to specify the use of a POSCAR file for the initialization step in DP-GEN. 'from_poscar' should be set to true, and 'from_poscar_path' should contain the path to the POSCAR file. ```json "from_poscar": true, "from_poscar_path": "", ``` -------------------------------- ### Create Datasets with Bohrium CLI Source: https://bohrium-doc.dp.tech/docs/bohrctl/dataset Creates a new dataset. This command requires the dataset name, project ID, and either a local path or a dataset path. It supports resuming interrupted uploads. Optional parameters include a description and the local path for file uploads. ```bash bohr dataset create [-m ""] [-h] [-l ""] [-n ""] [-p ""] [-i ""] ``` -------------------------------- ### Download Job Group with Bohrium CLI Source: https://bohrium-doc.dp.tech/docs/commandline/job_group Downloads information for specified job groups. Allows specifying a download path and optionally creating parent directories if they do not exist. Requires job group IDs as arguments. ```bash $ lbg jobgroup download 123 654 # 下载ID 为123和654的任务组 ``` -------------------------------- ### Python Function to Revise LAMMPS Dump Frequency Source: https://bohrium-doc.dp.tech/docs/software/DP-GEN_lmp_template This Python function, `revise_lmp_input_dump`, is used by DP-GEN when employing a template. It finds the 'dump dpgen_dump' line in the LAMMPS input script and updates the trajectory frequency based on the `trj_freq` parameter provided by DP-GEN. ```python def revise_lmp_input_dump(lmp_lines, trj_freq): idx = find_only_one_key(lmp_lines, ['dump', 'dpgen_dump']) lmp_lines[idx] = "dump dpgen_dump all custom %d traj/*.lammpstrj id type x y z\n" % trj_freq return lmp_lines ``` -------------------------------- ### Configure CP2K Job (JSON) Source: https://bohrium-doc.dp.tech/docs/software/CP2K Defines the configuration for a CP2K job to be run on the Bohrium platform. It specifies job name, command, log file, project ID, platform, job type, machine type, and container image. Ensure 'project_id' is replaced with your actual project ID. ```json { "job_name": "CP2K_Si_opt", "command": "source /cp2k-7.1/tools/toolchain/install/setup && mpirun -n 16 --allow-run-as-root --oversubscribe cp2k.popt -i input.inp -o output.log", "log_file": "output.log", "backward_files": ["output.log"], "project_id": 0000, "platform": "ali", "job_type": "container", "machine_type": "c16_m32_cpu", "image_address": "registry.dp.tech/dptech/cp2k:7.1" } ``` -------------------------------- ### List Bohrium Projects (CLI) Source: https://bohrium-doc.dp.tech/docs/bohrctl/project Lists all Bohrium projects. Supports output in CSV, JSON, or YAML formats. The command can be exited by pressing Ctrl+C. ```bash bohr project list bohr project list --csv bohr project list --json bohr project list --yaml ``` -------------------------------- ### Create Node (lbg node create) Source: https://bohrium-doc.dp.tech/docs/commandline/node Creates a new node with specified image ID, storage type, and disk size. Requires node_id, image_id, scass_type, and disk_size. An optional name can be provided. ```shell lbg node create -i IMAGE_ID -s SCASS_TYPE -d DISK_SIZE lbg node create -n dpgen -s c4_m8_cpu -d 100 -i 501 ```