libAtoms / QUIP

libAtoms/QUIP molecular dynamics framework: https://libatoms.github.io
342 stars 124 forks source link

"Iterative GAP fitting" example using ase Vasp calculator #646

Open rbjiawen opened 1 month ago

rbjiawen commented 1 month ago

Hello, developers,I'm using workflow and I'm having problems with some of the units. When using the generic calculation method (wfl.calculators.generic calculate) in the workflow with the ASE calculator Vasp(ase.calculators.vasp.vasp Vasp), the stress units in the output XYZ file is in eV/Å^3. When further using gap_fit ( from wfl.fit.gap.multistage import fit), do the stress need to be converted to eV as required by the gap documentation?

bernstei commented 1 month ago

"eV" isn't a stress unit, although it can be the unit for virials, which provide equivalent information. I believe that stresses should be in eV/A^3 if they are the property "stress" in the extxyz header. Where in the documentation does it say anything else?

rbjiawen commented 1 month ago

Hi,this was discussed in your previous post (https://github.com/libAtoms/QUIP/issues/289) In the latest v0.9.14-dirty version I'm using, virial_parameter_name and stress_parameter_name

This means that when I specify the keyword virial_parameter_name, I should use virial (in eV, oposite sign) in the extxyz header, and when I specify the keyword stress_parameter_name, I should use stress (6-vector or 9-vector, oposite sign, standard Voigt order, in eV/A^3)?

rbjiawen commented 1 month ago

If both virial_parameter_name and stress_parameter_name parameters are not specified, virial (eV) is used by default?