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

Deleting duplicate source atoms #19

Open
CharlesCardot opened this issue Dec 13, 2022 · 0 comments
Open

Deleting duplicate source atoms #19

CharlesCardot opened this issue Dec 13, 2022 · 0 comments

Comments

@CharlesCardot
Copy link

CharlesCardot commented Dec 13, 2022

This was a piece of code in src/RDINP/ffsort.f90 which is causing duplicate source atoms to get removed. Normally the code should fail on duplicate atoms, but there is a loop that "makes a smaller list of atoms from a big one". I'm not quite sure what the original intention of this block was, but changing from

image

to

image

fixes the issue. Alternatively you could just set the condition to "greater than zero" to entirely avoid this problem. Dr. Kas hypothesized that this code might be a left over way of simulating vibrational effects by having multiple source atoms all very close together.

The input file which initially brought this bug to light had this code block for ATOMS
image
where the Fe.1 atoms are too close to the absorbing Fe to be physical. This input file was most likely created using some automated tool like Web Atoms, where the coordinates for the Fe were not defined properly.

The header at the top of the input file reads
image

It should be noted that the x, y, and z coordinates should be 0.3 (repeating), 0.6 (repeating, and 0.75, but they are cut off after only two digits. Putting this into Web Atoms, we get the same input file

image

but this can be fixed by using fractional coordinates (Web Atoms automatically converts 1/3 to 0.33333333333333 (up to machine precision))

image

And we see that the two duplicate source atoms that were 0.02 Angstroms away no longer appear. The key takeaway here is to always make sure the structure you have defined is indeed what you want to calculated. Try looking at your structure in a molecular viewer, and whenever possible, use high precision or fractional coordinates when defining atomic coordinates.

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

1 participant