-
Notifications
You must be signed in to change notification settings - Fork 128
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
add a new command #861
base: master
Are you sure you want to change the base?
add a new command #861
Conversation
This is a very specialized feature, so I suggest you make your code localized. You should nearly not touch the existing files, but just create new files. |
How about write a new key word like mc_local, and construct that class totally independent of mc, but still depend on nep_energy? The minimize part, I write a new function in minimize_fire which can only update the labelled atoms by input an array like [0, 0, 1, 1, 0......], 1 means the atoms need to update and 0 means not change. I'm not sure if it's useful for other function, if it is we may keep it in minimize to increase code reusability. |
You can create a new folder |
|
Hi Prof. Fan, I've finished the major part work. I add a new key word "mc_minimize", and you can use command Now this part is highly modular. It's independent of nep_energy in mc, instead, I use the potential.cuh directly to calculate the force and energy. It's not that beautiful in minimize part. The code still use Minimizer_fire object directly. Later I may try to modify this part if there is any requirement. I feel it's better to use the interface of minimizer. But till now, the fire method seems enough for relaxation. |
mc local_minimize mc_trials scale_factor force_tolerance maximal_number_of_relaxation_steps [group grouping_method group_id]
This can perform simple mc and local relaxation.
Previously, we need to write a python jobscript to do the work, randomly select two atoms and swap - relax the structure - get the energy difference to calculate the probability of swap.
Now the work flow has been implemented in GPUMD, although there still need some modification. The local relaxation method has been implemented, which means each time swap 2 atoms, we don't need to relax the whole system to get the energy, and the volumn of relax area can be controlled by the scale factor. The sphere area with radius scale_factor radial_cutoff will be calculated.
In mcmd.out file, the Maximum displacement, Average displacement and Accept ratio will be calculated. The two displacement value are calculated from the atoms falls in the range from (scale_factor - 1) * cutoff_radius to scale_factor * cutoff_radius, where is the edge of the sphere we are going to relax. One can adjust the scale factor to a reasonable value according to this. The smaller they are, the smaller the energy difference with the global relaxation will be.
TO DO: modify the output file
modify the code structure