Skip to content

Commit aea5634

Browse files
authored
Merge pull request QMCPACK#6060 from jtkrogel/nx_style_guide1
Nexus: fix closure indentation to follow style guide
2 parents 780eb3f + 9e69894 commit aea5634

28 files changed

Lines changed: 229 additions & 229 deletions

nexus/nexus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def __call__(self,**kwargs):
263263
"cif2cell": {"min_ver": "x.x.x", "status": "optional"},
264264
"pydot": {"min_ver": "x.x.x", "status": "optional"},
265265
"seekpath": {"min_ver": "x.x.x", "status": "optional"},
266-
}
266+
}
267267

268268
nxs_deps = {k:v for k, v in sorted(nxs_deps.items(), key=lambda x: pkg_sort.get(x[0], 1000))}
269269

nexus/nexus/examples/generic/scripts/data_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'y_max': y.max(),
4141
'matrix_mean': matrix.mean(),
4242
'matrix_std': matrix.std()
43-
}
43+
}
4444

4545
# Save statistics
4646
with open('data/statistics.txt', 'w') as f:

nexus/nexus/examples/generic/scripts/data_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@
4444
'std': np.std(x),
4545
'min': np.min(x),
4646
'max': np.max(x)
47-
}
47+
}
4848

4949
y_stats = {
5050
'mean': np.mean(y),
5151
'std': np.std(y),
5252
'min': np.min(y),
5353
'max': np.max(y)
54-
}
54+
}
5555

5656
matrix_stats = {
5757
'mean': np.mean(matrix),
5858
'std': np.std(matrix),
5959
'min': np.min(matrix),
6060
'max': np.max(matrix)
61-
}
61+
}
6262

6363
# 2. Simple calculations
6464
correlation = np.corrcoef(x, y)[0, 1]

nexus/nexus/examples/qmcpack/rsqmc_misc/H2O/H2O.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
blocks = 1,
149149
timestep = 1.0,
150150
usedrift = False,
151-
),
151+
),
152152
dmc(
153153
minimumtargetwalkers = 128,
154154
reconfiguration = 'no',
@@ -157,7 +157,7 @@
157157
steps = 10,
158158
blocks = 200,
159159
nonlocalmoves = True,
160-
)
160+
)
161161
],
162162
dependencies = [(p2q,'orbitals'),(opt,'jastrow')],
163163
)

nexus/nexus/examples/qmcpack/rsqmc_misc/LiH/LiH.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
blocks = 1,
180180
timestep = 1.0,
181181
usedrift = False,
182-
),
182+
),
183183
dmc(
184184
minimumtargetwalkers = 128,
185185
reconfiguration = 'no',
@@ -188,7 +188,7 @@
188188
steps = 10,
189189
blocks = 200,
190190
nonlocalmoves = True,
191-
)
191+
)
192192
],
193193
dependencies = [(p2q,'orbitals'),(opt,'jastrow')],
194194
)

nexus/nexus/examples/qmcpack/rsqmc_misc/estimators/iron_ldaU_dmc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,21 @@
152152
dr = (0.05, 0.05, 0.05), # Grid spacing in Bohr (matching spin density)
153153
integrator = 'simpsons', # Integration method
154154
samples = 9, # Number of samples for integration
155-
)
155+
)
156156

157157
#===== Energy density =====
158158
from nexus.qmcpack_input import generate_energydensity
159159
edens = generate_energydensity(
160160
coord = 'cartesian',
161161
grid = (100, 100, 100),
162-
)
162+
)
163163

164164
#===== Momentum distribution =====
165165
from nexus.qmcpack_input import momentumdistribution
166166
mom_dist = momentumdistribution(
167167
samples = 40,
168168
kmax = 8.0,
169-
)
169+
)
170170

171171
#===== One body density matrix =====
172172
from nexus.qmcpack_input import onebodydensitymatrices, sposet
@@ -183,7 +183,7 @@
183183
evaluator = 'matrix',
184184
samples = 10,
185185
basis = sposet(type='bspline', size=nbnd, spindataset=0), # Uses the spin up channel (0) KS-DFT orbitals as the DM basis
186-
)
186+
)
187187

188188
# In production runs containing estimators, large numbers (100+) of blocks are preferred for robust statistical analysis.
189189
# More steps per block than specified here are additionally preferred for computational efficiency due to the I/O cost of estimators.

nexus/nexus/examples/qmcpack/rsqmc_misc/excited/vmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
verbosity = 'high', #verbosity must be set to high
7474
pseudos = ['C.BFD.upf'],
7575
dependencies = (scf, 'charge_density'),
76-
)
76+
)
7777

7878
conv = generate_pw2qmcpack(
7979
identifier = 'conv',

nexus/nexus/examples/qmcpack/rsqmc_misc/excited/vmc_opt_tiling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
verbosity = 'high', #verbosity must be set to high
8686
pseudos = ['C.BFD.upf'],
8787
dependencies = (scf, 'charge_density'),
88-
)
88+
)
8989

9090
conv = generate_pw2qmcpack(
9191
identifier = 'conv',

nexus/nexus/examples/quantum_espresso/02_diamond_self_consistent_U/diamond_lda_sc_u.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
nogamma = True,
5656
hubbard = hubbard,
5757
dependencies = hubbard_result
58-
)
58+
)
5959
scf.show_input()
6060
sims.append(scf)
6161

@@ -67,7 +67,7 @@
6767
job = job(cores=16,app='hp.x'),
6868
path = 'diamond/scf_step_{}'.format(step),
6969
dependencies = (sims[-1], 'other')
70-
)
70+
)
7171
sims.append(hp)
7272

7373
run_project()

nexus/nexus/fileio.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def readtokensf(self,s=None,*formats):
9999
'number of tokens: {1}\n'
100100
'number of formats provided: {2}'.format(
101101
line,len(stokens),len(formats)
102+
)
102103
)
103-
)
104104
#end if
105105
tokens = []
106106
if all_same:
@@ -138,7 +138,7 @@ def seek(self,pos,whence=0,start=None,end=None):
138138
self.error(
139139
'relative positioning must be either 0 (begin), 1 (current), or 2 (end)\n'
140140
'you provided: {0}'.format(whence)
141-
)
141+
)
142142
#end if
143143
#end if
144144
if whence!=2:
@@ -822,7 +822,7 @@ def validity_checks(self):
822822
return [(
823823
'xsf file must have animation, bands, structure, or data\n'
824824
'the current file is missing all of these'
825-
)]
825+
)]
826826
#end if
827827
#end def validity_checks
828828

@@ -1409,7 +1409,7 @@ def read_poscar_chgcar(host,text):
14091409
error(
14101410
'read_poscar_chgcar must be used in conjunction with PoscarFile or ChgcarFile objects only\n'
14111411
'encountered object of type: {0}'.format(host.__class__.__name__)
1412-
)
1412+
)
14131413
#end if
14141414

14151415
# read lines and remove fortran comments
@@ -1442,8 +1442,8 @@ def read_poscar_chgcar(host,text):
14421442
'file {0} must have at least {1} lines\n'
14431443
'only {2} lines found'.format(
14441444
host.filepath, min_lines, nlines
1445+
)
14451446
)
1446-
)
14471447
#end if
14481448
description = lines[0]
14491449
dim = 3
@@ -1584,8 +1584,8 @@ def is_float(val):
15841584
'grid size: {1}\n'
15851585
'density size: {2}'.format(
15861586
grid, ng, density.size
1587+
)
15871588
)
1588-
)
15891589
#end if
15901590
ndens = density.size//ng
15911591
if ndens==1:
@@ -1607,7 +1607,7 @@ def is_float(val):
16071607
' 2) charge and collinear spin densities (2 densities)\n'
16081608
' 3) charge and non-collinear spin densities (4 densities)\n'
16091609
'number of densities found: {0}'.format(ndens)
1610-
)
1610+
)
16111611
#end if
16121612
else:
16131613
host.error('file {0} is incomplete (missing density)'.format(host.filepath))

0 commit comments

Comments
 (0)