I would like to construct the supercell that contains explicit 4 ionic liquid molecules (i.e. $[EMIM][BF_{4}]$) for running AIMD. Is there any recommended software or code that is suitable and easy to generate the structure? I am not sure that Atomic Simulation Environment can help since it usually focuses on the solid structure.
2 Answers
1. Using ASE GUI
You can utilize ase gui to build supercell manually. Open ASE GUI window with two molecules (for example ase gui emim.xyz bf4.xyz
). Then create new window and create a unit cell, copy & paste the molecules, rotate & move to fit the cell.
2. Using packmol
packmol
is actually more common tool for this kind of task. It randomly packs molecules in simulation box.
For AIMD simulation you should be careful because packmol does not support PBC. So if the desired size of supercell is 15 x 15 x 15
, it is recommended to pack molecules in slightly smaller box and set periodic unit cell later.
For example, the input file pack.inp
looks like:
filetype xyz
tolerance 2.0 # intermolecular distance limit
output supercell.xyz
# 4 emim and 4 bf4 inside 13 x 13 x 13 box
structure emim.xyz
number 4
inside box 0. 0. 0. 13. 13. 13.
end structure
structure bf4.xyz
number 4
inside box 0. 0. 0. 13. 13. 13.
end structure
Now you can impose PBC using ASE:
import ase.io
import ase.build
atoms = ase.io.read("supercell.xyz")
atoms.cell = [15, 15, 15]
atoms.pbc = [True, True, True]
atoms.center() # Just for easy visualization
# If you use VASP:
atoms = ase.build.sort(atoms)
atoms.write("POSCAR")
```
-
$\begingroup$ Thank you for your help! So, if I want to put some interfaces (e.g. Cu, Au, Ag) with the built solution, how should I do? $\endgroup$ Jul 11 at 4:31
-
$\begingroup$ @TommyWang I'm not sure but you could try confining the simulation box within specific range of z coordinates, (ex.
inside box 0. 0. 6. 13. 13. 13
) and combine with interface slab model (with vacuum). $\endgroup$– mjhongJul 12 at 1:33
You might find the Avogadro software (old v1.20) useful for this work. You can create a specified cell (Crystallography>>Add unit cell) and copy and paste the structures you might already have (in xyz format), or create those in another window of Avogadro, pre-relax it using the classical fields available in Avogadro and copy-paste it inside the cell.
Be careful of periodic boundaries as the molecules might be very close to each other in the images.
-
$\begingroup$ +1 but why only the old version of Avogadro? $\endgroup$ Jul 12 at 21:21
-
$\begingroup$ From what I have seen, the minimizer has not yet been added to the new version and is currently under active development. Therefore your experience may not be smooth and might be tricky to figure out as you are starting out. $\endgroup$ Jul 20 at 15:45