# Constraining coordination or bond lengths for certain atoms in VASP

I have a structure composed of many MX4 tetrahedral units. When doing MD on this structure I find that just one M atom moves into a trigonal planar coordination (MX3). I was wondering how to set constraints such that the M atom is always bonded to 4 X atoms in a tetrahedral coordination environment.

I came across the ICONST option, but I'm not sure how to use it to implement the constraint for all the M atoms in my structure.

POSCAR:

Li6 P1 S5 Cl1
1.0
-4.929500 0.000000 -4.929500
4.929500 -4.929500 0.000000
-4.929500 -4.929500 0.000000
Li P S Cl
6 1 5 1
direct
0.370400 0.018000 0.018000 Li+
0.629600 0.611600 0.018000 Li+
0.964000 0.352400 0.018000 Li+
0.629600 0.611600 0.352400 Li+
0.036000 0.018000 0.611600 Li+
0.370400 0.018000 0.611600 Li+
1.000000 0.500000 0.500000 P5+
0.500000 0.250000 0.250000 S2-
0.761060 0.141590 0.619470 S2-
0.761060 0.619470 0.619470 S2-
0.238940 0.619470 0.619470 S2-
0.238940 0.619470 0.141590 S2-
0.000000 0.000000 1.000000 Cl-

• Would you like a purely VASP solution to this problem or does a solution implementing ASE work? An example structure as an image (or even POSCAR) would be very helpful. You can avoid the exact structure you are working on if you have some reason to. – Tristan Maxson Sep 11 '20 at 18:43
• Purely VASP solution would be ideal but I'm open to an ASE solution if that's the only or best way. I've included the POSCAR in my question that's similar to the structure I'm working on. They are PS4 tetrahedra. Thanks! – DoubleKx Sep 11 '20 at 19:11
• Out of curiosity, have you done a phonon mode analysis to see if this is a stable structure or if it is at a saddle point? How you constrain your system might depend on what your goal of the MD simulation is. – Tristan Maxson Sep 11 '20 at 19:24
• I haven't done a phonon mode analysis but I know experimentally this structure is stable. It's been made in lab and the structure is resolved by single-crystal XRD. I know it should have only MX4 tetrahedra from the single-crystal structural refinement. I'm interested in studying the alkali ion mobility in the MD simulation – DoubleKx Sep 12 '20 at 0:35
• I will try to see if I can work out something reasonable in the next day or so. I would suggest doing a phonon mode calculation (a reviewer might want to see it) as well as if this is single-crystal XRD have you considered it to be possibly only meta-stable? Is your MD simulation at a higher temperature than it is stable? Your level of theory may also not describe it well. You could use a supercell and see if the site changes coordination in the supercell as well. Not making this an answer because its somewhat side information. – Tristan Maxson Sep 12 '20 at 0:53