ITS/High Performance Computing Cluster/help on MOLCAS

[edit] MOLCAS on the ITS HPC Cluster

MOLCAS is a quantum chemistry application developed at and distributed by Lund University in Sweden. MOLCAS is a research product and it is used as a platform by the Lund quantum chemistry group in their work to develop new and better computational tools in quantum chemistry. For more background information on MOLCAS, please see the introduction here. Version 6.4 in installed on the ITS cluster.

To use MOLCAS on the ITS HPC cluster, you need to give the following command to the shell to load the molcas module:

   module load molcas

Documentation on MOLCAS is available here.


[edit] MOLCAS Batch Script

To running MOLCAS on the ITS HPC cluster, you need to specify the required MOLCAS variables, and because of the large amount of I/O, you should run any MOLCAS job on the same computer node as the processor executing the I/O operations. The latter will help the overall performance. MOLCAS's online manual Chapter 2.2.6 has list of all variables.


The following is an example of PBS script for MOLCAS. (Tip: Set your WorkDir variable different than your HomeDir variable because MOLCAS saves a lot of its scratch files. Also all memory and disk space are specified in Megabytes.)

#!/bin/sh
#PBS -N yourjobname
#PBS -l nodes=1:ppn=1
#PBS -l walltime=24:00:00
#PBS -j oe 
mkdir /tmp/$USER.$JOBID  
cp inputfile.inp /tmp/$USER.$JOBID  
cd /tmp/$USER.$JOBID  
module load molcas 
export MOLCAS=/usr/local/molcas/molcas64
export HomeDir=$PWD
export Project=yourjobname
export WorkDir=$HomeDir/yourjobdir
export MOLCASMEM=500
export MOLCASDISK=2000
molcas inputfile.inp > outputfile.out 2> errorfile.err  
cp -a /tmp/$USER.$JOBID $HOME  
rm –rf /tmp/$USER.$JOBID  
module unload molcas 


[edit] MOLCAS Basics

MOLCAS input files are slightly more complex than other quantum chemistry programs in that it requires familiarity with the interdependences of individual modules, however don't be discouraged by this statement because dependences are relatively easy to learn, logical, and in the more complex situation MOLCAS 6.4 or higher will automatically run the required modules. MOLCAS's online manual Chapter 5-7 has a detailed tutorial.


An example input file for Hartree-Fock energies on water is the following: (Note: Lines beginning with an asterisk (*) are not read by MOLCAS.)

*Run Seward module
*Seward calculates the one and two electron integrals
 &SEWARD &END
*Title job
Title
 H2O RHF
*Molecule and Basis Set
*Each type of atom must have it's own Basis Set/End of Basis command
Basis Set
*This states the type atom and Basis Set with number of atomic orbitals
O.6-31G...3s2p.
*MOLCAS 6.4 only use Cartesian coordinates for atom position 
*Default is unit in Bhors, however here Angstroms are specified
 O    0.03368800    0.00000000    0.02772000 angstrom
*End the Basis Set input for this atom
End of Basis
Basis Set
H.6-31G...2s.
 H1   0.02263700    0.00000000    0.97729200 angstrom
 H2   0.92095500    0.00000000   -0.31071300 angstrom
End of Basis
*End of Seward module input
End of Input
*Run SCF module
*SCF calculates HF or DFT wavefuctions
*Default is to run HF but DFT can be ran with the KSDFT command
 &SCF &END
Title
 H2O RHF
*End of SCF module input
End of Input

Previous example without asterisks

 &SEWARD &END
Title
 H2O RHF
Basis Set
O.6-31G...3s2p.
 O    0.03368800    0.00000000    0.02772000 angstrom
End of Basis
Basis Set
H.6-31G...2s.
 H1   0.02263700    0.00000000    0.97729200 angstrom
 H2   0.92095500    0.00000000   -0.31071300 angstrom
End of Basis
End of Input
 &SCF &END
Title
 H2O RHF
End of Input

An example input file for a Stateaveraged CASSCF ground state geometry optimization of trans-diphosphene is the following: (Note: See MOLCAS online manual Chapter 3.26 RASSCF for more details and commands. Lines beginning with an asterisk (*) are not read by MOLCAS.)

*For a geometry optimization a loop must be specified 
*and the maximum number of iterations (maxiter)
>>> Set output file
>>> Set maxiter 50
>>> Do while
*Run Seward, Here we are using ANO-RCC orbitals with a double zeta polarized basis set
 &SEWARD &END
Title
 t-HPPH opt
Basis set
P.ANO-RCC...4s3p1d.
 P1    0.0026000000    0.0000000000   -0.0625000000 angstrom
 P2   -0.0026000000    0.0000000000    2.0125000477 angstrom
End of basis
Basis set
H.ANO-RCC...2s1p.
 H3    1.4421000481    0.0000000000   -0.1611000001 angstrom
 H4   -1.4421000481    0.0000000000    2.1110999584 angstrom
End of basis
End of Input
*With CASSCF, orbitals must be calculated first to set the active space for CASSCF.
*So we are using an IF clause for the 1st iteration to calculating HF orbitals 
*followed by the RASSCF module which calculates the CASSCF wavefunction.
*Instead of this method, you could use orbitals from a previous job.
>>> IF ( Iter = 1 ) <<<
 &SCF &END
TITLE
 t-HPPH opt
END OF INPUT
 &RASSCF &END
*LUMORB specifies to use orbitals calculated by the SCF module.
LUMORB
TITLE
 t-HPPH opt
*SYMMETRY specifies the symmetry for the state. 
*Here we are not using symmetry thus only symmetry is A.
*However, if we used symmetry such as C2 point group
*there would be A and B symmetry states.
*If you wanted A symmetry state, then you would specify 1.
*If you wanted B symmetry state, then you would specify 2. 
SYMMETRY
1
*SPIN specifies spin multiplicity. 
*1=singlet, 2=doublet, 3=triplet...
SPIN
1
*INACTIVE specifies inactive orbitals.
*Here the 10 lowest orbitals are inactive.
INACTIVE
 10
*RAS2 specifies active orbitals for CASSCF. 
*Here we have 10 active orbitals above the inactive set.
*RAS1 and RAS3 are only included for a RASSCF job. 
*Here we are doing CASSCF. thus we don't use RAS1 and RAS3.
RAS2
 10
*NACTEL specifies active electrons
*Here the 12 highest electrons are active.
*The 2nd and 3rd numbers are set to zero 
*because they specify the electrons and holes for a RASSCF job.
NACTEL
 12 0 0
*CIROOT specifies number of states calculated.
*The 1st value specifies number of CI roots to be calculated. 
*Here the 5 states lowest are calculated.
*The next two values specifies the weighting factors for the states.
*All states are weighted with 1/5. 
CIROOT
 5 5 1
End of Input
*! allows you to use bash commands.
*Here we are copying the CASSCF wavefunction into the JobOld.
*This is done because RASSCF will look for the JobOld for the wavefunction during the loop.
!cp $Project.JobIph $Project.JobOld
*End IF clause
>>> ENDIF <<<
*Re-Run RASSCF outside of IF clause
 &RASSCF &END
*JOBIPH specifies the RASSCF module to look for JobOld
JOBIPH
CIRESTART
TITLE
 t-HPPH opt
SYMMETRY
1
SPIN
1
INACTIVE
 10
RAS2
 10
NACTEL
 12 0 0
CIROOT
 5 5 1
*RLxroot specifies what state to optimize the geometry.
*Here we want the ground state structure.
RLxroot
1
End of Input
!cp $Project.JobIph $Project.JobOld
*ALASKA and SLAPAF are the modules that calculates the gradients for optimization.
*Here no additional commands are needed.
 &ALASKA &END
End of input
 &SLAPAF &END
End of input
*End loop
>>> EndDo
*RASSI module calculates oscillator strengths.
 &RASSI &END
NR of JOBIPHS
 1 5
 1 2 3 4 5
End of Input

Previous example without asterisks

>>> Set output file
>>> Set maxiter 50
>>> Do while
 &SEWARD &END
Title
 t-HPPH opt
Basis set
P.ANO-RCC...4s3p1d.
 P1    0.0026000000    0.0000000000   -0.0625000000 angstrom
 P2   -0.0026000000    0.0000000000    2.0125000477 angstrom
End of basis
Basis set
H.ANO-RCC...2s1p.
 H3    1.4421000481    0.0000000000   -0.1611000001 angstrom
 H4   -1.4421000481    0.0000000000    2.1110999584 angstrom
End of basis
End of Input
>>> IF ( Iter = 1 ) <<<
 &SCF &END
TITLE
 t-HPPH opt
END OF INPUT
 &RASSCF &END
LUMORB
TITLE
 t-HPPH opt
SYMMETRY
1
SPIN
1
INACTIVE
 10
RAS2
 10
NACTEL
 12 0 0
CIROOT
 5 5 1
End of Input
!cp $Project.JobIph $Project.JobOld
>>> ENDIF <<<
 &RASSCF &END
JOBIPH
CIRESTART
TITLE
 t-HPPH opt
SYMMETRY
1
SPIN
1
INACTIVE
 10
RAS2
 10
NACTEL
 12 0 0
CIROOT
 5 5 1
RLxroot
1
End of Input
!cp $Project.JobIph $Project.JobOld
 &ALASKA &END
End of input
 &SLAPAF &END
End of input
>>> EndDo
 &RASSI &END
NR of JOBIPHS
 1 5
 1 2 3 4 5
End of Input


This article is a stub. You can help by adding to it.

ITS High Performance Cluster Articles
This article is part of the ITS Cluster series of articles
FAQ | Intel compilers | GNU compilers | Portland Group compilers
Intel Math Kernel Library | MINPACK | ScaLAPACK | GSL | FFTW3 | MPICH | NAG
R | Mathematica | NAMD | GROMACS | Amber | MATLAB
FLUENT | GAMESS | Gaussian | MOLCAS | LAMMPS | APBS

Case Referrers

Blog Entries
Other Sites
This page has been accessed 3,895 times.
This page was last modified 15:07, January 9, 2008 by John Payton.
About | Disclaimers