Difference between revisions of "HowTo:nwchem"
(→Gaussian) |
(→NWChem) |
||
Line 1: | Line 1: | ||
= NWChem = | = NWChem = | ||
− | This is a short | + | This is a short help file on using the parallel electronic-structure code "NWChem" on systems at the Centre for Advanced Computing. This software uses MPI as a message-passing system and is (in principle) able to run on an arbitrary number of processors. Its ability to perform a very broad spectrum of molecular-structure calculations, ranging from CI to ab-initio molecular dynamics, makes it an interesting alternative to the standard electronic structure code Gaussian. |
{| style="border-spacing: 8px;" | {| style="border-spacing: 8px;" | ||
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" | | | valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" | | ||
Line 29: | Line 29: | ||
<pre>use nwchem</pre> | <pre>use nwchem</pre> | ||
which will set you up automatically. | which will set you up automatically. | ||
+ | |} | ||
+ | {| style="border-spacing: 8px;" | ||
+ | | valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#f7f7f7; border-radius:7px" | | ||
− | == | + | == Running NWChem from a command line== |
− | + | Like other electronic-structure programs, NWChem is run by supplying an input file that defines the system on which to perform a calculation (usually a molecule, or a group of molecules), and the method to use (i.e., the level of calculation, such as "Hartree-Fock", the basis set, and other details of the computation). | |
− | + | The variety of possible calculations is great, and so is the complexity of systems. It is impossible for us here to explain the format that a NWChem input file needs to have. This is explained in the [http://www.nwchem-sw.org/index.php/Release62:NWChem_Documentation User's Manual] which is available online. | |
− | + | Here, we provide a simple sample input file which should be given the file extension .nw. | |
− | <pre> | + | <pre> |
+ | start h2o | ||
− | + | title "H2O, cc-pVDZ basis, SCF optimized geometry" | |
− | + | geometry units au | |
+ | H 0.0000000000 1.4140780900 -1.1031626600 | ||
+ | H 0.0000000000 -1.4140780900 -1.1031626600 | ||
+ | O 0.0000000000 0.0000000000 -0.0080100000 | ||
+ | end | ||
− | + | basis | |
− | + | H library cc-pVDZ | |
− | + | O library cc-pVDZ | |
− | + | end | |
− | + | ||
− | + | scf | |
+ | thresh 1.0e-8 | ||
+ | end | ||
− | + | task scf | |
+ | </pre> | ||
− | + | This extension may be omitted when calling the program. NWChem creates typically a whole array of output files that are documented in the User's Manual. A general log is displayed on the console, and may be saved in a file by redirecting the standard output: | |
− | <pre> | + | <pre>nwchem sample > sample.log</pre> |
− | + | where we assume that your input file is called sample.nw and you want to save the log to a file sample.log. | |
− | + | Note that this is just the basic syntax of the program call. In practise you will use a parallel environment to execute the program (see next section). In fact, executing NWChem by just typing the above line will run it in serial mode. | |
− | + | == Parallel Runs == | |
− | + | NWChem is inherently parallelized and designed to scale well on a multi-processor machine or a cluster. The underlying parallel system is MPI (Message Passing Interface) which is a commonly available standard that runs on many platforms. Consult our [[HowTo:mpi MPI help file]] and follow some of the links in there if you want to have more information about MPI. Even if you want to use only one processor for your NWChem run (which sometimes is the best solution, particularly for smaller computations), you have to submit the program to a parallel environment. On our clusters, the relevant command is '''mpirun''': | |
+ | <pre>mpirun -np 8 nwchem sample > sample.log</pre> | ||
+ | This will run your sample.nw input file on eight processors. Note that you are only allowed to run NWChem this way for small test systems! For any production jobs, you have to submit the task to the scheduler (see next section.). | ||
== Submitting (parallel) Gaussian jobs == | == Submitting (parallel) Gaussian jobs == |
Revision as of 17:39, 27 May 2016
Contents
NWChem
This is a short help file on using the parallel electronic-structure code "NWChem" on systems at the Centre for Advanced Computing. This software uses MPI as a message-passing system and is (in principle) able to run on an arbitrary number of processors. Its ability to perform a very broad spectrum of molecular-structure calculations, ranging from CI to ab-initio molecular dynamics, makes it an interesting alternative to the standard electronic structure code Gaussian.
FeaturesNWChem is an electronic-structure code that is suitable to perform complex calculations on molecular structure. It was specifically designed to perform well on high-performance parallel computers. The installation on the SunFire cluster of HPCVL employs the MPI message passing package for parallel execution. NWChem allows, among others, the following calculations to be performed:
For a more complete list, see the official NWChem homepage and click on "capabilities". Location of the program and setupThe NWChem program is located in the directory /opt/nwchem/bin. To access it, you have to use the usepackage command use nwchem which will set you up automatically. |
Running NWChem from a command lineLike other electronic-structure programs, NWChem is run by supplying an input file that defines the system on which to perform a calculation (usually a molecule, or a group of molecules), and the method to use (i.e., the level of calculation, such as "Hartree-Fock", the basis set, and other details of the computation). The variety of possible calculations is great, and so is the complexity of systems. It is impossible for us here to explain the format that a NWChem input file needs to have. This is explained in the User's Manual which is available online. Here, we provide a simple sample input file which should be given the file extension .nw. start h2o title "H2O, cc-pVDZ basis, SCF optimized geometry" geometry units au H 0.0000000000 1.4140780900 -1.1031626600 H 0.0000000000 -1.4140780900 -1.1031626600 O 0.0000000000 0.0000000000 -0.0080100000 end basis H library cc-pVDZ O library cc-pVDZ end scf thresh 1.0e-8 end task scf This extension may be omitted when calling the program. NWChem creates typically a whole array of output files that are documented in the User's Manual. A general log is displayed on the console, and may be saved in a file by redirecting the standard output: nwchem sample > sample.log where we assume that your input file is called sample.nw and you want to save the log to a file sample.log. Note that this is just the basic syntax of the program call. In practise you will use a parallel environment to execute the program (see next section). In fact, executing NWChem by just typing the above line will run it in serial mode. Parallel RunsNWChem is inherently parallelized and designed to scale well on a multi-processor machine or a cluster. The underlying parallel system is MPI (Message Passing Interface) which is a commonly available standard that runs on many platforms. Consult our HowTo:mpi MPI help file and follow some of the links in there if you want to have more information about MPI. Even if you want to use only one processor for your NWChem run (which sometimes is the best solution, particularly for smaller computations), you have to submit the program to a parallel environment. On our clusters, the relevant command is mpirun: mpirun -np 8 nwchem sample > sample.log This will run your sample.nw input file on eight processors. Note that you are only allowed to run NWChem this way for small test systems! For any production jobs, you have to submit the task to the scheduler (see next section.). Submitting (parallel) Gaussian jobsIf you want to run Gaussian on several processors on our machines, you have to include a line in your input file: %nproc=8 where we assume that you want to use 8 processors (cores, threads). It is mandatory to submit a Gaussian job script through our scheduling software (see our Scheduler Help File for details). Here is a "bare bones" sample of a Gaussian submission script: #! /bin/bash #$ -S /bin/bash #$ -q abaqus.q #$ -l qname=abaqus.q #$ -cwd #$ -V #$ -M hpcXXXX@localhost #$ -m be #$ -o STD.out #$ -e STD.err #$ -pe shm.pe 8 g09 < sample.g09 > sample.log
The script (let's call it g09.sh) is submitted by the qsub command: qsub g09.sh This must be done from the working directory, i.e. the directory that contains the input file and is supposed to contain the output. Also make sure that you have set up gaussian (use g09) before you submit a job. |
LicensingGaussian is a licensed program. The license held by the Centre for Advanced Computing is limited to our computers at our main site. That means that any of our users can use the program on our machines (but nowhere else), whether they are located at Queen's or not. We require users of Gaussian to sign a statement in which they state that they are informed about the terms of the license to be included in the Gaussian user group named "g98". Please fax the completed statement to (613) 533-2015 or scan/email to cac.admin@queensu.ca. Where can I get more detailed information ?
|