Skip to content

Commit 127e482

Browse files
committed
Merge remote-tracking branch 'official/master'
Conflicts: crystal2qmc.py - maxmo_spin fix.
2 parents 578a771 + 489deed commit 127e482

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crystal2qmc.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ def write_slater(basis,eigsys,kpt,outfn,orbfn,basisfn,maxmo_spin=-1):
354354
outlines = [
355355
"slater",
356356
"{0} {{".format(orbstr),
357-
"cutoff_mo",
358357
" magnify 1",
359358
" nmo {0}".format(dnorbs[-1]),
360359
" orbfile {0}".format(orbfn),
@@ -373,16 +372,17 @@ def write_slater(basis,eigsys,kpt,outfn,orbfn,basisfn,maxmo_spin=-1):
373372
outf.write("\n".join(outlines))
374373

375374
###############################################################################
376-
def write_orbplot(basis,eigsys,kpt,outfn,orbfn,basisfn,sysfn):
377-
# Warning: the orbfn naming convention is different because there are two files that get produced.
375+
def write_orbplot(basis,eigsys,kpt,outfn,orbfn,basisfn,sysfn,maxmo_spin=-1):
378376
ntot = basis['ntot']
379377
nmo = basis['nmo']
380378
nup = eigsys['nup']
381379
ndn = eigsys['ndn']
382380
uporbs = np.arange(nup)+1
383381
dnorbs = np.arange(ndn)+1
384-
if eigsys['nspin'] > 1:
382+
if maxmo_spin <0 and eigsys['nspin'] > 1:
385383
dnorbs += nmo
384+
else:
385+
dnorbs += maxmo_spin
386386
if eigsys['ikpt_iscmpx'][kpt]: orbstr = "corbitals"
387387
else: orbstr = "orbitals"
388388
uporblines = ["{:5d}".format(orb) for orb in uporbs]
@@ -396,7 +396,6 @@ def write_orbplot(basis,eigsys,kpt,outfn,orbfn,basisfn,sysfn):
396396
"method { ",
397397
"plot",
398398
"{0} {{".format(orbstr),
399-
"cutoff_mo",
400399
" magnify 1",
401400
" nmo {0}".format(dnorbs[-1]),
402401
" orbfile {0}".format(orbfn),
@@ -786,7 +785,8 @@ def convert_crystal(
786785
outfn=files['orbplot'][kidx],
787786
orbfn=files['orb'][kidx],
788787
basisfn=files['basis'],
789-
sysfn=files['sys'][kidx])
788+
sysfn=files['sys'][kidx],
789+
maxmo_spin=maxmo_spin)
790790
normalize_eigvec(eigsys,basis,kpt)
791791
write_orb(eigsys,basis,ions,kpt,files['orb'][kidx],maxmo_spin)
792792
write_sys(lat_parm,basis,eigsys,pseudo,ions,kpt,files['sys'][kidx])

0 commit comments

Comments
 (0)