1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
.. module:: ase.calculators.crystal
=========
CRYSTAL14
=========
Introduction
============
The CRYSTAL_ simulation package is a Hartree-Fock and density
functional theory code using Gaussian localized basis functions.
CRYSTAL_ can handle systems periodic in 0 (molecules, 0D), 1 (polymers, 1D),
2 (slabs, 2D), and 3 dimensions (crystals, 3D).
This interface makes possible to use CRYSTAL_ as a calculator
in ASE.
.. _CRYSTAL: http://www.crystal.unito.it/
Environment variables
=====================
Set environment variables in your configuration file (what is the name
of the command to be run). It is mandatory to set the input file as
"INPUT" and the standard output as "OUTPUT".
- bash::
$ export ASE_CRYSTAL_COMMAND="/bin/CRY14/crystal < INPUT > OUTPUT 2>&1" (an example)
- csh/tcsh::
$ setenv ASE_CRYSTAL_COMMAND "/my_disk/my_name/bin/crystal < INPUT > OUTPUT 2>&1" (an example)
CRYSTAL Calculator (a FileIOCalculator)
=======================================
The calculator calls the CRYSTAL_ code only
to perform single point and gradient calculations.
The file 'fort.34' contains the input geometry and
the 'fort.20' contains the wave function in a binary
format.
Below follows a list with a selection of parameters.
============== ========= =============== ============================
keyword type default value description
============== ========= =============== ============================
``restart`` ``bool`` None Restart old calculation
``xc`` various 'HF' Hamiltonian. HF, MP2 or DFT
methods available
``spinpol`` ``bool`` False Spin polarization
``guess`` ``bool`` True Read wf from fort.20 file
when present
``basis`` ``str`` 'custom' Read basis set from
basis file
``kpts`` various None or (1,1,1) **k**-point sampling if
calculation is periodic
``isp`` ``int`` 1 Density of the Gilat net
with respect to Monkhorst-
Pack
``smearing`` ``float`` None Smearing. Only Fermi-Dirac
available
``otherkeys`` ``list`` [] All other CRYSTAL keywords
============== ========= =============== ============================
For parameters not set in ``otherkeys`` CRYSTAL_ will set the default value.
See the official `CRYSTAL manual`_ for more details.
.. _CRYSTAL manual: http://www.crystal.unito.it/Manuals/crystal14.pdf
Exchange-correlation functionals
================================
The ``xc`` parameter is used to define the method used for the
calculation. Available options are Hartree-Fock ('HF'), second order
perturbation theory ('MP2') and the density-functional theory where ``xc``
defines the exchange and correlation functional. In the latter case
a single string defines a standalone functional (see `CRYSTAL manual`_),
a tuple of strings set the first string as EXCHANGE and the second
string as 'CORRELAT' (see `CRYSTAL manual`_ for more details).
.. code-block:: python
calc = CRYSTAL(xc=('PBE','LYP'))
Setups
======
The CRYSTAL_ simulation package has few built-in basis sets, which
can be set in the calculation using the ``basis`` parameter, e. g.:
.. code-block:: python
calc = CRYSTAL(xc='PBE', basis='sto-3g')
The default is to read from an external basis set. A library of
basis sets in CRYSTAL_ format can be found on the
website `CRYSTAL basis sets`_.
.. _CRYSTAL basis sets: http://www.crystal.unito.it/basis-sets.php
In this case a file named 'basis' must be present in the working directory
and must contain the basis sets for all the atom species.
.. note::
The CRYSTAL_ simulation package allows to set up to three different
all electron basis sets and/or two valence electron basis sets for
the same atomic species (see `CRYSTAL manual`_ page 21 for more details).
The number to be added to the atomic number reported in the 'basis'
file must be specified as an ``Atoms()`` class tag:
>>> geom[0].tag = 100
In this case '100' will be summed to the atomic number of the first atom
in the 'fort.34' geometry file (e. g. '6', Carbon, becomes '106').
Spin-polarized calculation
==========================
If the atoms object has non-zero magnetic moments, a spin-polarized
calculation will be performed by default.
It is also possible to manually tell the calculator to perform a
spin-polarized calculation through the parameter ``spinpol``:
.. code-block:: python
calc = CRYSTAL(xc='PBE', spinpol=True)
Brillouin-zone sampling
=======================
Brillouin-zone sampling is controlled by ``kpts``. This parameter
can be set to a sequence of three int values, e.g. (2, 2, 3),
which define a regular Monkhorst-Pack grid. If it is not defined a
``gamma`` calculation will be performed.
For 2D calculations ``kpts[2]`` will be to set to one, for 1D ones
also ``kpts[1]`` will be set to unity.
For molecular calculations (0D) any definition of the ``kpts``
parameter will be ignored.
The ``isp`` parameter can be used to define the relative
density of the auxiliary Gilat net (see `CRYSTAL manual`_):
.. code-block:: python
calc = CRYSTAL(xc='PBE', kpts=(2, 2, 2), isp=2)
In this example the resulting Gilat net would be (4, 4, 4).
Reading an external wave function
=================================
The calculator reads by default the wave function stored in
the 'fort.20' file if present (``guess=True``).
If this parameter is set to False the code will calculate the
wave function from scratch at any step, slowing down the performances.
Code related keywords
=====================
The CRYSTAL_ simulation package allows for many other keywords.
Most of them can be specified through the ``otherkeys`` parameter.
.. code-block:: python
calc = CRYSTAL(xc='PBE', otherkeys=['scfdir', 'anderson',
['maxcycles', '500'],
['toldee', '6'],
['tolinteg', '7 7 7 7 14'],
['fmixing', '90']])
|