At real situation, it can happen, that a crystal can have defects, for instance, some of them are point defects — Schottky, Frenkel defects, line defects — dislocations, planar defects — grain boundaries, twin boundaries. So is there a free software that can help to model a crystal structure with defects to get afterwards crystal nodes coordinates to prepare input file for a calculation, for example, in the Quantum Espresso? Or maybe is there some free Python scripts to model these things with or without visualization?

  • 3
    $\begingroup$ Not really an answer as it's out-of-the-box usable, but the ASE library for Python is very useful for preapring such input files, and even running the engines themselves. However, you need to do the calculation and coding yourself if you want to prepare defects/dislocations, it's not a "drag-and-drop" level stuff. $\endgroup$
    – Neinstein
    Commented Apr 17, 2023 at 12:12

1 Answer 1


For point defects like a Schottky pair, you can get the defect formation energies from DFT calculations at 0 K or from AIMD calculations at finite temperatures. For these, you can use codes like VASP or Quantum ESPRESSO. The uncertainty in these calculations is typically in the range of a few tenths of eV.

VASP or Quantum ESPRESSO inputs/outputs are visualized using VESTA or XCrySDen.

If you have a really good interatomic potential, e.g., a modified embedded-atom method (MEAM) potential, or an angular-dependent potential (ADP), you can also get point defect formation energies from MD simulations employing codes like LAMMPS. The uncertainty in these calculations is typically in the range of 1-3 eV. Bigger uncertainty just means your potential is not suitable for this kind of calculation.

For 1-D defects (e.g., dislocations) and 2-D defects (e.g., grain boundaries), LAMMPS is typically used to get the linear/interfacial energies of these defects.

LAMMPS inputs/outputs are visualized using OVITO or VMD. For OVITO, you may need to use some modifications (e.g., Atomic Strain and then Color Coding) to be able to see 1-D and 2-D defects.

For 3-D defects, typically people resort to phase-field modeling, using codes like MOOSE. These calculations usually take many inputs from experiments and DFT/MD calculations.

MOOSE outputs are visualized using PraraView or MOOSE's built-in software Peacock.

Except for VASP, all these tools are free. OVITO has a free version and a Pro version.

  • 3
    $\begingroup$ +1 from me but I think the OP didn’t ask about codes like vasp, QE, or LAMMPS. It seems to me that the OP asked for tools that can prepare input files for the mentioned codes in case of defects (if OP didn’t mean it, then I will ask a different question :) ). For pristine material, and for slab, we already have many such input generators. But for materials with defect I dont see such handy tools $\endgroup$ Commented Apr 17, 2023 at 10:59
  • $\begingroup$ @Mohamed Thanks for the answer! In every software of which you mentioned it needs to build a supercell to model defects, do it? $\endgroup$
    – SFriendly
    Commented Apr 18, 2023 at 10:14
  • 1
    $\begingroup$ In VASP, Quantum ESPRESSO, and LAMMPS, yes, you need to include a supercell as part of the input file(s). In MOOSE, you just build a polycrystal that is agnostic to the atomic nature of the material. $\endgroup$
    – Mohamed
    Commented Apr 19, 2023 at 20:53
  • $\begingroup$ @Mohamed Thanks to the comment! The potentials needed for correct modeling crystals with defects have special forms to be different from usual pseudopotentials used in computing monocrystals, do they? $\endgroup$
    – SFriendly
    Commented Apr 20, 2023 at 3:53
  • $\begingroup$ @SFriendly I'm not sure whether or not those follow-up questions are more appropriate as new posts or as comments here. Comments are "temporary post-it notes" and you won't get informed when they get deleted. $\endgroup$ Commented Jun 13, 2023 at 21:52

You must log in to answer this question.

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