-
Notifications
You must be signed in to change notification settings - Fork 18
Running Constrained DFT Calculations
LIO has the capability of running CDFT calculations. As of 2020, this feature is only available in the develop branch, and spin constraints are still somewhat experimental.
In order to run simple CDFT calculations, the following block must be added to the input file outside the &lio namelist:
{CDFT}
N_REGIONS DO_CHARGE DO_SPIN
REGION1_NATOMS REGION1_CHARGE REGION1_SPIN
REGION2_NATOMS REGION2_CHARGE REGION2_SPIN
REGIONN_NATOMS REGIONN_CHARGE REGIONN_SPIN
REGION1_ATOM1 REGION1_ATOM2 REGION1_ATOM3 REGION1_ATOMN
REGION2_ATOM1 REGION2_ATOM2 REGION2_ATOM3 REGION2_ATOMN
REGIONN_ATOM1 REGIONN_ATOM2 REGIONN_ATOM3 REGIONN_ATOMN
{END}
N_REGIONS indicates the number of regions in which to separate the molecule, while DO_CHARGE and DO_SPIN should be 1 if charge and/or spin constraints are desired, or 0 otherwise. REGIONX_NATOMS indicates the number of atoms in a given region, while _CHARGE and _SPIN are the charge and spin constraint values. Those values must be provided even if, for example, a spin constraint is not desired (i.e. providing a dummy 0.0 or any other number). REGIONX_ATOMY are numbers, which indicate the atom index belonging to a given region.
As an example, supose we have the HSOH system, and we wish to constraint the charge of the HS region to 0.5. A possible input file:
{CDFT}
1 1 0
2 0.5 0.0
1 2
{END}
We can also define both regions, i.e. setting the -OH fragment charge to -0.5:
{CDFT}
1 1 0
2 0.5 0.0
2 -0.5 0.0
1 2
3 4
{END}
Which produces the same output as the previous input. If the regions provided in the input DO NOT include all of the system's atoms, LIO will automatically generate an additional region including those atoms. See /test/08_CDFT for another example.
In a mixed CDFT calculation, LIO attempts to calculate the Hab coupling factors between two states A and B. The input is similar to that of a simple CDFT calculation, with a slight twist:
{CDFT}
N_REGIONS DO_CHARGE DO_SPIN DO_MIXED
REGION1_NATOMS REGION1_CHARGE REGION1_CHARGE2 REGION1_SPIN REGION1_SPIN1
REGION2_NATOMS REGION2_CHARGE REGION2_CHARGE2 REGION2_SPIN REGION2_SPIN2
REGIONN_NATOMS REGIONN_CHARGE REGIONN_CHARGE2 REGIONN_SPIN REGIONN_SPINN
REGION1_ATOM1 REGION1_ATOM2 REGION1_ATOM3 REGION1_ATOMN
REGION2_ATOM1 REGION2_ATOM2 REGION2_ATOM3 REGION2_ATOMN
REGIONN_ATOM1 REGIONN_ATOM2 REGIONN_ATOM3 REGIONN_ATOMN
{END}
The only difference lies in the DO_MIXED flag, which should be set to 1, and the _CHARGE2 and _SPIN2 inputs, which correspond to the charge and spin constraints for the second state. Again, even if DO_CHARGE or DO_SPIN are set to 0, you should provide dummy values for the _SPIN2 and _CHARGE2 inputs. To keep with the example above, suppose we want to calculate the Hab coupling element between a state with charge -0.5 in the HS fragment, and one with the same charge set to 0.5. The input should be:
{CDFT}
1 1 0 1
2 0.5 -0.5 0.0 0.0
1 2
{END}
Or, if we want to explicitly define both regions:
{CDFT}
1 1 0
2 0.5 -0.5 0.0 0.0
2 -0.5 0.5 0.0 0.0
1 2
3 4
{END}
LIO prints the orthogonalized Hab values in both mEh and meV in the standard output file.