I am studying the magnetic properties of bulk ZnO, so I am doping it with transition metal elements in order to observe the magnetic spectrum. I replace a Zn atom with a transition metal element at different positions (first nearest neighbor, second nearest neighbor ...) at different concentrations. So the distance between atoms is very important in this study. The problem is I don't know how to relax my structure because after the vc-relax calculation all the atoms change the position and the transition element which I consider as the second-neighbor becomes the first-neighbor! I don't know exactly how can I optimize my structure?

In the attachment below, the Vanadium atom is chosen to be the second neighbor of the other vanadium atom (here I have dopped with two vanadium atoms) but after the vc-relax the position changes in a way that it becomes the first nearest neighbor! Does the optimization of cell parameters (i.e running test convergence on a and c parameters) is enough even if it is a supercell?

Doped Zinc oxide

  • 1
    $\begingroup$ Welcome to our site! $\endgroup$
    – Camps
    Feb 17, 2021 at 22:14
  • $\begingroup$ A figure showing what your starting guess and final structure is would be helpful $\endgroup$ Feb 18, 2021 at 6:35
  • $\begingroup$ Is this also your account? I can merge these together for you, we generally prefer users to only have one account on a given site $\endgroup$
    – Tyberius
    Feb 18, 2021 at 16:28

1 Answer 1


Yes, you can! In the Quantum ESPRESSO input file, in the "ATOMIC_POSITIONS" card, you have to present the atom name and its coordinates, something like:


    Atom_name  x_atom  y_atom  z_atom

There are three default variables: if_pos(1), if_pos(2), and if_pos(3) set to unity, acting as weights for the force. So to keep the atomic position unchanged during the relaxation process, change them to zero (for the atoms you want to keep still). Something like this:


    Atom_name  x_atom  y_atom  z_atom 0 0 0
  • $\begingroup$ I want to note that if you only fix a single atom, the structure will effectively be unconstrained. You need to fix at least a bond or two and this should work. $\endgroup$ Feb 23, 2021 at 3:15
  • $\begingroup$ thank you for your suggestion, I will try it $\endgroup$ Feb 24, 2021 at 12:04

You must log in to answer this question.

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