Closed woyolo990422 closed 10 months ago
Hi, yes, it is possible. You can still use the SSCHA class from the Relax module by initializing it with a minimizer (SSCHA_Minimizer) initialized with the ensemble computed manually. Then you can call vc_relax, as if it was an automatic calculation, setting the max_population to 1 and the flag restart_from_ensemble = True.
A minimal example:
# Load the dynamical matrix as dyn
ensemble = sscha.Ensemble.Ensemble(dyn, temperature)
ensemble.load("data_dir", population_id, n_configs)
minim = sscha.SchaMinimizer.SSCHA_Minimizer(ensemble)
relax = sscha.Relax.SSCHA(minim, max_pop = 1)
relax.vc_relax(target_press = 0, static_bulk_modulus = 100, restart_from_ensemble= True)
relax.minim.dyn.save_qe("final_dyn_sscha_pop{}".format(population_id))
Unfortunately, the algorithm will do 1 step at a time. This means that you need to guess a good value for the static_bulk_modulus. If you see that in the following population the cell changed too much (you overshot the target pressure), increase the static_bulk_modulus (it will reduce the step of the cell in the vc-relax). If the pressure change barely, then reduce it to speed up. This is usually done automatically by the vc_relax across different populations, but it must be done manually.
Thank you for the answer, but during this process, I encountered other issues. I was studying the free energy of structures under extreme pressure and temperature. I wrote some simple scripts to solve my problem, but encountered the following error:
Traceback (most recent call last):
File "/bbfs/fs09/home/js_wangyl/CO-Gibbs/SSCHA/C/60/total.py", line 126, in
But the structures I actually gave were even, not odd
Here is my attachment
You are right! It is a bug (very easy to fix). Thanks for the report For now, the workaround is to call vc_relax with start_pop=1.
relax.vc_relax(target_press = 0, static_bulk_modulus = 100, restart_from_ensemble= True, start_pop=1)
By the way, target_press and static_bulk_modulus are both in GPa, are you sure of your units? They seem quite big.
Thank you for your reply. I am studying the state of matter under very high pressure, and it is very difficult to explain it in MD. Therefore, I am using SSCHA to solve the problem.
The manual submission task in the manual does not have the ability to achieve vc-relax. I am curious that if I want to know the accurate Gibbs free energy, I need to calculate vc-relax. However, due to the difficulty of applying for multi-core on the server and our server being an LSF operating system, cluster mode cannot be directly called. I would like to know how to achieve vc-relax by manually submitting tasks and calculating Gibbs free energy under high temperature and pressure