### Install abacustest from source Source: https://pypi.org/project/abacustest Clone the repository and install abacustest locally using pip. ```bash git clone https://github.com/pxlxingliang/abacus-test.git cd abacus-test pip install . ``` -------------------------------- ### Prepare ABACUS Input Files for Parameter Testing Source: https://pypi.org/project/abacustest Configure this to generate multiple ABACUS input files for parameter testing. Specify example templates, input parameter combinations, and k-point parameter combinations. Sub-folders will be created for mixed inputs. ```json { "prepare": { "example_template": ["example1", "example2"], "mix_input": {"ecutwfc": [50, 60, 70], "kspacing": [0.1, 0.12]}, "mix_kpt": [2, [3, 3, 3], [4, 4, 4, 1, 1, 1]] } } ``` -------------------------------- ### Install abacustest via pip Source: https://pypi.org/project/abacustest Use this command to install the abacustest package directly from PyPI. ```bash pip install abacustest ``` -------------------------------- ### Dispatcher Configuration for Remote Jobs Source: https://pypi.org/project/abacustest Example configuration for the 'dispatcher' key, used for submitting jobs to remote platforms like supercomputers. ```json "dispatcher": { "machine_dict": { "remote_root": "/home/username/work_path", "remote_profile": { "hostname": "xxx.xx.xxx.xxx", "username": "Username", "password": "password", "port": 22 } }, "resources_dict": { "number_node": 1, "cpu_per_node": 8, "gpu_per_node": 1, "queue_name": "Normal" } } ``` -------------------------------- ### Born Effective Charge Tensor Example Output Source: https://pypi.org/project/abacustest This is an example of the output format for the Born effective charge tensor, showing the charge response of lattice ions under an electric field. The rows and columns represent displacement and polarization directions, respectively. ```text Born effective charge tensor for: .:atom0_Ti: X Y Z X 7.2792 0.0023 -0.0046 Y 0.0000 7.2835 -0.0020 Z 0.0000 0.0021 7.2830 ``` -------------------------------- ### Uploading Local Packages with Configuration Source: https://pypi.org/project/abacustest Shows how to use the 'upload_packages' key in the configuration file to upload local Python packages to the remote platform. ```json { ... "upload_packages": ["my_package1","/home/user/my_package2"], ... } ``` -------------------------------- ### Download Pseudopotentials and Orbitals Source: https://pypi.org/project/abacustest Use this command to download recommended pseudopotentials and orbitals for a specific version. This creates version-specific directories for these files. ```bash abacustest model inputs --download-pporb apns-v1 ``` -------------------------------- ### Prepare ABACUS input files Source: https://pypi.org/project/abacustest Use the 'prepare' command with a JSON parameter file to generate ABACUS input files. The -s flag specifies the output directory. ```bash abacustest prepare -p param.json -s abacustest ``` -------------------------------- ### Prepare Band Structure Calculation Input Source: https://pypi.org/project/abacustest Use this command to automatically prepare input files for band structure calculations. It generates SCF and NSCF input files and a KPT.nscf file with a high symmetry k-path. Use '-h' for more parameters. ```bash abacustest model band prepare -j 000000 ``` -------------------------------- ### Prepare Vacancy Calculation with ABACUS Input Directory Source: https://pypi.org/project/abacustest Use this command to prepare input files for vacancy formation energy calculations when using a pre-prepared ABACUS input directory. Specify the input directory, number of vacancies, and simulation cell. ```bash abacustest model vacancy prepare -j 000000 -i 1 -s 1 1 1 ``` -------------------------------- ### Configure Data Collection Parameters Source: https://pypi.org/project/abacustest Prepare a param.json file to specify which key values to extract from job outputs. The 'PARAM' key holds a list of desired metrics, which can be predefined keys or custom-defined evaluations. ```json { "PARAM": ["natom","kpt","ibzk","nelec","nbands","force","stress", "scf_steps","total_time","force_time","stress_time","energy_per_atom","band_gap", {"SELF_DEFINED_NAME": "An eval string to get the value"}] } ``` -------------------------------- ### Converting ABACUS to QE Input Files with abacustest Source: https://pypi.org/project/abacustest Enable conversion of ABACUS input files to Quantum ESPRESSO (QE) format. Configure QE settings such as version, and system parameters like ibrav and ecutwfc. ```json { "prepare": { "abacus2qe": true, "qe_setting": { "version": "7.0", "system": { "ibrav": 0, "ecutwfc": 50 } } } } ``` -------------------------------- ### Prepare Vacancy Calculation with CIF Input Source: https://pypi.org/project/abacustest Use this command to prepare input files for vacancy formation energy calculations when providing a CIF structure file. Specify the input file, type, number of vacancies, and simulation cell. ```bash abacustest model vacancy prepare -j stru.cif --ftype cif -i 1 -s 1 1 1 --lcao ``` -------------------------------- ### Configure Job Submission with param.json Source: https://pypi.org/project/abacustest Configure job submission parameters by including authentication details and run configurations within the param.json file. ```json { "config": { "bohrium_username": "", "bohrium_password": "", "bohrium_project_id": "" }, "run_dft":[...] } ``` -------------------------------- ### Convert Structure Files to ABACUS STRU Format Source: https://pypi.org/project/abacustest Use this configuration to convert structure files (e.g., VASP POSCAR, CIF) into ABACUS STRU format. Specify input file paths, formats, and templates for INPUT and KPT files. Pseudopotential and orbital dictionaries/paths can also be configured. ```json { "prepare":{ "strus": ["1.vasp", "2.vasp"], "stru_format": "poscar", "input_template": "INPUT", "kpt_template": "KPT", "pp_dict": {"H": "H.upf", "O": "O.upf"}, "orb_dict": {"H": "H.orb", "O": "O.orb"}, "pp_path": "path/to/pp", "orb_path": "path/to/orb" } } ``` -------------------------------- ### Postprocess Vacancy Calculation Results Source: https://pypi.org/project/abacustest After vacancy calculations are finished, use this command to postprocess the results. It will print the vacancy formation energy and save it to 'metrics_vacancy.json'. A 'ref_energy.txt' file will also be generated. ```bash abacustest model vacancy post -j 000000 ``` -------------------------------- ### Converting ABACUS to VASP Input Files with abacustest Source: https://pypi.org/project/abacustest Enable conversion of ABACUS input files to VASP format. This includes specifying POTCAR paths and VASP INCAR settings like ENCUT and EDIFF. ```json { "prepare": { "abacus2vasp": true, "potcar": {"H": "H.pot", "O": "O.pot"}, "vasp_setting": { "ENCUT": 500, "EDIFF": 1e-5, "emax_coef": 1.0 } } } ``` -------------------------------- ### Batch Convert Structure Files to ABACUS Input Source: https://pypi.org/project/abacustest Convert multiple structure files (e.g., CIF) into ABACUS input files. Optionally specify pseudopotential and orbital directories, and choose the output INPUT file type. ```bash abacustest model inputs -f *.cif --ftype cif ``` -------------------------------- ### Collect Data Keys Source: https://pypi.org/project/abacustest Use the `collectdata` command with `--outparam` to list all available keys for a given job type. The output shows module names and corresponding functions to retrieve data. ```bash collectdata --outparam 1 -t 0 ``` -------------------------------- ### abacustest prepare parameter JSON structure Source: https://pypi.org/project/abacustest Defines the structure for the 'param.json' file used by 'abacustest prepare'. Only the 'prepare' key is recognized. ```json { "prepare": { "example_template": ["example1", "example2"], "input_template": "INPUT", ... } } ``` -------------------------------- ### Postprocess Band Structure Calculation Results Source: https://pypi.org/project/abacustest Execute this command after the band structure calculation is complete. It identifies band data, determines the Fermi level, plots the band structure, and calculates the band gap. For non-metallic systems, it also finds CBM and VBM information. ```bash abacustest model band post -j 000000 ``` -------------------------------- ### Download Job Results with AbacusTest Source: https://pypi.org/project/abacustest Download job results using the 'abacustest download' command, specifying the parameter file and either the job ID or UID. The job ID may expire, but the UID is typically more persistent. ```bash abacustest download -p param.json ``` -------------------------------- ### Set ABACUS Environment Variables Source: https://pypi.org/project/abacustest Set environment variables to specify the paths for pseudopotential and orbital libraries. This avoids the need to repeatedly use --pp or --orb parameters. ```bash export ABACUS_PP_PATH=/path/to/pp/dir ``` ```bash export ABACUS_ORB_PATH=/path/to/orb/dir ``` -------------------------------- ### AbacusTest Configuration File Structure Source: https://pypi.org/project/abacustest Defines the main structure of the abacustest configuration file, including job execution details and Bohrium settings. ```json { "bohrium_group_name": "abacustest", "save_path":"results", "max_parallel": 100, "run_dft":[ { "ifrun": true, "sub_save_path": "123", "image": "registry.dp.tech/dptech/abacus-stable:LTSv3.10", "example":["00[0-2]","00[3-5]"], "group_size" : 1, "bohrium": { "scass_type":"c8_m16_cpu", "job_type":"container", "platform":"ali" }, "command": "mpirun -np 8 abacus > log", "extra_files":[] } ] } ``` -------------------------------- ### Specify Folder Naming Syntax Source: https://pypi.org/project/abacustest Customize the naming format for generated output folders using f-string syntax. Use 'x' to represent the input structure path and apply processing logic within curly braces. ```bash abacustest model inputs -f *.cif --ftype cif --folder-syntax {x[:-4]} ``` ```bash abacustest model inputs -f *.cif --ftype cif --folder-syntax aa-{x[:-4]}-bb ``` ```bash abacustest model inputs -f */POSCAR --folder-syntax {x[:-7]} ``` -------------------------------- ### Submit a Job with AbacusTest Source: https://pypi.org/project/abacustest Submit a computational job using the 'abacustest submit' command with a parameter file. The '&' allows the command to run in the background. ```bash abacustest submit -p param.json & ``` -------------------------------- ### Convert ABACUS to CP2K Input Source: https://pypi.org/project/abacustest Use this parameter to enable the conversion of ABACUS input files to CP2K format. It allows for specifying additional CP2K settings. ```json { "prepare": { "abacus2cp2k": true, "cp2k_setting": { "FORCE_EVAL": { "DFT": { "SCF": { "EPS_SCF": 1e-6 } } } } } } ``` -------------------------------- ### Set Environment Variables for Bohrium Authentication Source: https://pypi.org/project/abacustest Set these environment variables to authenticate your Bohrium account before submitting a job. Alternatively, these can be included in the param.json file. ```bash export BOHRIUM_USERNAME="your_bohrium_username" export BOHRIUM_PASSWORD="your_bohrium_password" export BOHRIUM_PROJECT_ID="your_bohrium_project_id" ``` -------------------------------- ### Postprocess Born Effective Charge Calculation Results Source: https://pypi.org/project/abacustest Use this command to postprocess the results of Born effective charge calculations. It prints a summary to the screen and saves it to 'bec_summary.txt'. Detailed metrics are saved in 'metrics.json' and 'metrics_bec.json'. ```bash abacustest model bec post ``` -------------------------------- ### Perturbing Configurations with abacustest Source: https://pypi.org/project/abacustest Configure random structure perturbations for ABACUS calculations. Specify parameters like the number of perturbed structures, cell perturbation fraction, atomic perturbation distance, and magnetic moment rotations/tilts. ```json { "prepare": { "example_template": ["example1", "example2"], "pert_stru": { "pert_number": 10, "cell_pert_frac": 0.01, "atom_pert_dist": 0.1, "mag_rotate_angle": 5, "mag_tilt_angle": 10, "mag_norm_dist": 0.05 } } } ``` -------------------------------- ### Collect Data from Multiple Jobs Source: https://pypi.org/project/abacustest Execute the 'abacustest collectdata' command to gather specified metrics from multiple job outputs. Results are saved to 'metrics.json' by default, or a custom file using the '-o' option. Use '-t' to specify job type (0 for ABACUS, 1 for QE, 2 for VASP). ```bash abacustest collectdata -p param.json -j job1 job2 job3 ``` -------------------------------- ### Import and Use RESULT Class Source: https://pypi.org/project/abacustest Import the `RESULT` class from `abacustest` to access job results within a Python script. Initialize `RESULT` with the job format and path, then access specific data like total energy, force, and stress using dictionary-like syntax. Unsupported keys will return `None`. ```python from abacustest import RESULT abacusresult = RESULT(fmt="abacus",path="abacusjob") # path is the path to the ABACUS job folder, such as "abacusjob" # fmt is the format of the job, such as "abacus", "qe", "vasp". energy = abacusresult["total_energy"] force = abacusresult["force"] stress = abacusresult["stress"] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.