|
1 | 1 | " Vim syntax file
|
2 | 2 | " Language: GPUMD Simulation Script File
|
3 |
| -" Latest Revision: 2023-5-30 |
| 3 | +" Latest Revision: 2025-4-17 |
4 | 4 |
|
5 | 5 | syn clear
|
6 | 6 |
|
| 7 | +"------------------------- |
| 8 | +" GPUMD core syntax definition |
| 9 | +"------------------------- |
7 | 10 | syn keyword GPUMDpot potential
|
8 |
| -syn keyword GPUMDsetup change_box ensemble velocity correct_velocity time_step neighbor fix deform |
9 |
| -syn keyword GPUMDdump dump_thermo dump_position dump_netcdf dump_restart dump_velocity dump_force active dump_exyz dump_beads dump_observer |
10 |
| -syn keyword GPUMDcompute plumed compute compute_shc compute_dos compute_sdc compute_hac compute_hnemd compute_gkma compute_hnema compute_phonon compute_cohesive compute_elastic compute_hnemdec compute_msd compute_viscosity |
| 11 | +syn keyword GPUMDsetup replicate velocity correct_velocity potential dftd3 change_box deform |
| 12 | +syn keyword GPUMDsetup ensemble fix time_step plumed mc electron_stop add_force add_efield active |
| 13 | +syn keyword GPUMDdump dump_netcdf dump_position dump_restart dump_thermo dump_velocity dump_shock_nemd |
| 14 | +syn keyword GPUMDdump dump_exyz dump_beads dump_observer dump_dipole dump_polarizability dump_force |
| 15 | +syn keyword GPUMDcompute compute compute_cohesive compute_dos compute_elastic |
| 16 | +syn keyword GPUMDcompute compute_gkma compute_hac compute_hnema compute_hnemd compute_hnemdec |
| 17 | +syn keyword GPUMDcompute compute_phonon compute_sdc compute_msd compute_shc compute_viscosity compute_lsqt compute_rdf |
11 | 18 | syn keyword GPUMDrun minimize run
|
12 |
| -syn keyword GPUMDspecial temperature potential force virial jp jk group num_dos_points f_bin_size bin_size precision observe |
13 |
| -syn keyword GPUMDensemble nve nvt_ber nvt_nhc nvt_bdp nvt_lan nvt_bao npt_ber npt_scr heat_nhc heat_bdp heat_lan pimd rpmd trpmd sd |
14 | 19 |
|
15 |
| -syn keyword NEPsets zbl n_max basis_size l_max neuron force_delta population |
| 20 | +"------------------------- |
| 21 | +" NEP related syntax definition |
| 22 | +"------------------------- |
| 23 | +syn keyword NEPsets zbl use_typewise_cutoff_zbl use_typewise_cutoff n_max basis_size l_max neuron force_delta population |
16 | 24 | syn keyword NEPkws cutoff batch
|
17 | 25 | syn keyword NEPinput version model_type type type_weight
|
18 | 26 | syn keyword NEPrun generation prediction
|
19 | 27 | syn keyword NEPlambda lambda_1 lambda_2 lambda_e lambda_f lambda_v lambda_shear
|
20 | 28 |
|
| 29 | +"------------------------- |
| 30 | +" GPUMD syntax rules (strings/numbers/comments) |
| 31 | +"------------------------- |
21 | 32 | syn region GPUMDString start=+'+ end=+'+ oneline
|
22 | 33 | syn region GPUMDString start=+"+ end=+"+ oneline
|
23 |
| - |
24 | 34 | syn match GPUMDNumber "\<[0-9]\+[ij]\=\>"
|
25 | 35 | syn match GPUMDFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
|
26 | 36 | syn match GPUMDFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
|
27 | 37 | syn match GPUMDFloat "\<[0-9]\+[edED][-+]\=[0-9]\+[ij]\=\>"
|
28 |
| - |
29 | 38 | syn match GPUMDComment "#\(.*&\s*\n\)*.*$"
|
30 | 39 |
|
| 40 | +"------------------------- |
| 41 | +" NEP syntax rules (strings/numbers/comments) |
| 42 | +"------------------------- |
31 | 43 | syn region NEPString start=+'+ end=+'+ oneline
|
32 | 44 | syn region NEPString start=+"+ end=+"+ oneline
|
33 |
| - |
34 | 45 | syn match NEPNumber "\<[0-9]\+[ij]\=\>"
|
35 | 46 | syn match NEPFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
|
36 | 47 | syn match NEPFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
|
37 | 48 | syn match NEPFloat "\<[0-9]\+[edED][-+]\=[0-9]\+[ij]\=\>"
|
38 |
| - |
39 | 49 | syn match NEPComment "#\(.*&\s*\n\)*.*$"
|
40 | 50 |
|
| 51 | +"------------------------- |
| 52 | +" Highlight link definition |
| 53 | +"------------------------- |
41 | 54 | if !exists("did_GPUMD_syntax_inits")
|
42 | 55 | let did_GPUMD_syntax_inits = 1
|
43 | 56 | hi link GPUMDdump Function
|
44 | 57 | hi link GPUMDpot Typedef
|
45 | 58 | hi link GPUMDsetup Typedef
|
46 | 59 | hi link GPUMDcompute Define
|
47 | 60 | hi link GPUMDrun Statement
|
48 |
| - hi link GPUMDspecial special |
49 |
| - hi link GPUMDensemble ensemble |
50 | 61 | hi link GPUMDString String
|
51 | 62 | hi link GPUMDNumber Number
|
52 | 63 | hi link GPUMDFloat Float
|
53 |
| - hi link NEPrun Statement |
54 |
| - hi link NEPlambda special |
55 |
| - hi link NEPrun Define |
56 |
| - hi link NEPkws Typedef |
| 64 | + hi link GPUMDComment Comment |
| 65 | + |
57 | 66 | hi link NEPsets Function
|
| 67 | + hi link NEPkws Typedef |
| 68 | + hi link NEPinput Define |
| 69 | + hi link NEPrun Statement |
| 70 | + hi link NEPlambda Special |
58 | 71 | hi link NEPString String
|
59 | 72 | hi link NEPNumber Number
|
60 | 73 | hi link NEPFloat Float
|
61 |
| - |
| 74 | + hi link NEPComment Comment |
62 | 75 | endif
|
63 | 76 |
|
64 | 77 | let b:current_syntax = "GPUMD"
|
0 commit comments