User Tools

Site Tools


nwchem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
nwchem [2017/09/14 20:12]
jokinsey created
nwchem [2017/09/14 20:46]
jokinsey Added NWChem page, along with environment setup and example job listings.
Line 1: Line 1:
 ====NWChem==== ====NWChem====
  
-NWChem is a scalable computational tool for large scale molecular simulations. Along with computational chemistry the package also inculdes quantum chemical and molecular dynamics functionality. It was developed at the [[https://​en.wikipedia.org/​wiki/​Pacific_Northwest_National_Laboratory|Pacific Northwest National Labratory]]. More documentation is avaliable at the [[http://​www.nwchem-sw.org/​index.php/​Main_Page|NWChem main page]]. ​+NWChem is a scalable computational tool for large scale molecular simulations. Along with computational chemistry the package also inculdes quantum chemical and molecular dynamics functionality. It was developed at the [[https://​en.wikipedia.org/​wiki/​Pacific_Northwest_National_Laboratory|Pacific Northwest National Labratory]]. More documentation is avaliable at the [[http://​www.nwchem-sw.org/​index.php/​Main_Page|NWChem main page]]. 
 + 
 +====Enviornment Setup==== 
 + 
 +First add these modules to your ''​.bashrc''​ file to satisfy the dependencies for and load NWChem itself.  
 + 
 +<​code>​ 
 +module load intel/​12.1.5  
 +module load mvapich2/​1.8  
 +module load mkl/12.1.5  
 +module load nwchem 
 +</​code>​ 
 + 
 +Also two environmental variables are needed to adjust the behavior of MVAPICH2 library. Add these two lines to your $HOME/​.bashrc file. 
 + 
 +<​code>​ 
 +export MV2_ENABLE_AFFINITY=0 
 +export IPATH_NO_CPUAFFINITY=1 
 +</​code>​ 
 + 
 +Additionally,​ NWChem looks for a $HOME/​.nwchemrc file which specifies the location of the basis library and force field parameters. To use the preconfigured default nchemrc file run: 
 + 
 +<​code>​ 
 +razor-l1:​jokinsey:​~$ ln -s /​share/​apps/​NWChem/​nwchem-6.1.1/​data/​default.nwchemrc ~/​.nwchemrc 
 +</​code> ​  
 + 
 +This links the default nchemrc file to your ''​$HOME''​ directory so NWChem knows where to find the file 
 + 
 +====Example Job==== 
 + 
 +Create a directory ''​NWCHEM-JOBS''​ to store the output from the example. A set of example input files is located in ''/​share/​apps/​NWChem/​nwchem-6.1.1/​examples''​ directory. We'll use the ''​benzene.nw''​ example. Copy the input file to your ''​$HOME/​NWHCEM-JOBS''​ directory. This example uses a separate file to store geometry of the molecule ''​benzene.pdb''​ which also needs to be copied. 
 + 
 +<​code>​ 
 +razor-l1:​jokinsey:​~$ mkdir NWCHEM-JOBS 
 +razor-l1:​jokinsey:​~$ cp /​share/​apps/​NWChem/​nwchem-6.1.1/​examples/​md/​benzene/​benzene.* ~/​NWCHEM-JOBS 
 +</​code>​ 
 + 
 +Edit the ''​benzene.nw''​ file to specify the scratch directory. 
 + 
 +<​code>​ 
 +start benzene 
 + 
 +scratch_dir /​scratch/​YourUserNameHere 
 + 
 +prepare 
 + ​system benzene_em 
 + ​new_top new_seq 
 + ​solvate 
 +end 
 + 
 +task prepare 
 + 
 +md 
 + ​system benzene_em 
 + sd 100 
 +end 
 + 
 +task md optimize 
 + 
 +task shell "cp benzene_em.qrs benzene_md.rst"​ 
 + 
 +md 
 + ​system benzene_md 
 + data 100 
 + ​isotherm 
 + ​isobar 
 + print step 10 stat 100 
 +end 
 + 
 +task md dynamics 
 +</​code>​ 
 + 
 +In the directory contianing the benzene.nw input file, create an PBS script and name it nwchem.pbs. 
 + 
 +<​code>​ 
 +#PBS -N nwchem 
 +#PBS -q tiny12core 
 +#PBS -j oe 
 +#PBS -o nwchem.$PBS_JOBID 
 +#PBS -l nodes=1:​ppn=12 
 +#PBS -l walltime=1:​00:​00 
 + 
 +cd $PBS_O_WORKDIR 
 +NP=$(wc -l < $PBS_NODEFILE) 
 + 
 +mpirun -np $NP -machinefile $PBS_NODEFILE nwchem benzene.nw > benzene.out 
 +</​code>​ 
 + 
 +Then submit the job to be run in the queue ''​tiny12core''​ which we specified in the PBS file. 
 + 
 +<​code>​ 
 +razor-l1:​jokinsey:​~/​NWCHEM-JOBS$ qsub nwchem.pbs 
 +</​code>​ 
 + 
 +The job will produce several files . benzene.out as specified in the PBS input script will contain the most relevant output. 
 + 
nwchem.txt · Last modified: 2017/10/12 17:49 by jokinsey