Dear Shan and Mailing list,
I have other 2 questions concerning the structure of the QEQ and how it is implemented.
(1)
I would have expected, as inferred by an inspection of the source code, that the fix is not altering the energy dictated by the pair_style declaration,
i.e. that the additional energetic terms used in the fix (electronegativity & co) were used just in the fix.
Instead in your examples and others I get different values of the energy printed with and without the fix, even though I impose the same charges in the cell obtained from the charge equilibration.
See attached files: WithFix…* and WithoutFix…* with the input cell data.aC.cut (energy = -18 and -28 eV in the two cases).
So this fix is altering the energy of the atoms ?
Is there a way to print out the energy dictated just by the pair_style declaration and leave these additions just when the fix is acting ?
If yes, how ?
(2)
A more tricky question.
In the term that I have to implement (image U-limiting.png attached).
This is needed to prevent the coulombic-catastrophe when atoms are too close so to make disadvantageous to change the charges out of the limits [qmin:qmax].
You suggested me to develop the square and then to insert in chi and eta.
It is smart, but there is a problem.
This term depends on the real charges q_i :
1-(q_i-qmin)/|qi-qmin| that is either 0 or 2 depending on q_i.
But the two CG of the fictitious charges (s and t) are solved separately one after the other.
So the real charges are not known during the minimization.
And after these CGs the system is converged.
I guess that I need to solve the equations self consistently in the following way:
0 - set q_i = 0 (from histories of s and t, previous mails)
1 - compute the matrices with init_matvec
2 - solve CG for s with the real q from point 0
3 - solve CG for t with the real q from point 0
4 - obtain the real converged q
5 - go back to point 1 with this term updated and repeat until q is converged considering also this “limiting” term.
Can this work, considering the structure of the code ?
I guess that this way of proceeding is slowing down the process considerably.
Is there another way / does anybody have any suggestion on how to do that better ?
Is there a variant of the method of the fictitious charges that is valid also when the matrix is q-dependent.
Please let me know if I wasn’t clear enough.
Thank you in advance for your help and suggestion.
Best regards,
Daniele Scopece
data.aC.cut (752 Bytes)
WithFix…in.qeq.buck (1.08 KB)
WithFix…out.qeq.buck (1.14 KB)
WithoutFix…in.qeq.buck (1.09 KB)
WithoutFix…out.qeq.buck (1.08 KB)