Order of the virial matrix components #272
Answered
by
gabor1
MarcBrueck
asked this question in
Q&A
Replies: 5 comments
-
the virial is -volume*stress, and the stress is the derivative of the total energy with respect to the deformation tensor, where the order of components is the same as in the 3x3 matrix that describes the lattice vectors. so
[xx, xy, xz, yx, yy, yz, zx, zy, zz]
make sure that the units of the virial are in eV
…-- Gábor
Gábor Csányi
Professor of Molecular Modelling
Engineering Laboratory, University of Cambridge
Pembroke College Cambridge
Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/
On 22 Jan 2021, at 10:59, Marco Brueckner ***@***.***> wrote:
I want to train a potential using GAP with virials as indicated on the GAP website (https://libatoms.github.io/GAP/gap_fit.html), but I have not found information on the order the components need to be in.
If my virial tensor looks like this:
(xx xy xz)
(yx yy yz)
(zx zy zz)
what is the order these components need to be in?
For example [xx yy zz xy xz yz yx zx zy]
I want this information so I can put it into my extended xyz training file.
In the example of my extended xyz file below the virial keyword is called stress.
200
Lattice="19.093835 0.0 0.0 0.0 19.093835 0.0 0.0 0.0 19.093835" Properties=species:S:1:pos:R:3:forces:R:3:c_mype:R:1 cutoff=-1.0 nneightol=0.0 pbc="T T T" energy=-729.4351699999999 stress="-10.410906254381906 -13.132354288568486 -7.946539626046216 -5.438855410819644 13.753268665958213 1914.59 -5.438855410819644 13.753268665958213 1914.59"
Na 6.54047 16.0375 7.165 0.2079 -0.366085 -0.372567 -3.21248
Na 11.2916 2.81711 9.21734 -1.02043 0.859936 -0.435029 -3.62694
Na 2.11022 10.619 0.280763 -0.65753 0.193352 -0.826336 -4.09899
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MarcBrueck
-
On Jan 22, 2021, at 7:32 AM, gabor1 ***@***.***> wrote:
the virial is -volume*stress, and the stress is the derivative of the total energy with respect to the deformation tensor,
In practice Gábor is right, but to be picky, the quantity returned by codes like QUIP (and, from what I can tell, essentially all atomistic codes) is the derivative of the _total_ energy w.r.t. the deformation gradient 3x3 matrix times the inverse of the deformation gradient (or maybe its transpose). That's why it's the stress * volume. The usual (Cauchy-Green?) stress is equal to the derivative of the energy per unit volume (hence the factor of volume) w.r.t. the strain, but the two are equal (except for the factor of cell volume), at deformation_gradient = identity.
where the order of components is the same as in the 3x3 matrix that describes the lattice vectors. so
[xx, xy, xz, yx, yy, yz, zx, zy, zz]
make sure that the units of the virial are in eV
This part is definitely right. There's also work on switching to the more conventional Voigt 6-tensor "stress" property support (in order xx yy zz yz zx xy), but that's not quite ready to go.
Noam
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On Jan 22, 2021, at 8:44 AM, Bernstein, Noam CIV USN NRL (6393) Washington DC (USA) ***@***.***> wrote:
> (and, from what I can tell, essentially all atomistic codes)
Sorry, one final clarification, since I'm being so pedantic. When I said "essentially all atomistic codes" I meant the conceptual definition of the virial as the derivative of the total energy w.r.t. deformation gradient. They do often report "stress" = virial/volume, glossing over the finite deformation continuum mechanics tensor subtleties of precisely which stress, i.e. 1st vs. 2nd Piola-Kirchhoff vs. Cauchy-Green, which vary by various factors of deformation gradient matrix perhaps inverse and perhaps transpose.
Noam
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I think you missed a - sign in the last message?
…-- Gábor
Gábor Csányi
Professor of Molecular Modelling
Engineering Laboratory, University of Cambridge
Pembroke College Cambridge
Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/
On 22 Jan 2021, at 13:51, bernstei ***@***.***> wrote:
> On Jan 22, 2021, at 8:44 AM, Bernstein, Noam CIV USN NRL (6393) Washington DC (USA) ***@***.***> wrote:
>
>> (and, from what I can tell, essentially all atomistic codes)
Sorry, one final clarification, since I'm being so pedantic. When I said "essentially all atomistic codes" I meant the conceptual definition of the virial as the derivative of the total energy w.r.t. deformation gradient. They do often report "stress" = virial/volume, glossing over the finite deformation continuum mechanics tensor subtleties of precisely which stress, i.e. 1st vs. 2nd Piola-Kirchhoff vs. Cauchy-Green, which vary by various factors of deformation gradient matrix perhaps inverse and perhaps transpose.
Noam
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
On Jan 22, 2021, at 8:53 AM, gabor1 ***@***.***> wrote:
I think you missed a - sign in the last message?
Sorry, yes, if you use ASE's sign convention for the stress (which is what we're used to since we tend to use ASE and its DFT code calculators to generate the fitting data files). This is indeed _very_ important, so I apologize for being careless - mistakes about the sign led us to several apparently terrible GAP fits that were just caused by flipped sign on the virial.
In my defense, people use various sign conventions for stresses. As I said the virial that the gap fitting expects is (- stress*volume) when the stress has the ASE sign convention.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to train a potential using GAP with virials as indicated on the GAP website (https://libatoms.github.io/GAP/gap_fit.html), but I have not found information on the order the components need to be in.
If my virial tensor looks like this:
(xx xy xz)
(yx yy yz)
(zx zy zz)
what is the order these components need to be in?
For example [xx yy zz xy xz yz yx zx zy]
I want this information so I can put it into my extended xyz training file.
In the example of my extended xyz file below the virial keyword is called stress.
200
Lattice="19.093835 0.0 0.0 0.0 19.093835 0.0 0.0 0.0 19.093835" Properties=species:S:1:pos:R:3:forces:R:3:c_mype:R:1 cutoff=-1.0 nneightol=0.0 pbc="T T T" energy=-729.4351699999999 stress="-10.410906254381906 -13.132354288568486 -7.946539626046216 -5.438855410819644 13.753268665958213 1914.59 -5.438855410819644 13.753268665958213 1914.59"
Na 6.54047 16.0375 7.165 0.2079 -0.366085 -0.372567 -3.21248
Na 11.2916 2.81711 9.21734 -1.02043 0.859936 -0.435029 -3.62694
Na 2.11022 10.619 0.280763 -0.65753 0.193352 -0.826336 -4.09899
Beta Was this translation helpful? Give feedback.
All reactions