Updating Python examples:


Clicked A Few Times
The current version of NWChem 6.3 with Python 2.7.3 generates a SyntaxError on many of the Python example files on page http://nwchemgit.github.io/index.php/Release62:Python. This appears to be due to string handling in variable definitions.

An emendation which works on my machine for the basis set exponent scan is:
python
  geometry = ("geometry noprint; symmetry d2h\n"
              "   C 0 0 %f; H 0  0.916 1.224\n"
              "end")

  x = 0.6
  while (x < 0.721):
    input_parse(geometry % x)
    energy = task_energy('scf')
    print ' x = %5.2f   energy = %10.6f' % (x, energy)
    x = x + 0.01
end
basis; C library 6-31g*; H library 6-31g*; end
print none
task python

Forum Vet
Thanks for reporting this problem.
The root cause of the problem was a formatting issue in the wiki pages.

Cheers, Edo


Forum >> NWChem's corner >> NWChem functionality