orex / supercell

The program allows you to create regular structure supercell from cif file with partial occupancy and/or substitutions.
GNU General Public License v2.0
96 stars 56 forks source link

A problem in calculating the coulomb energy #15

Closed Jiang-Lu-CAS closed 6 years ago

Jiang-Lu-CAS commented 6 years ago

Thanks for Professor Okhotniikov's kind help.

My original letter is as follows:

Dear professor, I'm writing to ask for your help with the problem in using the Supercell program. These days I want to get the model with the lowest energy for the crystal (Sn24P19.3I8), however, there's some errors when I calculated the coulomb energy. When I type: supercell -i snip.cif -q -p "Sn*:c=+2" -p "I*:c=-1" -p "P*:c=-2.07" -m -n l10 -o mod1/snip An error was reported as below:

Current charge balance option is "try" Total charge oxidation state (cif): nan Total charge cell: 0.06142 Charge balancing: yes

| Atom Label | charge | mult | occup x mult | | Ox. state | Used | (cif) |

| I1 | nan | -1 | 2 | 2 | I2 | nan | -1 | 6 | 6 | P1 | nan | -2.07 | 16 | 16 | P2 | nan | -2.07 | 6 | 3.294 | Sn1 | nan | 2 | 24 | 13.176 | Sn2 | nan | 2 | 24 | 10.824

Create atoms population error: Change supercell size Switch off charge balancing Check manual population settings

If I change the charge of P* from 2.07 to 2, the errors will be :

ERROR: Electrostatic energy cannot be calculated without charge balancing. Also I changed the supercell with 1x2x1, the above error still exist.

I’ve found that the examples in your tutorial only refer to some models with the integral charge. Is it means that we can only calculate the coulomb energy of systems with integral and balanced charge? If so, I would love to hear your kind suggestion with these problems. The model (snip.cif) and the corresponding reference are in the attachments. Thanks for your kind attention and look forward your reply. Best regards, Jiang Lu

Professor's apply:

Dear Jiang Lu,

Thank you for the question. The supercell program is working correct.

1) Electrostatic energy of any cells can be only calculated in electrically neutral systems. This is not a limitation of the implemented algorithms, but a "natural" limitation. Energy of charged cell will be infinite. 2) Supercell can work with partial charges, but not in your case. A correction of phosphorus amount to satisfy integer occupation requires an integer charge. P=+2. In you case the correction is quite small I think you can do this as me myself and many users of my program did. You can increase cell size to make the correction smaller. 3) This I cannot reproduce If I change the charge of P from 2.07 to 2, the errors will be : ERROR: Electrostatic energy cannot be calculated without charge balancing. Also I changed the supercell with 1x2x1, the above error still exist. The code /supercell -q -i snip.cif -c yes -p "Sn:c=+2" -p "I:c=-1" -p "P:c=-2" -m -n l10 -o mod1/snip is working as expected without error. Probably, you forget to force charge calculation "-c yes"?

Don't hesitate to contact me in case of any question, but I really appreciate if you will create an issue on github site (starting from your initial letter). It will take for you no more than a couple of minutes to create an account, if needed. https://github.com/orex/supercell/issues/

Using the approach, not only me but other people can see your problem and help you.

Sincerely yours, Kirill Okhotniikov.

novikov2012.pdf snip.txt