Skip to content

Commit

Permalink
Adding nexus. (#197)
Browse files Browse the repository at this point in the history
* Develop (#196)

* Image augmentation.

* Augment images.

* Augment images.

* Specie update.

* Add Latt2D, STM image (b-1) fix, image augmentation fix.

* Add Latt2D, STM image (b-1) fix, image augmentation fix.

* Update conf.py

* Update conf.py

* Multi-output graph bacthing.

* Add EDOS dataset.

* Temp.

* Add circuit maker.

* Add circuit maker.

* NELECT update.

* Version update, more DBs added.

* Fix CHGCAR vasp.

* Added volumetric reshape for CHGCAR.

* Tmp

* Tershoff Hamman update, specie update.

* Add crop from center in STM.

* Add Fourier transfor in STM.

* Update STM pytest.

* Add DPI to STM.

* Zeo++ added, Atoms cif update, STM update, random vacancy maker added.

* Atoms tempfile fix, Potcar from atoms module added.

* Test for docs.

* C2DB link update, docs Atoms update.

* C2DB link update, docs Atoms update.

* Version update, COD DB, QM9 JCTC DB added.

* Compostion bug fix, elemental descriptor added.

* Develop (#186)

* Update outputs.py

I added the calculation of the Raman intensities inside parse_raman_dat

* Update outputs.py

* Update outputs.py

* Update outputs.py

* Update cfid.py

* Delete __init__.py

* stylecss added.

* stylecss added.

* Adding extra Makefile/

* Remove examples from docs.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Tutorials update.

* Tutorials docs update.

* Docs update,pdb reader updated.

* Update action_build.yml

* Update action_build.yml

* Remove pytraj strong dependencies.

* Update docs, Added PDBBind and HPOV datasets.

* Docs update.

* Add thcikness to surface builder.

* Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix.

* Typo fix.

* Add names to chem descs.

* Lessen hermsolver pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* No DFT3D

* Exclude dft_3d dataset for memory issue.

* Update figshare test.

* Update figshare test.

* Exclude db from coverage.

* Exclude db from coverage.

* Add magpie.json.

* Add magpie.json.

* Wien2k bands bug fix.

* Wien2k bands bug fix.

* Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code.

* JFF update.

* Add JQE_TB3 and hMOF dataset.

* Update LAMMPS module.

* Update LAMMPS module.

* Fix elastic tensor module.

* Figshare update, docs db name update.

* Substitutions.

* Update figshare dft_3d, cfid_3d.

* Docs data update.

* Generate substitutions.

* Lint fix.

* Update DOS.

* Update DOS.

Co-authored-by: tavazza <tavazza@gmail.com>
Co-authored-by: knc6 <kamal.choudhary@nist.gov>
Co-authored-by: KAMAL CHOUDHARY <kamalch@login1.frontera.tacc.utexas.edu>

* First input.

* added black

* Example folder.

Co-authored-by: Kamal Choudhary <writetokamal.1989@gmail.com>
Co-authored-by: tavazza <tavazza@gmail.com>
Co-authored-by: knc6 <kamal.choudhary@nist.gov>
Co-authored-by: KAMAL CHOUDHARY <kamalch@login1.frontera.tacc.utexas.edu>
  • Loading branch information
5 people authored Dec 20, 2021
1 parent b4ef951 commit 62a4abd
Show file tree
Hide file tree
Showing 5 changed files with 22,895 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jarvis/io/nexus/examples/cubic_diamond/POSCAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cubic diamond
5.5
0.0 0.5 0.5
0.5 0.0 0.5
0.5 0.5 0.0
Si
2
Direct
-0.125 -0.125 -0.125
0.125 0.125 0.125
99 changes: 99 additions & 0 deletions jarvis/io/nexus/examples/cubic_diamond/diamond-dft.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#! /usr/bin/env python

from nexus import settings,job,run_project,obj
from nexus import generate_physical_system
from nexus import generate_pwscf, generate_pw2qmcpack
from nexus import generate_qmcpack,vmc,loop,linear,dmc
from nexus import read_structure
from numpy import mod, sqrt, array
from qmcpack_input import spindensity
import numpy as np
from structure import optimal_tilematrix
from numpy.linalg import det
settings(
results = './results',
pseudo_dir = './pseudopotentials', #location of pseudopotential directory
sleep = 1,
runs = './runs',
machine = 'kisir', #machine, defined in the machine.py file in Nexus lib
)

structure = read_structure('POSCAR', format='poscar') #poscar to be read from JARVIS-ID

boundaries = 'ppp'
supercells = [[[1, 0, 0], [0, 1, 0], [0, 0, 1]]] #Matrix used to tile to different sized supercells in kspace (for finite-size convergence)

shared_qe = obj( #QE parameters, if desired can loop over values of ecut and kgrid to find converged values at this stage
occupations = 'smearing',
smearing = 'gaussian',
degauss = 0.005,
input_dft = 'PBE',
ecut = 100,
conv_thr = 1.0e-7,
mixing_beta = 0.2,
nosym = True,
use_folded = True,
spin_polarized = True
)

qe_presub = 'module load intel impi openmpi-3.0.1/intel qe-6.4.1' #loaded module for QE, can modify this for NIST cluster

qe_job = job(nodes=2,threads=40,app='pw.x', presub=qe_presub) #submission details specific to kisir

scales = [1.00] #can modify to scale the lattice

for scale in scales:
#Self-consistent DFT calculation to obtain charge density of structure in POSCAR
temp = structure.copy()
temp.stretch(scale, scale , scale)
system = generate_physical_system(
structure = temp,
Si = 4, # This is number of valence electrons for each element
kshift = (0,0,0),
net_spin = 0
)

scf = generate_pwscf(
identifier = 'scf', # log output goes to scf.out
path = 'scf-{}'.format(scale), # directory to run in
job = qe_job,
system = system,
input_type = 'scf',
pseudos = ['Si.ccECP.upf'], #DFT pseudopotential from the directory
kgrid = (4,4,4),
wf_collect = False,
**shared_qe
)
#Nonself-consistent DFT calculation to read in charge density and tile to appropriate supercell for QMC
for supercell in supercells:
scell_vol = det(supercell)
nscf_kgrid_k = int(np.ceil(2/sqrt(scell_vol))) #The kgrid for the nscf calculation used to tile to different sized supercells, modify this based on system
nscf_grid = (nscf_kgrid_k, nscf_kgrid_k, nscf_kgrid_k)
nscf_system = generate_physical_system(
structure = temp,
Si = 4,
tiling = supercell,
kgrid = nscf_grid,
kshift = (0,0,0),
net_spin = 0,
)
nscf = generate_pwscf(
identifier = 'nscf',
path = 'nscf-{}-{}'.format(scale,scell_vol),
job = qe_job ,
system = nscf_system,
input_type = 'nscf',
pseudos = ['Si.ccECP.upf'], #DFT pseudopotential from the directory
wf_collect = True,
dependencies = (scf,'charge_density'),
**shared_qe
)
#Wavefunction conversion (p2qmcpack.x run on top of pw.x in same folder as NSCF calculation)
p2q = generate_pw2qmcpack(
identifier = 'p2q',
path = 'nscf-{}-{}'.format(scale,scell_vol),
job = job(cores= 1,threads= 1,app='pw2qmcpack.x',presub=qe_presub),
write_psir = False,
dependencies = (nscf,'orbitals'),
)
run_project()
Loading

0 comments on commit 62a4abd

Please sign in to comment.