Merge branch 'develop' into Quality_of_life_fixes

This commit is contained in:
Mark Dewing 2019-09-20 07:18:21 -05:00 committed by GitHub
commit c270f86a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 827 additions and 11 deletions

View File

@ -1726,6 +1726,12 @@ def numerics():
def fileio():
nunit_all()
#end def fileio
def nexus_imports():
import nexus
@ -3465,6 +3471,7 @@ NexusTest( generic_extensions )
NexusTest( developer )
NexusTest( periodic_table )
NexusTest( numerics )
NexusTest( fileio )
NexusTest( nexus_imports )
NexusTest( settings_operation , 'settings' )
NexusTest( machines )

View File

@ -316,6 +316,7 @@ class XsfFile(StandardFile):
#end def add_to_image
# test needed for axsf and bxsf
def read_text(self,text):
lines = text.splitlines()
i=0
@ -549,6 +550,7 @@ class XsfFile(StandardFile):
#end def read_text
# test needed for axsf and bxsf
def write_text(self):
c=''
if self.filetype=='xsf': # only write structure/datagrid if present
@ -769,6 +771,7 @@ class XsfFile(StandardFile):
#end def validity_checks
# test needed
def incorporate_structure(self,structure):
s = structure.copy()
s.change_units('A')
@ -849,6 +852,7 @@ class XsfFile(StandardFile):
#end def get_density
# test needed
def change_units(self,in_unit,out_unit):
fac = 1.0/convert(1.0,in_unit,out_unit)**3
density = self.get_density()
@ -859,6 +863,7 @@ class XsfFile(StandardFile):
#end def change_units
# test needed
def remove_ghost(self,density=None):
if density is None:
density = self.get_density()
@ -878,6 +883,7 @@ class XsfFile(StandardFile):
#end def remove_ghost
# test needed
def norm(self,density=None,vnorm=True):
if density is None:
density = self.get_density()
@ -895,6 +901,7 @@ class XsfFile(StandardFile):
#end def norm
# test needed
def line_data(self,dim,density=None):
if density is None:
density = self.get_density()
@ -1193,7 +1200,9 @@ class ChgcarFile(StandardFile):
elif (self.grid<1).sum()>0:
msgs.append('all grid entries must be greater than zero')
#end if
ng = self.grid.prod()
if self.grid is not None:
ng = self.grid.prod()
#end if
if self.charge_density is None:
msgs.append('charge_density is missing')
elif not isinstance(self.charge_density,ndarray):
@ -1298,7 +1307,7 @@ def read_poscar_chgcar(host,text):
nlines = len(lines)
min_lines = 8
if nlines<min_lines:
host.error('file {0} must have at least {1} lines\nonly {2} lines found'.format(filepath,min_lines,nlines))
host.error('file {0} must have at least {1} lines\nonly {2} lines found'.format(host.filepath,min_lines,nlines))
#end if
description = lines[0]
dim = 3
@ -1322,7 +1331,7 @@ def read_poscar_chgcar(host,text):
c = lines[lcur].lower()[0]
lcur+=1
else:
host.error('file {0} is incomplete (missing positions)'.format(filepath))
host.error('file {0} is incomplete (missing positions)'.format(host.filepath))
#end if
selective_dynamics = c=='s'
if selective_dynamics: # Selective dynamics
@ -1330,7 +1339,7 @@ def read_poscar_chgcar(host,text):
c = lines[lcur].lower()[0]
lcur+=1
else:
host.error('file {0} is incomplete (missing positions)'.format(filepath))
host.error('file {0} is incomplete (missing positions)'.format(host.filepath))
#end if
#end if
cartesian = c=='c' or c=='k'
@ -1341,7 +1350,7 @@ def read_poscar_chgcar(host,text):
#end if
npos = counts.sum()
if lcur+npos>len(lines):
host.error('file {0} is incomplete (missing positions)'.format(filepath))
host.error('file {0} is incomplete (missing positions)'.format(host.filepath))
#end if
spos = []
for i in range(npos):
@ -1377,7 +1386,7 @@ def read_poscar_chgcar(host,text):
cline = lines[lcur].lower()
lcur+=1
if lcur+npos>len(lines):
host.error('file {0} is incomplete (missing velocities)'.format(filepath))
host.error('file {0} is incomplete (missing velocities)'.format(host.filepath))
#end if
cartesian = len(cline)>0 and (cline[0]=='c' or cline[0]=='k')
if cartesian:
@ -1403,7 +1412,7 @@ def read_poscar_chgcar(host,text):
grid = array(lines[lcur].split(),dtype=int)
lcur+=1
else:
host.error('file {0} is incomplete (missing grid)'.format(filepath))
host.error('file {0} is incomplete (missing grid)'.format(host.filepath))
#end if
if lcur<len(lines):
ng = grid.prod()
@ -1422,12 +1431,15 @@ def read_poscar_chgcar(host,text):
#end def is_float
# remove anything but the densities (e.g. augmentation charges)
n=0
while is_float(density[n]) and n+ng<len(density):
while is_float(density[n]):
n+=ng
if n+ng>=len(density):
break
#end if
#end while
density = array(density[:n],dtype=float)
else:
host.error('file {0} is incomplete (missing density)'.format(filepath))
host.error('file {0} is incomplete (missing density)'.format(host.filepath))
#end if
if density.size%ng!=0:
host.error('number of density data entries is not a multiple of the grid\ngrid shape: {0}\ngrid size: {1}\ndensity size: {2}'.format(grid,ng,density.size))
@ -1446,10 +1458,10 @@ def read_poscar_chgcar(host,text):
spin_density[:,i] = density[(i+1)*ng:(i+2)*ng]
#end for
else:
host.error('density data must be present for one of the following situations\n 1) charge density only (1 density)\n2) charge and collinear spin densities (2 densities)\n 3) charge and non-collinear spin densities (4 densities)\nnumber of densities found: {0}'.format(ndens))
host.error('density data must be present for one of the following situations\n 1) charge density only (1 density)\n 2) charge and collinear spin densities (2 densities)\n 3) charge and non-collinear spin densities (4 densities)\nnumber of densities found: {0}'.format(ndens))
#end if
else:
host.error('file {0} is incomplete (missing density)'.format(filepath))
host.error('file {0} is incomplete (missing density)'.format(host.filepath))
#end if
#end if

View File

@ -123,4 +123,105 @@ def object_eq(*args,**kwargs):
# find the path to the Nexus directory and other internal paths
def nexus_path(append=None,location=None):
import os
testing_path = os.path.realpath(__file__)
assert(isinstance(testing_path,str))
assert(len(testing_path)>0)
assert('/' in testing_path)
tokens = testing_path.split('/')
assert(len(tokens)>=3)
assert(tokens[-1].startswith('testing.py'))
assert(tokens[-2]=='lib')
assert(tokens[-3]=='nexus')
path = os.path.dirname(testing_path)
path = os.path.dirname(path)
assert(path.endswith('/nexus'))
if location is not None:
if location=='unit':
append = 'tests/unit'
else:
print('nexus location "{}" is unknown'.format(location))
raise ValueError
#end if
#end if
if append is not None:
path = os.path.join(path,append)
#end if
assert(os.path.exists(path))
return path
#end def nexus_path
# find the path to a file associated with a unit test
def unit_test_file_path(test,file=None):
import os
unit_path = nexus_path(location='unit')
files_dir = 'test_{}_files'.format(test)
path = os.path.join(unit_path,files_dir)
if file is not None:
path = os.path.join(path,file)
#end if
assert(os.path.exists(path))
return path
#end def unit_test_file_path
# collect paths to all files associated with a unit test
def collect_unit_test_file_paths(test,storage):
import os
if len(storage)==0:
test_files_dir = unit_test_file_path(test)
files = os.listdir(test_files_dir)
for file in files:
filepath = os.path.join(test_files_dir,file)
assert(os.path.exists(filepath))
storage[file] = filepath
#end for
#end if
return storage
#end def collect_unit_test_file_paths
# find the output path for a test
def unit_test_output_path(test,subtest=None):
import os
unit_path = nexus_path(location='unit')
files_dir = 'test_{}_output'.format(test)
path = os.path.join(unit_path,files_dir)
if subtest is not None:
path = os.path.join(path,subtest)
#end if
return path
#end def unit_test_output_path
# setup the output directory for a test
def setup_unit_test_output_directory(test,subtest):
import os
import shutil
path = unit_test_output_path(test,subtest)
assert('nexus' in path)
assert('unit' in path)
assert(os.path.basename(path).startswith('test_'))
assert(path.endswith('/'+subtest))
if os.path.exists(path):
shutil.rmtree(path)
#end if
os.makedirs(path)
assert(os.path.exists(path))
return path
#end def setup_unit_test_output_directory

View File

@ -0,0 +1,338 @@
import testing
from testing import value_eq,object_eq
associated_files = dict()
def get_files():
return testing.collect_unit_test_file_paths('fileio',associated_files)
#end def get_files
def test_files():
filenames = [
'scf.in',
'VO2_R_48.xsf',
'VO2_R_48.POSCAR',
'VO2_R_48_dens.xsf',
'VO2_R_48_dens.CHGCAR',
]
files = get_files()
assert(set(files.keys())==set(filenames))
#end def test_files
def test_import():
import fileio
from fileio import TextFile
from fileio import XsfFile
from fileio import PoscarFile
from fileio import ChgcarFile
#end def test_import
def test_textfile():
from fileio import TextFile
files = get_files()
# test empty initialization
empty = TextFile()
# test read
f = TextFile(files['scf.in'])
assert(len(f.read())==1225)
assert(len(f.lines())==55)
assert(len(f.tokens())==125)
assert(f.readline()=='&CONTROL\n')
assert(f.readline()==" calculation = 'scf'\n")
assert(f.readline('celldm')=='celldm(1) = 1.0\n')
assert(f.readtokens('ecutwfc')==['ecutwfc', '=', '272'])
val = f.readtokensf('CELL_PARAMETERS',float,float,float)
ref = [28.34589199, 0.0, 0.0]
assert(value_eq(val,ref))
f.close()
#end def test_textfile
def test_xsffile():
import os
import numpy as np
from fileio import XsfFile
tpath = testing.setup_unit_test_output_directory('fileio','test_xsffile')
files = get_files()
# test empty initialization
empty = XsfFile()
assert(not empty.is_valid())
# populate reference object
ref = XsfFile()
ref.set(
elem = np.array([8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,23,23,23,23,23,
23,23,23,23,23,23,23,23,23,23,23],dtype=int),
filetype = 'xsf',
periodicity = 'crystal',
pos = np.array([
[ 1.36683546, 1.36683546, 0. ],
[ 3.18776454, 3.18776454, 0. ],
[ 3.64413546, 0.91046454, 1.4264 ],
[ 5.46506454, -0.91046454, 1.4264 ],
[ 1.36683546, 1.36683546, 2.8528 ],
[ 3.18776454, 3.18776454, 2.8528 ],
[ 3.64413546, 0.91046454, 4.2792 ],
[ 5.46506454, -0.91046454, 4.2792 ],
[ 5.92143546, 1.36683546, 0. ],
[ 3.18776454, -1.36683546, 0. ],
[ 3.64413546, -3.64413546, 1.4264 ],
[ 0.91046454, -0.91046454, 1.4264 ],
[ 5.92143546, 1.36683546, 2.8528 ],
[ 3.18776454, -1.36683546, 2.8528 ],
[ 3.64413546, -3.64413546, 4.2792 ],
[ 0.91046454, -0.91046454, 4.2792 ],
[ 1.36683546, 1.36683546, 5.7056 ],
[ 3.18776454, 3.18776454, 5.7056 ],
[ 3.64413546, 0.91046454, 7.132 ],
[ 5.46506454, -0.91046454, 7.132 ],
[ 1.36683546, 1.36683546, 8.5584 ],
[ 3.18776454, 3.18776454, 8.5584 ],
[ 3.64413546, 0.91046454, 9.9848 ],
[ 5.46506454, -0.91046454, 9.9848 ],
[ 5.92143546, 1.36683546, 5.7056 ],
[ 3.18776454, -1.36683546, 5.7056 ],
[ 3.64413546, -3.64413546, 7.132 ],
[ 0.91046454, -0.91046454, 7.132 ],
[ 5.92143546, 1.36683546, 8.5584 ],
[ 3.18776454, -1.36683546, 8.5584 ],
[ 3.64413546, -3.64413546, 9.9848 ],
[ 0.91046454, -0.91046454, 9.9848 ],
[ 0. , 0. , 0. ],
[ 2.2773 , 2.2773 , 1.4264 ],
[ 0. , 0. , 2.8528 ],
[ 2.2773 , 2.2773 , 4.2792 ],
[ 4.5546 , 0. , 0. ],
[ 2.2773 , -2.2773 , 1.4264 ],
[ 4.5546 , 0. , 2.8528 ],
[ 2.2773 , -2.2773 , 4.2792 ],
[ 0. , 0. , 5.7056 ],
[ 2.2773 , 2.2773 , 7.132 ],
[ 0. , 0. , 8.5584 ],
[ 2.2773 , 2.2773 , 9.9848 ],
[ 4.5546 , 0. , 5.7056 ],
[ 2.2773 , -2.2773 , 7.132 ],
[ 4.5546 , 0. , 8.5584 ],
[ 2.2773 , -2.2773 , 9.9848 ]
],dtype=float),
primvec = np.array([
[ 4.5546, -4.5546, 0. ],
[ 4.5546, 4.5546, 0. ],
[ 0. , 0. , 11.4112]
],dtype=float),
)
assert(ref.is_valid())
# test read
f = XsfFile(files['VO2_R_48.xsf'])
assert(f.is_valid())
assert(object_eq(f,ref))
# test write
outfile = os.path.join(tpath,'test.xsf')
f.write(outfile)
f2 = XsfFile(outfile)
assert(f2.is_valid())
assert(object_eq(f2,ref))
#end def test_xsffile
def test_xsffile_density():
import os
import numpy as np
from fileio import XsfFile
tpath = testing.setup_unit_test_output_directory('fileio','test_xsffile_density')
files = get_files()
ref = XsfFile(files['VO2_R_48.xsf'])
grid = 3,5,7
dens = 0.01*np.arange(np.prod(grid),dtype=float)
dens.shape=grid
ref.add_density(ref.primvec,dens,add_ghost=True)
assert(ref.is_valid())
f = XsfFile(files['VO2_R_48_dens.xsf'])
assert(f.is_valid())
assert(object_eq(f,ref))
d = f.get_density().values
assert(isinstance(d,np.ndarray))
assert(d.shape==(4,6,8))
outfile = os.path.join(tpath,'test_density.xsf')
f.write(outfile)
f2 = XsfFile(outfile)
assert(f2.is_valid())
assert(object_eq(f2,ref))
#end def test_xsffile_density
def test_poscar_file():
import os
import numpy as np
from fileio import PoscarFile
tpath = testing.setup_unit_test_output_directory('fileio','test_poscarfile')
files = get_files()
# test empty initialization
empty = PoscarFile()
assert(not empty.is_valid())
# populate reference object
ref = PoscarFile()
ref.set(
axes = np.array([
[ 4.5546, -4.5546, 0. ],
[ 4.5546, 4.5546, 0. ],
[ 0. , 0. , 11.4112]
],dtype=float),
coord = 'cartesian',
description = 'System cell and coordinates',
dynamic = None,
elem = np.array(['O', 'V'],dtype=str),
elem_count = np.array([32, 16],dtype=int),
pos = np.array([
[ 1.36683546, 1.36683546, 0. ],
[ 3.18776454, 3.18776454, 0. ],
[ 3.64413546, 0.91046454, 1.4264 ],
[ 5.46506454, -0.91046454, 1.4264 ],
[ 1.36683546, 1.36683546, 2.8528 ],
[ 3.18776454, 3.18776454, 2.8528 ],
[ 3.64413546, 0.91046454, 4.2792 ],
[ 5.46506454, -0.91046454, 4.2792 ],
[ 5.92143546, 1.36683546, 0. ],
[ 3.18776454, -1.36683546, 0. ],
[ 3.64413546, -3.64413546, 1.4264 ],
[ 0.91046454, -0.91046454, 1.4264 ],
[ 5.92143546, 1.36683546, 2.8528 ],
[ 3.18776454, -1.36683546, 2.8528 ],
[ 3.64413546, -3.64413546, 4.2792 ],
[ 0.91046454, -0.91046454, 4.2792 ],
[ 1.36683546, 1.36683546, 5.7056 ],
[ 3.18776454, 3.18776454, 5.7056 ],
[ 3.64413546, 0.91046454, 7.132 ],
[ 5.46506454, -0.91046454, 7.132 ],
[ 1.36683546, 1.36683546, 8.5584 ],
[ 3.18776454, 3.18776454, 8.5584 ],
[ 3.64413546, 0.91046454, 9.9848 ],
[ 5.46506454, -0.91046454, 9.9848 ],
[ 5.92143546, 1.36683546, 5.7056 ],
[ 3.18776454, -1.36683546, 5.7056 ],
[ 3.64413546, -3.64413546, 7.132 ],
[ 0.91046454, -0.91046454, 7.132 ],
[ 5.92143546, 1.36683546, 8.5584 ],
[ 3.18776454, -1.36683546, 8.5584 ],
[ 3.64413546, -3.64413546, 9.9848 ],
[ 0.91046454, -0.91046454, 9.9848 ],
[ 0. , 0. , 0. ],
[ 2.2773 , 2.2773 , 1.4264 ],
[ 0. , 0. , 2.8528 ],
[ 2.2773 , 2.2773 , 4.2792 ],
[ 4.5546 , 0. , 0. ],
[ 2.2773 , -2.2773 , 1.4264 ],
[ 4.5546 , 0. , 2.8528 ],
[ 2.2773 , -2.2773 , 4.2792 ],
[ 0. , 0. , 5.7056 ],
[ 2.2773 , 2.2773 , 7.132 ],
[ 0. , 0. , 8.5584 ],
[ 2.2773 , 2.2773 , 9.9848 ],
[ 4.5546 , 0. , 5.7056 ],
[ 2.2773 , -2.2773 , 7.132 ],
[ 4.5546 , 0. , 8.5584 ],
[ 2.2773 , -2.2773 , 9.9848 ]
],dtype=float),
scale = 1.0,
vel = None,
vel_coord = None,
)
# test read
f = PoscarFile(files['VO2_R_48.POSCAR'])
assert(f.is_valid())
assert(object_eq(f,ref))
# test write
outfile = os.path.join(tpath,'test.POSCAR')
f.write(outfile)
f2 = PoscarFile(outfile)
assert(f2.is_valid())
assert(object_eq(f2,ref))
# test incorporate xsf
from fileio import XsfFile
x = XsfFile(files['VO2_R_48.xsf'])
f = PoscarFile()
f.incorporate_xsf(x)
assert(f.is_valid())
assert(object_eq(f,ref))
#end def test_poscar_file
def test_chgcar_file():
import os
from fileio import XsfFile
from fileio import PoscarFile
from fileio import ChgcarFile
tpath = testing.setup_unit_test_output_directory('fileio','test_chgcarfile')
files = get_files()
empty = ChgcarFile()
assert(not empty.is_valid())
# get reference poscar and xsf files
p = PoscarFile(files['VO2_R_48.POSCAR'])
x = XsfFile(files['VO2_R_48_dens.xsf'])
# create and test reference chgcar file
ref = ChgcarFile()
ref.incorporate_xsf(x)
assert(ref.is_valid())
assert(object_eq(ref.poscar,p))
# test read
f = ChgcarFile(files['VO2_R_48_dens.CHGCAR'])
assert(f.is_valid())
assert(object_eq(f,ref))
# test write
outfile = os.path.join(tpath,'test.CHGCAR')
f.write(outfile)
f2 = ChgcarFile(outfile)
assert(f2.is_valid())
assert(object_eq(f2,ref))
#end def test_chgcar_file

View File

@ -0,0 +1,56 @@
System cell and coordinates
1.0
4.55460000000000 -4.55460000000000 0.00000000000000
4.55460000000000 4.55460000000000 0.00000000000000
0.00000000000000 0.00000000000000 11.41120000000000
O V
32 16
cartesian
1.36683546000000 1.36683546000000 0.00000000000000
3.18776454000000 3.18776454000000 0.00000000000000
3.64413546000000 0.91046454000000 1.42640000000000
5.46506454000000 -0.91046454000000 1.42640000000000
1.36683546000000 1.36683546000000 2.85280000000000
3.18776454000000 3.18776454000000 2.85280000000000
3.64413546000000 0.91046454000000 4.27920000000000
5.46506454000000 -0.91046454000000 4.27920000000000
5.92143546000000 1.36683546000000 0.00000000000000
3.18776454000000 -1.36683546000000 0.00000000000000
3.64413546000000 -3.64413546000000 1.42640000000000
0.91046454000000 -0.91046454000000 1.42640000000000
5.92143546000000 1.36683546000000 2.85280000000000
3.18776454000000 -1.36683546000000 2.85280000000000
3.64413546000000 -3.64413546000000 4.27920000000000
0.91046454000000 -0.91046454000000 4.27920000000000
1.36683546000000 1.36683546000000 5.70560000000000
3.18776454000000 3.18776454000000 5.70560000000000
3.64413546000000 0.91046454000000 7.13200000000000
5.46506454000000 -0.91046454000000 7.13200000000000
1.36683546000000 1.36683546000000 8.55840000000000
3.18776454000000 3.18776454000000 8.55840000000000
3.64413546000000 0.91046454000000 9.98480000000000
5.46506454000000 -0.91046454000000 9.98480000000000
5.92143546000000 1.36683546000000 5.70560000000000
3.18776454000000 -1.36683546000000 5.70560000000000
3.64413546000000 -3.64413546000000 7.13200000000000
0.91046454000000 -0.91046454000000 7.13200000000000
5.92143546000000 1.36683546000000 8.55840000000000
3.18776454000000 -1.36683546000000 8.55840000000000
3.64413546000000 -3.64413546000000 9.98480000000000
0.91046454000000 -0.91046454000000 9.98480000000000
0.00000000000000 0.00000000000000 0.00000000000000
2.27730000000000 2.27730000000000 1.42640000000000
0.00000000000000 0.00000000000000 2.85280000000000
2.27730000000000 2.27730000000000 4.27920000000000
4.55460000000000 0.00000000000000 0.00000000000000
2.27730000000000 -2.27730000000000 1.42640000000000
4.55460000000000 0.00000000000000 2.85280000000000
2.27730000000000 -2.27730000000000 4.27920000000000
0.00000000000000 0.00000000000000 5.70560000000000
2.27730000000000 2.27730000000000 7.13200000000000
0.00000000000000 0.00000000000000 8.55840000000000
2.27730000000000 2.27730000000000 9.98480000000000
4.55460000000000 0.00000000000000 5.70560000000000
2.27730000000000 -2.27730000000000 7.13200000000000
4.55460000000000 0.00000000000000 8.55840000000000
2.27730000000000 -2.27730000000000 9.98480000000000

View File

@ -0,0 +1,55 @@
CRYSTAL
PRIMVEC
4.55460000 -4.55460000 0.00000000
4.55460000 4.55460000 0.00000000
0.00000000 0.00000000 11.41120000
PRIMCOORD
48 1
8 1.36683546 1.36683546 0.00000000
8 3.18776454 3.18776454 0.00000000
8 3.64413546 0.91046454 1.42640000
8 5.46506454 -0.91046454 1.42640000
8 1.36683546 1.36683546 2.85280000
8 3.18776454 3.18776454 2.85280000
8 3.64413546 0.91046454 4.27920000
8 5.46506454 -0.91046454 4.27920000
8 5.92143546 1.36683546 0.00000000
8 3.18776454 -1.36683546 0.00000000
8 3.64413546 -3.64413546 1.42640000
8 0.91046454 -0.91046454 1.42640000
8 5.92143546 1.36683546 2.85280000
8 3.18776454 -1.36683546 2.85280000
8 3.64413546 -3.64413546 4.27920000
8 0.91046454 -0.91046454 4.27920000
8 1.36683546 1.36683546 5.70560000
8 3.18776454 3.18776454 5.70560000
8 3.64413546 0.91046454 7.13200000
8 5.46506454 -0.91046454 7.13200000
8 1.36683546 1.36683546 8.55840000
8 3.18776454 3.18776454 8.55840000
8 3.64413546 0.91046454 9.98480000
8 5.46506454 -0.91046454 9.98480000
8 5.92143546 1.36683546 5.70560000
8 3.18776454 -1.36683546 5.70560000
8 3.64413546 -3.64413546 7.13200000
8 0.91046454 -0.91046454 7.13200000
8 5.92143546 1.36683546 8.55840000
8 3.18776454 -1.36683546 8.55840000
8 3.64413546 -3.64413546 9.98480000
8 0.91046454 -0.91046454 9.98480000
23 0.00000000 0.00000000 0.00000000
23 2.27730000 2.27730000 1.42640000
23 0.00000000 0.00000000 2.85280000
23 2.27730000 2.27730000 4.27920000
23 4.55460000 0.00000000 0.00000000
23 2.27730000 -2.27730000 1.42640000
23 4.55460000 0.00000000 2.85280000
23 2.27730000 -2.27730000 4.27920000
23 0.00000000 0.00000000 5.70560000
23 2.27730000 2.27730000 7.13200000
23 0.00000000 0.00000000 8.55840000
23 2.27730000 2.27730000 9.98480000
23 4.55460000 0.00000000 5.70560000
23 2.27730000 -2.27730000 7.13200000
23 4.55460000 0.00000000 8.55840000
23 2.27730000 -2.27730000 9.98480000

View File

@ -0,0 +1,79 @@
System cell and coordinates
1.0
4.55460000000000 -4.55460000000000 0.00000000000000
4.55460000000000 4.55460000000000 0.00000000000000
0.00000000000000 0.00000000000000 11.41120000000000
O V
32 16
cartesian
1.36683546000000 1.36683546000000 0.00000000000000
3.18776454000000 3.18776454000000 0.00000000000000
3.64413546000000 0.91046454000000 1.42640000000000
5.46506454000000 -0.91046454000000 1.42640000000000
1.36683546000000 1.36683546000000 2.85280000000000
3.18776454000000 3.18776454000000 2.85280000000000
3.64413546000000 0.91046454000000 4.27920000000000
5.46506454000000 -0.91046454000000 4.27920000000000
5.92143546000000 1.36683546000000 0.00000000000000
3.18776454000000 -1.36683546000000 0.00000000000000
3.64413546000000 -3.64413546000000 1.42640000000000
0.91046454000000 -0.91046454000000 1.42640000000000
5.92143546000000 1.36683546000000 2.85280000000000
3.18776454000000 -1.36683546000000 2.85280000000000
3.64413546000000 -3.64413546000000 4.27920000000000
0.91046454000000 -0.91046454000000 4.27920000000000
1.36683546000000 1.36683546000000 5.70560000000000
3.18776454000000 3.18776454000000 5.70560000000000
3.64413546000000 0.91046454000000 7.13200000000000
5.46506454000000 -0.91046454000000 7.13200000000000
1.36683546000000 1.36683546000000 8.55840000000000
3.18776454000000 3.18776454000000 8.55840000000000
3.64413546000000 0.91046454000000 9.98480000000000
5.46506454000000 -0.91046454000000 9.98480000000000
5.92143546000000 1.36683546000000 5.70560000000000
3.18776454000000 -1.36683546000000 5.70560000000000
3.64413546000000 -3.64413546000000 7.13200000000000
0.91046454000000 -0.91046454000000 7.13200000000000
5.92143546000000 1.36683546000000 8.55840000000000
3.18776454000000 -1.36683546000000 8.55840000000000
3.64413546000000 -3.64413546000000 9.98480000000000
0.91046454000000 -0.91046454000000 9.98480000000000
0.00000000000000 0.00000000000000 0.00000000000000
2.27730000000000 2.27730000000000 1.42640000000000
0.00000000000000 0.00000000000000 2.85280000000000
2.27730000000000 2.27730000000000 4.27920000000000
4.55460000000000 0.00000000000000 0.00000000000000
2.27730000000000 -2.27730000000000 1.42640000000000
4.55460000000000 0.00000000000000 2.85280000000000
2.27730000000000 -2.27730000000000 4.27920000000000
0.00000000000000 0.00000000000000 5.70560000000000
2.27730000000000 2.27730000000000 7.13200000000000
0.00000000000000 0.00000000000000 8.55840000000000
2.27730000000000 2.27730000000000 9.98480000000000
4.55460000000000 0.00000000000000 5.70560000000000
2.27730000000000 -2.27730000000000 7.13200000000000
4.55460000000000 0.00000000000000 8.55840000000000
2.27730000000000 -2.27730000000000 9.98480000000000
3 5 7
0.000000000000E+00 3.500000000000E-01 7.000000000000E-01 7.000000000000E-02 4.200000000000E-01
7.700000000000E-01 1.400000000000E-01 4.900000000000E-01 8.400000000000E-01 2.100000000000E-01
5.600000000000E-01 9.100000000000E-01 2.800000000000E-01 6.300000000000E-01 9.800000000000E-01
1.000000000000E-02 3.600000000000E-01 7.100000000000E-01 8.000000000000E-02 4.300000000000E-01
7.800000000000E-01 1.500000000000E-01 5.000000000000E-01 8.500000000000E-01 2.200000000000E-01
5.700000000000E-01 9.200000000000E-01 2.900000000000E-01 6.400000000000E-01 9.900000000000E-01
2.000000000000E-02 3.700000000000E-01 7.200000000000E-01 9.000000000000E-02 4.400000000000E-01
7.900000000000E-01 1.600000000000E-01 5.100000000000E-01 8.600000000000E-01 2.300000000000E-01
5.800000000000E-01 9.300000000000E-01 3.000000000000E-01 6.500000000000E-01 1.000000000000E+00
3.000000000000E-02 3.800000000000E-01 7.300000000000E-01 1.000000000000E-01 4.500000000000E-01
8.000000000000E-01 1.700000000000E-01 5.200000000000E-01 8.700000000000E-01 2.400000000000E-01
5.900000000000E-01 9.400000000000E-01 3.100000000000E-01 6.600000000000E-01 1.010000000000E+00
4.000000000000E-02 3.900000000000E-01 7.400000000000E-01 1.100000000000E-01 4.600000000000E-01
8.100000000000E-01 1.800000000000E-01 5.300000000000E-01 8.800000000000E-01 2.500000000000E-01
6.000000000000E-01 9.500000000000E-01 3.200000000000E-01 6.700000000000E-01 1.020000000000E+00
5.000000000000E-02 4.000000000000E-01 7.500000000000E-01 1.200000000000E-01 4.700000000000E-01
8.200000000000E-01 1.900000000000E-01 5.400000000000E-01 8.900000000000E-01 2.600000000000E-01
6.100000000000E-01 9.600000000000E-01 3.300000000000E-01 6.800000000000E-01 1.030000000000E+00
6.000000000000E-02 4.100000000000E-01 7.600000000000E-01 1.300000000000E-01 4.800000000000E-01
8.300000000000E-01 2.000000000000E-01 5.500000000000E-01 9.000000000000E-01 2.700000000000E-01
6.200000000000E-01 9.700000000000E-01 3.400000000000E-01 6.900000000000E-01 1.040000000000E+00

View File

@ -0,0 +1,113 @@
CRYSTAL
PRIMVEC
4.55460000 -4.55460000 0.00000000
4.55460000 4.55460000 0.00000000
0.00000000 0.00000000 11.41120000
PRIMCOORD
48 1
8 1.36683546 1.36683546 0.00000000
8 3.18776454 3.18776454 0.00000000
8 3.64413546 0.91046454 1.42640000
8 5.46506454 -0.91046454 1.42640000
8 1.36683546 1.36683546 2.85280000
8 3.18776454 3.18776454 2.85280000
8 3.64413546 0.91046454 4.27920000
8 5.46506454 -0.91046454 4.27920000
8 5.92143546 1.36683546 0.00000000
8 3.18776454 -1.36683546 0.00000000
8 3.64413546 -3.64413546 1.42640000
8 0.91046454 -0.91046454 1.42640000
8 5.92143546 1.36683546 2.85280000
8 3.18776454 -1.36683546 2.85280000
8 3.64413546 -3.64413546 4.27920000
8 0.91046454 -0.91046454 4.27920000
8 1.36683546 1.36683546 5.70560000
8 3.18776454 3.18776454 5.70560000
8 3.64413546 0.91046454 7.13200000
8 5.46506454 -0.91046454 7.13200000
8 1.36683546 1.36683546 8.55840000
8 3.18776454 3.18776454 8.55840000
8 3.64413546 0.91046454 9.98480000
8 5.46506454 -0.91046454 9.98480000
8 5.92143546 1.36683546 5.70560000
8 3.18776454 -1.36683546 5.70560000
8 3.64413546 -3.64413546 7.13200000
8 0.91046454 -0.91046454 7.13200000
8 5.92143546 1.36683546 8.55840000
8 3.18776454 -1.36683546 8.55840000
8 3.64413546 -3.64413546 9.98480000
8 0.91046454 -0.91046454 9.98480000
23 0.00000000 0.00000000 0.00000000
23 2.27730000 2.27730000 1.42640000
23 0.00000000 0.00000000 2.85280000
23 2.27730000 2.27730000 4.27920000
23 4.55460000 0.00000000 0.00000000
23 2.27730000 -2.27730000 1.42640000
23 4.55460000 0.00000000 2.85280000
23 2.27730000 -2.27730000 4.27920000
23 0.00000000 0.00000000 5.70560000
23 2.27730000 2.27730000 7.13200000
23 0.00000000 0.00000000 8.55840000
23 2.27730000 2.27730000 9.98480000
23 4.55460000 0.00000000 5.70560000
23 2.27730000 -2.27730000 7.13200000
23 4.55460000 0.00000000 8.55840000
23 2.27730000 -2.27730000 9.98480000
BEGIN_BLOCK_DATAGRID_3D
density
BEGIN_DATAGRID_3D_density
4 6 8
0.00000000 0.00000000 0.00000000
4.55460000 -4.55460000 0.00000000
4.55460000 4.55460000 0.00000000
0.00000000 0.00000000 11.41120000
0.00000000 0.35000000 0.70000000 0.00000000
0.07000000 0.42000000 0.77000000 0.07000000
0.14000000 0.49000000 0.84000000 0.14000000
0.21000000 0.56000000 0.91000000 0.21000000
0.28000000 0.63000000 0.98000000 0.28000000
0.00000000 0.35000000 0.70000000 0.00000000
0.01000000 0.36000000 0.71000000 0.01000000
0.08000000 0.43000000 0.78000000 0.08000000
0.15000000 0.50000000 0.85000000 0.15000000
0.22000000 0.57000000 0.92000000 0.22000000
0.29000000 0.64000000 0.99000000 0.29000000
0.01000000 0.36000000 0.71000000 0.01000000
0.02000000 0.37000000 0.72000000 0.02000000
0.09000000 0.44000000 0.79000000 0.09000000
0.16000000 0.51000000 0.86000000 0.16000000
0.23000000 0.58000000 0.93000000 0.23000000
0.30000000 0.65000000 1.00000000 0.30000000
0.02000000 0.37000000 0.72000000 0.02000000
0.03000000 0.38000000 0.73000000 0.03000000
0.10000000 0.45000000 0.80000000 0.10000000
0.17000000 0.52000000 0.87000000 0.17000000
0.24000000 0.59000000 0.94000000 0.24000000
0.31000000 0.66000000 1.01000000 0.31000000
0.03000000 0.38000000 0.73000000 0.03000000
0.04000000 0.39000000 0.74000000 0.04000000
0.11000000 0.46000000 0.81000000 0.11000000
0.18000000 0.53000000 0.88000000 0.18000000
0.25000000 0.60000000 0.95000000 0.25000000
0.32000000 0.67000000 1.02000000 0.32000000
0.04000000 0.39000000 0.74000000 0.04000000
0.05000000 0.40000000 0.75000000 0.05000000
0.12000000 0.47000000 0.82000000 0.12000000
0.19000000 0.54000000 0.89000000 0.19000000
0.26000000 0.61000000 0.96000000 0.26000000
0.33000000 0.68000000 1.03000000 0.33000000
0.05000000 0.40000000 0.75000000 0.05000000
0.06000000 0.41000000 0.76000000 0.06000000
0.13000000 0.48000000 0.83000000 0.13000000
0.20000000 0.55000000 0.90000000 0.20000000
0.27000000 0.62000000 0.97000000 0.27000000
0.34000000 0.69000000 1.04000000 0.34000000
0.06000000 0.41000000 0.76000000 0.06000000
0.00000000 0.35000000 0.70000000 0.00000000
0.07000000 0.42000000 0.77000000 0.07000000
0.14000000 0.49000000 0.84000000 0.14000000
0.21000000 0.56000000 0.91000000 0.21000000
0.28000000 0.63000000 0.98000000 0.28000000
0.00000000 0.35000000 0.70000000 0.00000000
END_DATAGRID_3D_density
END_BLOCK_DATAGRID_3D

View File

@ -0,0 +1,55 @@
&CONTROL
calculation = 'scf'
disk_io = 'low'
outdir = 'pwscf_output'
prefix = 'pwscf'
pseudo_dir = './'
restart_mode = 'from_scratch'
tprnfor = .false.
tstress = .false.
verbosity = 'high'
wf_collect = .true.
/
&SYSTEM
celldm(1) = 1.0
degauss = 0.0001
ecutrho = 1088
ecutwfc = 272
exxdiv_treatment = 'gygi-baldereschi'
ibrav = 0
input_dft = 'hse'
nat = 1
nosym = .true.
nspin = 2
ntyp = 1
occupations = 'smearing'
smearing = 'fermi-dirac'
tot_charge = 0
tot_magnetization = 4
/
&ELECTRONS
conv_thr = 1e-06
diagonalization = 'david'
electron_maxstep = 1000
mixing_beta = 0.2
mixing_mode = 'plain'
/
ATOMIC_SPECIES
Fe 55.845 Fe.opt.upf
ATOMIC_POSITIONS alat
Fe 14.17294600 14.17294741 14.17294883
K_POINTS automatic
1 1 1 0 0 0
CELL_PARAMETERS cubic
28.34589199 0.00000000 0.00000000
0.00000000 28.34589483 0.00000000
-0.00000000 0.00000000 28.34589766