Open AndrewTaehonKim opened 1 month ago
Dear Shankar,
I apologize for the many questions as I am quite new to computational chemistry, especially ab initio QM using plane waves. It would be a huge help if you would provide some guidance on the coulomb-truncation-embed
parameter and how you recommend to set it for a system of this type.
Thank you very much for your time and help.
In general, put the embed center at the geometric center of the structure along truncated directions. The location along periodic directions is irrelevant, so in your diagrams, A and B are equivalent, and C and D are equivalent.
In that example, C or D are better because they are close to the geometric center, and that will put the trunctaion boundaries furthest from your topmost and bottom-most atoms.
Looking at your input, your topmost atom is ~ 10 bohrs and bottom-most is ~ 0 bohrs along z, so your 0 0 5
choice is optimal. When I run a dry run with your posted input, ionpos and lattice, I don't get an error. Can you confirm that you ran exactly these inputs when you got that atom out of boundary error?
I notice that you got the error after a week (based on the duration), likely after many ionic steps. Is your adsorbate drifting away during the run? If so, that could be the problem. Your setup is correct to start, but eventually your system is breaking your setup by becoming too large since the molecule becomes far from your surface. Visualize the trajectory of your molecule using the animated option of createXSF
(it should work on a partial/failed output file too). (If you have used LAMMPS, this is similar to the lost atoms problem when using fixed boundaries.)
Also, looking at the atoms in your calculation, maybe you need dispersion corrections for your adsorbate to 'stick'? (This would need van-der-waals D3
in your input for example.
Thank you for clarifying where to put the embed-center.
Using the createXSF, I was able to animate the geometries up to the error (animation file: https://drive.google.com/file/d/135q8EosWJZwtfBN_oBRmt5QV9YFBm9_4/view?usp=drive_link). It does appear that the adsorbate is floating upwards, drifting towards the boundary. In its final position in the animation, it still does not appear to have drifted towards the boundaries significantly (see image below of the last iteration before crash).
Given the lattice c dimension is 32 bohrs, there should still be about around 16 bohrs left before it reaches the edge of the lattice. Would you be able to clarify why then I would still be getting the error: Atom 74 lies within the margin of 5 bohrs from the truncation boundary
?
I will also look into implementing van-der-waals D3. I initially did not include it because it was expensive and some of my other sorbents like NiS2 should theoretically have very strong chemisorptive forces, but clearly for graphene, that might be necessary. Thank you for clarifying that.
Okay, that was as expected then!
As for the reason for the error, the way the unit cell is rendered is misleading: remember that the box was periodic till you introduced the embed center at ~ 5 units. This breaks periodicity at half the box length above and below the center. Thus, the truncation boundary is roughly at 21 bohrs above the bottom in your cell, and your molecule only needs to get up to 16 bohrs to reach the margin of 5 bohrs.
Also, this is not an arbitrary choice with half the box being wasted. Remember that the wavefunctions and charge density of the atomic layer at z = 0 are extending several bohrs below, which means they are at the top end of the cell as well. That's why you can't allow the molecule to drift up all the way to the top of the box.
Finally, D3 disperson corrections should have negligible computational cost. It should at most add a few seconds per ionic step, and likely much less.
Hello Shankar,
Thank you very much for the fantastic program you have built. I just have a quick question about a parameter in JDFTx and a potentially related error.
The question is regarding coulomb-truncation-embed.
I tried to look at the other forums you have commented on, the tutorials, and the documentation, but I am still not quite sure where to optimally place the coulomb-truncation-embed for my surface adsorption system.
Below are some places I have tried or am considering trying (see images below).
Please let me know what the optimal place to put the
coulomb-truncation-embed
might be. I have been getting the following error frequently, and I am wondering if the poor computation speed and the following error may be due to that.The output error is
I thought the error was odd looking at the output xsf file because it appears that everything is well contained. Atom 74 is the second S atom in the ionpos file since there are a total of 78 atoms in the system.
Here is the input, ionpos, and lattice data Input
Ionpos
Lattice
I have been getting this error for other systems as well, which seem well-contained in the lattice upon observing the output xsf file.
Please let me know what you think when you can.
Thank you very much for your time and guidance!