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
Definition of position delta in compare_structures #569
Comments
I don't think that is has been considered. For cases where the atom can cross the boundary, it is very likely that the workchain will never converge, despite the relaxation is converged. The problem is that the output structure is alway wrapped such that the atoms are inside the units cell. A fix can be done by computing the true displacement taking minimum image convention into account. Using the routione in
However, I think the relative position displacement still does not make any sense, if an atom is at [0.001, 0.001, 0.001] in the first place, then any displacement can be very large! We should disallow any "relative" displacement comparison. |
@zhubonan, thank you for your reply. I am sorry for my late reply. frac_position = np.dot(cart_position, np.linalg.inv(cell))
frac_position -= np.rint(frac_position)
distance = np.linalg.norm(np.dot(frac_position, cell)) Here, I use 3x3 matrix of basis vectors that are stored as row vectors. The second line brings the fractional position into the interval of [-0.5, 0.5], and I expect it is near zero for this purpose. I agree with you that relative position displacement is not a good measure because choice of basis vectors is not unique. Also for the angles, but so we may have to discuss on the measures and their definitions. |
Good point. I think the assumption of small displacement is sound here. If not the case, the relaxation should restart again anyway. |
Environment
Question
I was looking for a function to compare two structures (e.g. of
StructureData
). I found a functionaiida_vasp.utils.workchains.compare_structures
. This is used for checking the convergence of crystal structure in relax workchain. In VASP, atomic position in fractional coordinates may be set in the interval of [0, 1]. So if position of an atom cross the border (0 or 1) under the relaxation or numerical treatment, the value can change by +1 or -1. In the following code, I am wondering if this situation is considered or not.aiida-vasp/aiida_vasp/utils/workchains.py
Lines 80 to 87 in c41eef0
Is any trick implemented, for example, in
parsevasp
orStructureData
?The text was updated successfully, but these errors were encountered: