mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-21 06:25:21 -04:00
Make bandit a mandatory test and fix some typos
This commit is contained in:
parent
4a7fa658bb
commit
0139fb031d
12 changed files with 29 additions and 27 deletions
6
.github/workflows/lint_python.yml
vendored
6
.github/workflows/lint_python.yml
vendored
|
|
@ -9,9 +9,11 @@ jobs:
|
|||
- run: pip install --upgrade pip wheel
|
||||
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
|
||||
flake8-comprehensions isort mypy pytest pyupgrade safety
|
||||
- run: bandit --recursive --skip B101,B110,B306,B307,B311,B605,B607 .
|
||||
- run: bandit --recursive --skip B101,B110,B306,B307,B311,B605,B607 .
|
||||
- run: black --check . || true
|
||||
- run: codespell || true # --ignore-words-list="" --skip="*.css,*.js,*.lock"
|
||||
- run: codespell --count
|
||||
--ignore-words-list=aline,asociated,auxilliary,ba,ficticious,hist,iinclude,iself,ist,ket,mapp,nd,numer,ser,te
|
||||
--skip="*/graveyard,*.dtx,*.F,*.f,*.f90,*.fh,*.frg,*.orig,*.out,*.par,*.pdb,*.pl,*.tex,*.txt" || true
|
||||
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88
|
||||
--show-source --statistics
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ The dotests.msub MOAB script runs a bunch of NWChem and Amber runs, you might ha
|
|||
edit it to set the right path and account number. The resulting test.out.* file
|
||||
should be empty when the job completes.
|
||||
|
||||
Each one of these subdirectories is a seperate test with its own README file.
|
||||
Each one of these subdirectories is a separate test with its own README file.
|
||||
big: amino acid sequence
|
||||
big.shake: amino acid sequence, which shake enabled
|
||||
ethane: single ethane molecule
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ These rules built a hierarchy from compiled in default to user input:
|
|||
- environment variables
|
||||
- user input
|
||||
The user input file takes precedence over anything else and compile time
|
||||
defaults are overriden by anything else.
|
||||
defaults are overridden by anything else.
|
||||
|
||||
If Total is the default and something else is set. Then the resolution is
|
||||
simply to adjust the total memory setting and leave anything else untouched.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ $Id$
|
|||
****************************************************************
|
||||
Program averagehist_5
|
||||
|
||||
Reads in multiple *.MCdata files created by the DNTMC module. Produces a file *.fdist.average.(tempfinal)K which contains some property distributions obtained from the *.MCdata files. This code is specific to water clusters in generall. However, it may be modified to obtain properties of other systems.
|
||||
Reads in multiple *.MCdata files created by the DNTMC module. Produces a file *.fdist.average.(tempfinal)K which contains some property distributions obtained from the *.MCdata files. This code is specific to water clusters in general. However, it may be modified to obtain properties of other systems.
|
||||
The properties include: 1.) Oxygen - Oxygen distances , 2.) Hydrogen Bond Lengths, 3.) Hydrogen Bond Angles measured as the bending angle (0 is linear) centered at the hydrogen atom., 4.) Hydrogen Bond Angles measured as the bending angle (0 is linear) centered at the oxygen atom., 5.) Total Energy, 6.) Energy decomposed into portions which come from structures with differing amounts of hydrogen bonding, 6.) Estimated Dipole interaction energy, and 7.) Absolute Dipole Moments projected onto principal rotational axies.
|
||||
The thermal averages of these properties along with other information is output to file *.fdist.average.(tempfinal)K. This code is also capable of performing temperature scaling of the input data from the *.MCdata files which would allow the reading of *.MCdata files obtained at one temperature and producing properties at another temperature.
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ $Id$
|
|||
The input file contains the following fields. These fields are separated by spaces or by newlines as in the following list.
|
||||
|
||||
'file name prefix' ! defines the prefix for files which are both read and written
|
||||
'Tempinit and Temp' !inital and final temperature (K) for scaled distributions
|
||||
'Tempinit and Temp' !initial and final temperature (K) for scaled distributions
|
||||
'rmin and rmax' !grid min and max for O-O distance (Ang.)
|
||||
'natoms, nmcchains' !number of atoms per configuration and markov chains (files)
|
||||
'rcut' !cutoff of RConfig (All values .le.)
|
||||
|
|
@ -28,7 +28,7 @@ The input file contains the following fields. These fields are separated by spa
|
|||
|
||||
Running
|
||||
|
||||
The resulting binary should be run in the same location as the input and output files. If a file is prepaired as input named inputfile.inp and the binary is named averagehist_5.x, the syntax to run this program is averagehist_5.x < inputfile.inp
|
||||
The resulting binary should be run in the same location as the input and output files. If a file is prepared as input named inputfile.inp and the binary is named averagehist_5.x, the syntax to run this program is averagehist_5.x < inputfile.inp
|
||||
|
||||
****************************************************************
|
||||
Program refinedistribution_5
|
||||
|
|
@ -41,7 +41,7 @@ The input file contains the following fields. These fields are separated by spa
|
|||
The input file contains the following fields. These fields are separated by spaces or by newlines as in the following list.
|
||||
|
||||
'file name prefix' ! defines the prefix for files which are both read and written
|
||||
'Init. Temp and Final Temp' !inital and final temperature (K) for scaled distributions
|
||||
'Init. Temp and Final Temp' !initial and final temperature (K) for scaled distributions
|
||||
'rmin and rmax' !grid min and max for distribution (Ang.)
|
||||
'natoms and nmcchains' !number of atoms per configuration and markov chains (files)
|
||||
|
||||
|
|
@ -51,12 +51,12 @@ The input file contains the following fields. These fields are separated by spa
|
|||
|
||||
Running
|
||||
|
||||
The resulting binary should be run in the same location as the input and output files. If a file is prepaired as input named inputfile.inp and the binary is named refinedistribution_5.x, the syntax to run this program is refinedistribution_5.x < inputfile.inp
|
||||
The resulting binary should be run in the same location as the input and output files. If a file is prepared as input named inputfile.inp and the binary is named refinedistribution_5.x, the syntax to run this program is refinedistribution_5.x < inputfile.inp
|
||||
|
||||
****************************************************************
|
||||
Program Data_Analysis5
|
||||
|
||||
Reads in a distribution file (*.fdist) created by the DNTMC module. This program wants this file to be names data_analysis.inp. The results of the data_analysis are output to std output. This code only supports homogenious nucleation, however, can be altered to include the possibility of different monomers. For each entry in the (*.fdist) input file, 1.) the number of configurations 2.) Rcut (Ang.) 3.) Error in Rcut (Ang.) 4.) Evaporation Rate constant (s^-1) 5.) Error in Evaporation Rate Constant (s^-1) 6.) Internal pressure (atm.) 7.) Density (moles[cluster]/ml)
|
||||
Reads in a distribution file (*.fdist) created by the DNTMC module. This program wants this file to be names data_analysis.inp. The results of the data_analysis are output to std output. This code only supports homogeneous nucleation, however, can be altered to include the possibility of different monomers. For each entry in the (*.fdist) input file, 1.) the number of configurations 2.) Rcut (Ang.) 3.) Error in Rcut (Ang.) 4.) Evaporation Rate constant (s^-1) 5.) Error in Evaporation Rate Constant (s^-1) 6.) Internal pressure (atm.) 7.) Density (moles[cluster]/ml)
|
||||
|
||||
Input Information
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ except for some variables in the code itself which must be set. They are as fol
|
|||
|
||||
Running
|
||||
|
||||
The resulting binary should be run in the same location as the input files. If a file is prepaired as input named inputfile.inp and the binary is named data_analysis5.x, the syntax to run this program is data_analysis5.x < inputfile.inp. If the output needs to be saved to a file, this can be done with an output file named outputfile.out via: data_analysis5.x < inputfile.inp > outputfile.out
|
||||
The resulting binary should be run in the same location as the input files. If a file is prepared as input named inputfile.inp and the binary is named data_analysis5.x, the syntax to run this program is data_analysis5.x < inputfile.inp. If the output needs to be saved to a file, this can be done with an output file named outputfile.out via: data_analysis5.x < inputfile.inp > outputfile.out
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
A collection of miscelaneous Python scripts and test cases
|
||||
A collection of miscellaneous Python scripts and test cases
|
||||
that have been partially tested.
|
||||
|
||||
IMPORTANT:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ the LAPACK/BLAS included with NWChem. The makefile requires NWCHEM_TOP to be def
|
|||
Code for computing the IR spectrum and vibrational density of states from the
|
||||
time correlation functions of the dipole moment and atomic momenta, respectively.
|
||||
The harmonic approximation quantum correction (see J. Chem. Phys. 121, 3973 (2004))
|
||||
is applied to the IR spectrum (the spectrum is also ouput without the correction).
|
||||
is applied to the IR spectrum (the spectrum is also output without the correction).
|
||||
If option -align is specified, every frame in the trajectory will be aligned with
|
||||
the first frame and a new trajectory will be output containing the aligned frames.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ gbasis program in nwchem format into NWCHEM library format.
|
|||
|
||||
|
||||
The most time consuming steps cannot be automated since
|
||||
they require assesment of the correctness of the contents.
|
||||
they require assessment of the correctness of the contents.
|
||||
A useful command is
|
||||
|
||||
egrep '^BASIS|^END|^Effec' NWCHEM.BSLIB
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@ iNeed to figure out why Traj.txt does not contain the entire run, seems to only
|
|||
|
||||
FEB 5, 2009
|
||||
|
||||
The traj.txt writing has been fixed. This on seem sto be working fine, so it was commited to CVS.
|
||||
The next steps will include cleaning up of the code from unused variables, print statements and proper memmory dealocation.
|
||||
The traj.txt writing has been fixed. This on seem sto be working fine, so it was committed to CVS.
|
||||
The next steps will include cleaning up of the code from unused variables, print statements and proper memory dealocation.
|
||||
|
||||
FEB 11, 2009
|
||||
|
||||
crossing, mc_main and md_driver have been modified so that recrossing is tracked at each step. Seems to work fine.
|
||||
Removed passing traj_num to md_driver and then to crossing. It is set properly to be varriable in mc_data
|
||||
Next step:
|
||||
Double check the inital conditions for the start of MD
|
||||
Double check the initial conditions for the start of MD
|
||||
change the restart, but parhaps starting a BIGMol run is also a good idea.
|
||||
|
||||
FEB 20, 2009
|
||||
|
|
@ -40,7 +40,7 @@ BUG: rtdb gets corrupted in MD run when SCF is used instead of LEPS.Error was fi
|
|||
|
||||
The bug is not consistently reproducible. Some times crashes after few trajectories, and other times at the first frajectory. Looks like memory issue.
|
||||
|
||||
Located bug in mc_init in the vay that forcees were accessed. So acceleration generated are garbage. Still not completelly fixed.
|
||||
Located bug in mc_init in the vay that forcees were accessed. So acceleration generated are garbage. Still not completely fixed.
|
||||
|
||||
MARCH 3, 2009
|
||||
md-init subroutine is not being used. Not sure why I keep it.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ gammabb = |grad ndn|*|grad ndn|
|
|||
gammaab = |grad nup|*|grad ndn|
|
||||
|
||||
For restricted functionals:
|
||||
Instead of outputing
|
||||
Instead of outputting
|
||||
df/d|grad n|
|
||||
the DFT functionals output
|
||||
df/dgammaaa
|
||||
|
|
@ -24,7 +24,7 @@ For unrestricted functionals:
|
|||
gammaaa,gammabb,gammaab
|
||||
|
|
||||
|
||||
Intead of outputing
|
||||
Instead of outputting
|
||||
df/d|grad nup|,
|
||||
df/d|grad ndn|,
|
||||
df/d|grad n|
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ optimization are:
|
|||
2. After 1. the variable set is represented by a single integer and hence it
|
||||
is easy to compare them. If in a binary operator the input sets of variables
|
||||
are the same then a simpler loop structure can be used.
|
||||
3. In binary operations the array indeces can be pre-computed and re-used.
|
||||
3. In binary operations the array indices can be pre-computed and re-used.
|
||||
4. In some operations quantities can be precalculated and re-used.
|
||||
5. In the functionals the code has been optimized for the calculation of the
|
||||
energy AND the 1st derivatives. With automatic differentiation the code
|
||||
|
|
@ -125,9 +125,9 @@ The results show that whereas the unoptimized code has an overall overhead of
|
|||
unoptimized code leaving an overhead of about 20%.
|
||||
|
||||
Potential optimization steps 3 and 4 are unlikely to help very much.
|
||||
Precomputing the indeces only helps for higher order derivatives such as in the
|
||||
Precomputing the indices only helps for higher order derivatives such as in the
|
||||
TDDFT calculations. In the regular energy evaluation we already use stored
|
||||
indeces and no further gain can be obtained from that approach. Also, the most
|
||||
indices and no further gain can be obtained from that approach. Also, the most
|
||||
costly operators are the multiplication and addition operators. In their
|
||||
implementations there are no quantities we can precompute and reuse (this could
|
||||
be done for the division and exponentiation but they take relatively little
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ the C version of the PeIGS library.
|
|||
The user should beware that the definition for CTOFLIB in the DEFS files in the
|
||||
peigs directory is important here for building the C examples.
|
||||
Unfortunately, the MXSUBS on the SUN seems to need a F77 driver program
|
||||
to perserve the common block.
|
||||
to preserve the common block.
|
||||
|
||||
|
||||
This directory also contains the file teslamach for generating
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ In some cases, the current implementation has been left with some
|
|||
holes to fill in for generality.
|
||||
|
||||
General
|
||||
o Approximations other than V, especially assymetric, not well tested.
|
||||
o Approximations other than V, especially asymmetric, not well tested.
|
||||
o useful test technique: jobs with number of virtuals less than number
|
||||
of occupieds.
|
||||
o Are all integrals produced for gradients needed? (ap|D) integrals
|
||||
|
|
@ -13,7 +13,7 @@ o Are all integrals produced for gradients needed? (ap|D) integrals
|
|||
driver_xf:
|
||||
o No dynamic block sizing
|
||||
o xform_3cint should be modified to write out both 2-index and 3-index
|
||||
transformed integrals to speed the assymmetric split of the SVS and
|
||||
transformed integrals to speed the asymmetric split of the SVS and
|
||||
V approximations.
|
||||
o Schwarz screening for other than V approximation?
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ o p2am.F requires only Vx(C+A) block of L. Irrelevant AxC block added
|
|||
P2(iy) and W2 (all in mk_l.F)
|
||||
|
||||
nonsep2
|
||||
o g_V should probably be distirbuted on shell blocks
|
||||
o g_V should probably be distributed on shell blocks
|
||||
|
||||
Helpful debugging tips:
|
||||
o Run jobs for which number of number of virtuals < occupied
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue