3.2. Example: CO2 Crystal

Tip

The sample input and output files can be found in testfiles/1-co2.

In this first example, we will try to predict the crystal structure of $$\text{CO}_2$$.

3.2.2. Check the Output

We can now open sys.out. You can go to Optimization Results to check the may results:

sys.out
 1 #         Energy          Vcell        Density      Space   ID    Bravais  Good?
2         (kJ/mol)         (AA^3)       (g/cm^3)      Group         Lattice
3 0      -107.7403       169.5847         1.7237       Pa-3  205         cP      Y
4 1      -107.6989       169.5989         1.7235       Pa-3  205         cP      Y
5 2      -107.6493       169.6153         1.7233       Pa-3  205         cP      Y
6 3      -107.4886       169.6683         1.7228       Pa-3  205         cP      Y
7 4      -106.8056       169.9081         1.7204       Pa-3  205         cP      Y
8 5      -106.3587       170.0616         1.7188       Pa-3  205         cP      Y
9 6      -104.1541       168.7669         1.7320     Pca2_1   29         oP      Y
10 7      -103.3376       170.5019         1.7144       Pnnm   58         oP      Y
11 8      -103.3130       170.5116         1.7143       Pnnm   58         oP      Y
12 9      -102.5955       170.8538         1.7109       Pnnm   58         oP      Y
1310       -96.5469       168.6160         1.7336       Pbca   61         oP      Y
1411       -94.2686       177.0464         1.6510     P2_1/c   14         mP      Y
1512       -94.2302       177.0638         1.6508     P2_1/c   14         mP      Y
1613       -94.0207       177.1590         1.6500     P2_1/c   14         mP      Y
1714       -92.9351       167.4234         1.7459        P-1    2         aP      Y
1815       -92.4825       175.7740         1.6630     P2_1/c   14         mP      Y


Let’s see line 3:

0      -107.7403       169.5847         1.7237       Pa-3  205         cP      Y

• The 1st index means that this structure corresponds to file sys/0.crystal/xyz/gjf/cif.

• The 2nd number is the enthalpy: -107.7403 kJ/mol.

• The 3rd number is the cell volume: 169.5847 Angstrom 3.

• The 4th number is the density: 1.7237 g/cm 3.

• The 5th string is the space group name international symbol: Pa-3, i.e., $$\text{Pa}\bar{3}$$.

• The 6th number is the space group ID: 205.

• The 7th string is the Bravais lattice symbol: cP (primitive cubic lattice).

3.2.3. Visualization of Structures

The structures can be visualized in different ways.

XYZ file does not contain cell information. It only contains Cartesian coordinates and can be used in, e.g., molecular dynamics.

GIF file contains both atomic and cell information and can be visualized with GaussView. All molecules can be shown in a wrapped way.

CIF file is the standard crystal file. If can be viewed with Vesta and GaussView, but molecules may not be wrapped.

Below is a summary of visualization of structure sys/0.xyz/gjf/cif.

3.2.4. DFT Calculations

The energy in ABCrystal is caluclated with CHARMM force field. A better energy estimation way is to use density functional theory. Here, we will use CP2K to do a PBE-D3 calculation for 2 crystal structures.

1. Copy misc/crystal-cp2k-dft.inp to a suitable path, say, cp2k-calcs, and change the name to 0.inp and 11.inp

2. We want to see structure 0 and 11 energy difference. Copy sys/0.cif and sys/11.cif to cp2k-calcs.

3. Open 0.inp, and change @SET sysname line to

@SET sysname 0

1. In &SUBSYS ... &END SUBSYS, you cna add corresponding basis set and pseudopotential. In &DFT ... &END DFT, you can change the calculation method. Here, nothing needs to be changed.

2. In &CELL_OPT ... &END CELL_OPT, you can change pressure, symmtery constraint, etc. according to your need.

3. After editting 0.inp, run the calculation:

cp2k -i 0.inp -o 0.out

1. Run the calculation for 11 in a similar way.

When the calculations are finished, the optimized atomic position is in 0/11-pos-1.xyz, and cell information is in 0/11.out. We can compare their results:

Method

CHARMM

PBE-D3

E(11)-E(0) (kJ/mol)

13.47

15.91

Cell volume 0 (Angstrom 3)

169.58

164.33

Cell volume 11 (Angstrom 3)

177.05

178.39

The structures are shown below: