Skip to content
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

strange flips of eps_zz for thin cell #11

Open
gabor1 opened this issue Apr 3, 2018 · 13 comments
Open

strange flips of eps_zz for thin cell #11

gabor1 opened this issue Apr 3, 2018 · 13 comments

Comments

@gabor1
Copy link

gabor1 commented Apr 3, 2018

I'm having trouble with the atomic_strain() calculation. I am passing in a crack slab that is thin in the z direction, and then the relaxed version of it, and computing the atomic strain. Some atoms come back with eps_zz = -1, there are domains of these, and the domain walls have strange strains (and large residuals in the least squares fit). The image below shows the hydrostatic strain. The zz strain essentially looks the same.
crack strain

@pastewka
Copy link
Collaborator

pastewka commented Apr 3, 2018

This is odd. Are the atoms reshuffled between the frames? The code needs to be able to assign a unique id to each atom, which is just the atom index presently.

If not, can you send the two configurations you are comparing?

@gabor1
Copy link
Author

gabor1 commented Apr 3, 2018

Here are the two configs. I am using the matscipy tools to apply thin strip displacements, but otherwise I'm not aware of any permutational mixup. the zip file contains the two configs, as well as the script that makes them. (the train measurements are not in the script)

crack.zip

@gabor1
Copy link
Author

gabor1 commented Apr 3, 2018

Now I have a suspicion! I think it's the "mic" call. The two neighbours are images of the same atom, and somehow the mic flips them.

@gabor1
Copy link
Author

gabor1 commented Apr 3, 2018

Taking out the mic() from the dr calculation, I get this as the hydrostatic strain.
crack_strain_fixed

@pastewka
Copy link
Collaborator

pastewka commented Apr 3, 2018

That last image looks good. The analysis however presently does not work robustly if mic cannot be applied, i.e. if the thickness of your slab is thinner than twice the cutoff.

This can only be partially fixed. I can use shift vectors (computed on the initial configuration) rather than using mic, but this assumes that no atom has passed a cell boundary and been wrapped back into the cell, which may happen for example in LAMMPS.

@pastewka
Copy link
Collaborator

pastewka commented Apr 3, 2018

I think the most robust solution would be to just replicate your cell in thickness direction before doing the analysis.

@gabor1
Copy link
Author

gabor1 commented Apr 3, 2018 via email

@gabor1
Copy link
Author

gabor1 commented Apr 3, 2018 via email

@pastewka
Copy link
Collaborator

pastewka commented Apr 4, 2018

Agreed. Will implement the automatic doubling of the unit cell in periodic directions.

@jameskermode
Copy link
Member

We have an undo_pbc_jumps() function in quip which could solve the problem of LAMMPS wrapping atoms across the pbc. It recently got ported to JuLIP, here is the discussion, which includes a Python implementation of the original Fortran unwrapping code written by @noambernstein

JuliaMolSim/JuLIP.jl#50

Perhaps we could use something like this this instead of the mic() call?

@noambernstein
Copy link

noambernstein commented Apr 4, 2018 via email

@pastewka
Copy link
Collaborator

pastewka commented May 15, 2018 via email

@gabor1
Copy link
Author

gabor1 commented Jul 21, 2018

Can we have a temporary fix for this? I suggest allowing an option to atomic_strain() to turn off the mic()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants