I am trying to relax my model's structure by letting some atoms could move freely along some specific direction, in VASP, I could set selective dynamics, but it seems I could only adjust the freedom along with three different lattice directions, so what should I do if I wanna choose a special direction?

+11.8767995834  +0.0000000000  +0.0000000000 
 +0.0000000000 +13.1613998413  +0.0000000000 
 +0.0000000000  +0.0000000000 +33.4453010559 
Ti O H C
 64 128 8 8
 +0.1250000000  +0.2500000000  +0.1880100070  F F F
 +0.1250000000  +0.0000000000  +0.2863900070  F F F
 +0.1250000000  +0.2500000000  +0.3847799900  T T T
 +0.1250000000  +0.0000000000  +0.4831599890  T T T
 +0.0000000000  +0.0000000000  +0.1880100070  F F F
 +0.0000000000  +0.2500000000  +0.2863900070  F F F

  • 1
    $\begingroup$ The only way to do that , orient your crystal in such a way the relaxation direction lies along X, Y or Z. If I am not wrong you are trying to avoid shear distortion on doing so. $\endgroup$ Commented Jan 7, 2022 at 13:24

1 Answer 1


This is related to your other question, you are correct VASP only supports fixing atoms along the X, Y, and Z axis. You can use ASE optimizers with the FixLine or FixPlane constraints to do this. You just specify which atoms are constrained and which direction they are constrained to move in.

Just be aware, ASE running VASP is slower than VASP running its own optimizer. You can offset this by outputting the CHGCAR/WAVECAR or by using the VaspInteractive calculator in ASE if the cell is not changing.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .