-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python examples in docs need correct indentation to run #783
Comments
If we are permitted to use Numpy in such examples, this is better: basis noprint; H library sto-3g; O library sto-3g; end
python
import numpy as np
print (' y z energy gradient')
print (' ----- ----- ---------- ------------------------------------')
for y in np.arange(1.2,1.62,0.1):
for z in np.arange(1.0,1.22,0.1):
input_parse('''
geometry noprint units atomic
O 0 0 0
H 0 %f -%f
H 0 -%f -%f
end
''' % (y, z, y, z))
(energy,gradient) = task_gradient('scf')
print (' %5.2f %5.2f %9.6f' % (y, z, energy)),
for i in range(len(gradient)):
print ('%5.2f' % gradient[i]),
print ('')
end
print none
task python |
@jeffhammond Once you have edited and committed your changes, the wiki source will be transformed to html and pushed to https://nwchemgit.github.io |
Sure, I would rather see simpler code. |
@jeffhammond I thin we could close this one after nwchemgit/nwchem-wiki@29b1d1c |
The intentation of https://nwchemgit.github.io/Python.html#scan-the-geometry-and-compute-the-energy-and-gradient is wrong and causes the input to run forever.
I think this is the correct indentation:
I need to figure out how to edit the documentation, which is the main reason I didn't fix this myself.
The text was updated successfully, but these errors were encountered: