-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lammps template for MD+MC #1149
Open
wujing81
wants to merge
2
commits into
deepmodeling:devel
Choose a base branch
from
wujing81:wujing81
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
{ | ||
"type_map": ["Sr", "Pb", "Ti", "O"], | ||
"mass_map": [87.62, 207.2, 47.867, 15.999], | ||
"init_data_prefix": "./data", | ||
"init_data_sys": [ | ||
"deepmd" | ||
], | ||
|
||
"sys_configs": [ | ||
["someplace/POSCAR"] | ||
], | ||
|
||
"_comment": " 00.train ", | ||
"numb_models": 4, | ||
"default_training_param": { | ||
"model":{ | ||
"type_map":[ | ||
"Sr", | ||
"Pb", | ||
"Ti", | ||
"O" | ||
], | ||
"descriptor": { | ||
"type": "se_e2_a", | ||
"sel": "auto", | ||
"rcut_smth": 0.5, | ||
"rcut": 6.00, | ||
"neuron": [25, 50, 100], | ||
"resnet_dt": false, | ||
"axis_neuron": 16, | ||
"seed": 1 | ||
}, | ||
"fitting_net": { | ||
"neuron": [ | ||
240, | ||
240, | ||
240 | ||
], | ||
"resnet_dt": true, | ||
"seed": 1 | ||
} | ||
}, | ||
"learning_rate": { | ||
"type": "exp", | ||
"start_lr": 0.001, | ||
"stop_lr":3.51e-8, | ||
"decay_steps": 2000 | ||
}, | ||
"loss": { | ||
"type":"ener", | ||
"start_pref_e": 0.02, | ||
"limit_pref_e": 1, | ||
"start_pref_f": 1000, | ||
"limit_pref_f": 1, | ||
"start_pref_v": 0.0, | ||
"limit_pref_v": 0.0 | ||
}, | ||
"training": { | ||
"set_prefix": "set", | ||
"stop_batch": 400000, | ||
"batch_size": "auto", | ||
"disp_file": "lcurve.out", | ||
"disp_freq": 1000, | ||
"numb_test": 4, | ||
"save_freq": 1000, | ||
"save_ckpt": "model.ckpt", | ||
"disp_training": true, | ||
"time_training": true, | ||
"profiling": false, | ||
"profiling_file": "timeline.json", | ||
"_comment": "that's all" | ||
} | ||
}, | ||
|
||
"model_devi_dt": 0.002, | ||
"model_devi_skip": 0, | ||
"model_devi_f_trust_lo": 0.1, | ||
"model_devi_f_trust_hi": 0.20, | ||
"model_devi_clean_traj": true, | ||
"model_devi_jobs": [ | ||
{"_idx": 0, "ensemble": "npt","sys_idx": [0], "trj_freq": 10, | ||
"rev_mat":{"lmp":{ | ||
"${MC_NSTEPS}":[50], | ||
"${MD_NSTEPS}":[1000], | ||
"${PRES}":[0,100], | ||
"${TEMP_MD}":[100,300], | ||
"${TEMP_MC}":[100,300], | ||
"${RANDOM_SEED}":[15196], | ||
"${ELEMENT_TYPE_1}":[1], | ||
"${ELEMENT_TYPE_2}":[2], | ||
"${N_LOOP}":[10] | ||
} | ||
}, | ||
"template":{"lmp":"template/lammps.in"} | ||
|
||
}, | ||
{"_idx": 1, "ensemble": "npt","press": [1,100],"sys_idx": [0], "trj_freq": 10, | ||
"rev_mat":{"lmp":{ | ||
"${MC_NSTEPS}":[50], | ||
"${MD_NSTEPS}":[1000], | ||
"${PRES}":[0,100], | ||
"${TEMP_MD}":[100], | ||
"${TEMP_MC}":[100], | ||
"${RANDOM_SEED}":[15196], | ||
"${ELEMENT_TYPE_1}":[1], | ||
"${ELEMENT_TYPE_2}":[2], | ||
"${N_LOOP}":[10] | ||
} | ||
}, | ||
"template":{"lmp":"template/lammps.in"} | ||
|
||
} | ||
], | ||
"fp_style": "vasp", | ||
"shuffle_poscar": false, | ||
"fp_task_max": 100, | ||
"fp_task_min": 10, | ||
"fp_pp_path": "workplace", | ||
"fp_pp_files": [ | ||
"POTCAR_Sr", | ||
"POTCAR_Pb", | ||
"POTCAR_Ti", | ||
"POTCAR_O" | ||
], | ||
"fp_incar": "workplace/INCAR" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
variable MD_NSTEPS equal MD_NSTEPS | ||
variable MC_NSTEPS equal MC_NSTEPS | ||
variable THERMO_FREQ equal 10 | ||
variable TEMP_MD equal TEMP_MD | ||
variable TEMP_MC equal TEMP_MC | ||
variable PRES equal press | ||
variable TAU_T equal 0.100000 | ||
variable TAU_P equal 0.500000 | ||
variable RANDOM_SEED equal RANDOM_SEED | ||
variable ELEMENT_TYPE_1 equal ELEMENT_TYPE_1 | ||
variable ELEMENT_TYPE_2 equal ELEMENT_TYPE_2 | ||
variable N_LOOP equal N_LOOP | ||
|
||
#Initialization | ||
units metal | ||
boundary p p p | ||
atom_style atomic | ||
neighbor 1.0 bin | ||
|
||
#read data | ||
read_data conf.lmp | ||
mass 1 87.620000 | ||
mass 2 207.200000 | ||
mass 3 47.867000 | ||
mass 4 15.999000 | ||
|
||
# read in the potentia | ||
pair_style deepmd ../graph.001.pb ../graph.000.pb ../graph.003.pb ../graph.002.pb out_freq ${THERMO_FREQ} out_file model_devi.out | ||
pair_coeff | ||
|
||
# output observables | ||
thermo_style custom step temp pe ke etotal press vol lx ly lz xy xz yz | ||
thermo ${THERMO_FREQ} | ||
dump dpgen_dump | ||
|
||
timestep 0.002000 | ||
|
||
variable loop1 loop ${N_LOOP} | ||
label runloop1 | ||
|
||
# Monte Carlo followed by short md | ||
fix mc1 all atom/swap 1 1 500 ${TEMP_MC} ke no semi-grand no types ${ELEMENT_TYPE_1} ${ELEMENT_TYPE_2} | ||
run ${MC_NSTEPS} | ||
unfix mc1 | ||
|
||
velocity all create ${TEMP_MD} ${RANDOM_SEED}" | ||
velocity all zero linear | ||
fix md1 all npt temp ${TEMP_MD} ${TEMP_MD} ${TAU_T} iso ${PRES} ${PRES} ${TAU_P} | ||
run ${MD_NSTEPS} | ||
unfix md1 | ||
|
||
variable idx equal "(v_loop1-1)" | ||
write_data conf.${idx}.lmp | ||
next loop1 | ||
jump SELF runloop1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pair_coeff
--> pair coeff * *
to be compatible with the latest version of lammps