Posts

Showing posts from December, 2019

Passwordless SSH

It is quite convenient to ssh without password typing. In order to do this 1) You first need to create a your own KEY file by ssh-keygen There will be several questions once you execute above command. But simply disregard them all and hit return key. Now you create a your own KEY file in the current computer. 2) Now you need to copy the KEY to the computer to which you want to ssh. For example, if you want to connect to the computer hostname of i9k1, ssh-copy-id -i ~/.ssh/id_rsa.pub your_login_ID@i9k1 You need to replace your_login_ID with your real login ID. 3) You can even create an alias in your .cshrc as alias i9k1 'ssh your_login_ID@i9k1' After source .cshrc, you can login to the computer by i9k1.

Improving SCF convergency of DFT

As compared to HF, DFT density typically converges slowly or often fails to converge. This post describes a general strategy dealing with these situations. GAMESS has two popular SCF convergers of DIIS and SOSCF. The DIIS works well when the density matrix is a bit far from its minimum, while SOSCF is a preferred choice once the density matrix is near to it. In addition, it is generally true that HF converges much better than DFT. Therefore, it is better to start with HF and DIIS. The switch to SOSCF optimizer needs to be activated, once the density is near to its minimum. This can be realized by  $dft DFTTYP=B3LYP SWOFF=1e-6 sg1=.t. $end  $scf couple=.true. alpha(1)=0.5,0.5,0.5 beta(1)=0.5,0.5,0.5    dirscf=.t. diis=.t. soscf=.f. damp=.t. shift=.t.    swdiis=1e-4 $end The important keywords are SWOFF = 1e-6 DIIS=.t. SWDIIS = 1e-4 The SWOFF = 1e-6 ensures that HF is utilized in the SCF cycle until the density change becomes below 1x10^-6. The DIIS=.t. sets the initial op

Determinants or configuration state functions (CSFs)?

Determinants or configuration state functions (CSFs) may be used to form the many electron basis set. A determinant is a simple object: a product of spin orbitals with a given Sz quantum number, that is, the number of alpha spins and number of beta spins are a constant.  Matrix elements involving determinants are correspondingly simple, but unfortunately determinants are not necessarily eigenfunctions of the S**2 operator.     To expand on this point, consider the four familiar 2e-functions which satisfy the Pauli principle.  Here u, v are space orbitals, and a, b are the alpha and beta spin functions.  As you know, the singlet and triplets are:        S1 = (uv + vu)/sqrt(2) * (ab - ba)/sqrt(2)        T1 = (uv - vu)/sqrt(2) *  aa        T2 = (uv - vu)/sqrt(2) * (ab + ba)/sqrt(2)        T3 = (uv - vu)/sqrt(2) *  bb It is a simple matter to multiply out S1 and T2, and to expand the two determinants which have Sz=0,        D1 = |ua vb|          D2 = |va ub| This reveals tha

The ROHF of GAMESS for TDDFT calculation

Unfortunately, there are many definitions of ROHF wavefunction. The Fock matrix in the MO basis has the form                                               closed       open        virtual         closed      F2      |     Fb     | (Fa+Fb)/2                  -----------------------------------         open        Fb      |     F1     |    Fa                  -----------------------------------         virtual   (Fa+Fb)/2 |     Fa     |    F0 where Fa and Fb are the usual alpha and beta Fock matrices any UHF program produces.  All ROHF methods agree on these, as they are the variational conditions that separate the doubly occupied, alpha occupied, and empty orbital spaces. The diagonal blocks can be written                F2 = Acc*Fa + Bcc*Fb                F1 = Aoo*Fa + Boo*Fb                F0 = Avv*Fa + Bvv*Fb Some choices for the canonicalization coefficients to define the diagonal blocks are                           Acc  Bcc  Aoo Boo  Avv  Bvv  Guest and Saunders

The numerical grid point for DFT in GAMESS

Image
You may suffer from SCF convergence problems often. This is mostly related to the Numerical grid of DFT. The default grid of GAMESS is NRAD = 96, NLEB = 302. NRAD is the number of radial spheres, while NLEB-s the angular (Lebedev) grid points on each sphere. These numbers are a bit too high. In fact, the particular numbers should also depend on the types of functionals you use. For example, (50,194) is recommended for hybrid or GGA functionals, which you mostly use for the calculations. I took this table from https://manual.q-chem.com/5.2/Ch5.S5.SS2.html. GAMESS has an option of SG1 in $DFT group. You can set it as SG1=.t. GAMESS recommends its use for the early steps of geometry optimization since it is extremely FAST. But there is confusion. The SG1=.t. in GAMESS is NOT identical to what the Peter Gill recommended above.  The SG1 in GAMESS sets (24, 194), while the above table indicates SG-1 as (50,194). I found a bug in the GAMESS manual, which indicates (24, 194) but wha