Replies: 1 comment 9 replies
-
Hi - sorry for the slow reply. How important is this for you? It might make things much slower. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thank you for making a good code.
I recently study MACE and just test MD simulation in lammps.
Unfortunately, I found that it doesn't support vflag_atom which for atomic virial stress calculation.
I'm not farmiliar with cpp file but
if(vflag_atom) {
torch::Tensor atomic_virial_tensor = output.at("atom_virial").toTensor().cpu();
auto atomic_virial = atomic_virial_tensor.accessor<float, 3>();
for (int ii = 0; ii < ntotal; ii++)
{
int i = ilist[ii];
vatom[i][0] += atomic_virial[i][0][0]; // xx
vatom[i][1] += atomic_virial[i][1][1]; // yy
vatom[i][2] += atomic_virial[i][2][2]; // zz
vatom[i][3] += 0.5*(atomic_virial[i][0][1]+atomic_virial[i][1][0]); // xy
vatom[i][4] += 0.5*(atomic_virial[i][0][2]+atomic_virial[i][2][0]); // xz
vatom[i][5] += 0.5*(atomic_virial[i][1][2]+atomic_virial[i][2][1]); // yz
}
}
Will this code work? I haven't tested it yet, but I'd appreciate it if you could tell me what seems to be a problem
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions