too many arguments error

Click here for full thread
Clicked A Few Times
Thank you very much! Everything is working now.

Here is my version of how I got NWchem to compile and run on Windows, based on the information I found in the documentation ( and these tips (

Suggested process to compile and run NWchem on Windows 8.1
1. Download NWchem from
2. Download MinGW from . Install the Basic Setup, and from All Packages, install pthreads-w32 as well as MSYS.
3. Download and install MPICH2 from .
4. Assuming your MinGW installation is in the C drive, go to C:/MinGW/msys/1.0 and open msys.bat. The first time you open this application, it will create a folder C:/MinGW/msys/1.0/home/<user_name>. Unpack the NWchem download inside this folder. If necessary, shorten the name of the NWchem folder to nwchem-6.6.
5. Cut and paste the MPICH2 folder also inside the folder C:/MinGW/msys/1.0/home/<user_name>.
6. Inside the msys console, enter the following command to add the path of MinGW to the PATH environment variable:

export PATH=/c/MinGW/bin:$PATH

7. Inside the msys console, enter the following commands

export NWCHEM_TOP=~/nwchem-6.6
export USE_MPI=yes
export MPI_LOC=~/MPICH2
export MPI_INCLUDE=$MPI_LOC/include
export MPI_LIB=$MPI_LOC/lib
export LIBMPI="-lfmpich2g -lmpi"
export DEPEND_CC=gcc

cd $NWCHEM_TOP/src
make nwchem_config
make FC=gfortran DEPEND_CC=gcc

If there are no errors, the final line of the output on the console will say all is built. An executable file called nwchem will be created in ~/nwchem-6.6/bin/LINUX.

8. Create an input file with one of the two sample examples from . Make sure to change the extension of the file to .nw
9. Say that your input file is in ~/nwchem-6.6, you need to add the path to the nwchem executable to the PATH variable

export PATH=/c/MinGW/msys/1.0/home/<user_name>/nwchem-6.6/bin/LINUX:$PATH

Then, while being inside the folder ~/nwchem-6.6, and for an input file named n2 for example, type the following to start the calculations:

nwchem n2

Extra notes:
a) version 6.6 was used for this compilation
b) To check that the path has been added, type printenv and find the PATH variable. In it, you should see your path /c/MinGW/bin. You might also see a path for mingw/bin. This is not the same as the former. To check if your addition to PATH has worked, type gfortran –v . If it returns command not found it means that the path was not added correctly.