dpgen-lsp
Language Server Protocol implementation for DP-GEN (Deep Potential GENerator) input files.
Features
- Auto-completion for dpgen JSON input parameters (run, simplify workflows)
- Diagnostics with error and warning detection (JSON syntax, schema validation, semantic checks)
- Hover documentation for dpgen parameters from official arginfo documentation
- Code formatting for consistent JSON structure
- Support for
param.jsonandmachine.jsoninput files
Installation
pip install dpgen-lsp
Usage
Start the language server:
dpgen-lsp
Agent-facing CLI:
dpgen-lsp-tool check param.json
dpgen-lsp-tool complete param.json --line 5 --character 10
dpgen-lsp-tool hover param.json --line 5 --character 10
Editor Integration
This package provides the language server executable. To use it in an editor, connect an LSP client to the dpgen-lsp command and register .json files as dpgen input files.
Supported Workflows
- dpgen run:
param.jsonwith type_map, training, model_devi, fp settings - dpgen simplify:
param.jsonwith pick_data, iterative selection parameters
Supported FP Engines
- VASP, Gaussian, CP2K, ABACUS, PWSCF (Quantum ESPRESSO), SIESTA, PWmat, CPX, Amber/Diff, Custom
Example Input File
{
"type_map": ["H", "C"],
"mass_map": [1, 12],
"init_data_sys": ["CH4/deepmd"],
"sys_configs": [["CH4/scale*/00000*/POSCAR"]],
"numb_models": 4,
"default_training_param": {
"model": {
"type_map": ["H", "C"],
"descriptor": {
"type": "se_a",
"sel": [16, 4],
"rcut_smth": 0.5,
"rcut": 5.0,
"neuron": [120, 120, 120],
"resnet_dt": true,
"axis_neuron": 12,
"seed": 1
},
"fitting_net": {
"neuron": [25, 50, 100],
"resnet_dt": false,
"seed": 1
}
},
"learning_rate": {
"type": "exp",
"start_lr": 0.001,
"decay_steps": 100
},
"loss": {
"start_pref_e": 0.02,
"limit_pref_e": 2,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0.0,
"limit_pref_v": 0.0
},
"training": {
"numb_steps": 2000,
"disp_file": "lcurve.out",
"disp_freq": 1000,
"save_freq": 1000
}
},
"model_devi_dt": 0.002,
"model_devi_skip": 0,
"model_devi_f_trust_lo": 0.05,
"model_devi_f_trust_hi": 0.15,
"model_devi_jobs": [
{
"sys_idx": [0],
"temps": [100],
"press": [1.0],
"trj_freq": 10,
"nsteps": 300,
"ensemble": "nvt"
}
],
"fp_style": "vasp",
"fp_task_max": 20,
"fp_task_min": 5,
"fp_pp_path": "./",
"fp_pp_files": ["POTCAR_H", "POTCAR_C"],
"fp_incar": "./INCAR_methane"
}
License
MIT
Metadata
Release files for dpgen-lsp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dpgen_lsp-0.1.1.tar.gz | 70.5 kB | Without provenance | Details for dpgen_lsp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dpgen_lsp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dpgen_lsp-0.1.1-py3-none-any.whl |
Total release size: 154.9 kB
Release files / dpgen_lsp-0.1.1.tar.gz
| Download URL | dpgen_lsp-0.1.1.tar.gz |
|---|---|
| Size | 70.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a4cdb737d64e374bbed7108089a7c119717f8b68345a6f01cd584fb724a3b94
|
|
BLAKE2b-256 checksum How to use checksums |
6325aee67ab7d11cf1003a7d24986f0b49d798a54090fb763f25ac2825f332c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / dpgen_lsp-0.1.1-py3-none-any.whl
| Download URL | dpgen_lsp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 84.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eecd6c259a9f17d558316a9dbdee5bb80a93812f215d73645d8525a55428afd7
|
|
BLAKE2b-256 checksum How to use checksums |
0156402014e344df803705390506a06efe08626b63379869a9cc743894822258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for dpgen-lsp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.