mirror of https://github.com/QMCPACK/qmcpack.git
Merge branch 'Unified_Driver_DMCBatched' into UnifiedDriver_branch_engine
This commit is contained in:
commit
fbc0028da0
|
@ -627,12 +627,6 @@ def superstring():
|
|||
#end def superstring
|
||||
|
||||
|
||||
|
||||
def unit_converter():
|
||||
nunit_all()
|
||||
#end def unit_converter
|
||||
|
||||
|
||||
|
||||
def generic_logging():
|
||||
from generic import log,message,warn,error
|
||||
|
@ -1714,6 +1708,12 @@ def developer():
|
|||
|
||||
|
||||
|
||||
def unit_converter():
|
||||
nunit_all()
|
||||
#end def unit_converter
|
||||
|
||||
|
||||
|
||||
def periodic_table():
|
||||
nunit_all()
|
||||
#end def periodic_table
|
||||
|
@ -1738,9 +1738,15 @@ def hdfreader():
|
|||
|
||||
|
||||
|
||||
def xmlreader():
|
||||
nunit_all()
|
||||
#end def xmlreader
|
||||
|
||||
|
||||
|
||||
|
||||
def nexus_imports():
|
||||
import nexus
|
||||
nunit_all()
|
||||
#end def nexus_imports
|
||||
|
||||
|
||||
|
@ -2544,287 +2550,96 @@ def machines():
|
|||
|
||||
|
||||
def structure():
|
||||
# divert logging function
|
||||
nlog_divert()
|
||||
|
||||
nlabel('imports')
|
||||
import numpy as np
|
||||
from generic import obj
|
||||
from structure import Structure,Crystal
|
||||
from structure import generate_structure
|
||||
from structure import read_structure
|
||||
nunit('files')
|
||||
|
||||
nunit('import')
|
||||
|
||||
nlabel('definitions')
|
||||
def structure_same(s1,s2):
|
||||
keys = ('units','elem','pos','axes','kpoints','kweights','kaxes')
|
||||
o1 = s1.obj(keys)
|
||||
o2 = s2.obj(keys)
|
||||
return object_eq(o1,o2)
|
||||
#end def structure_same
|
||||
nunit('empty_init')
|
||||
|
||||
def structure_diff(s1,s2):
|
||||
keys = ('units','elem','pos','axes','kpoints','kweights','kaxes')
|
||||
o1 = s1.obj(keys)
|
||||
o2 = s2.obj(keys)
|
||||
return object_diff(o1,o2,full=True)
|
||||
#end def structure_diff
|
||||
nunit('reference_inputs')
|
||||
|
||||
nunit('direct_init')
|
||||
|
||||
nlabel('empty_init')
|
||||
s1 = Structure()
|
||||
s2 = generate_structure('empty')
|
||||
nassert(object_eq(s1,s2))
|
||||
nunit('generate_init')
|
||||
|
||||
nunit('crystal_init')
|
||||
|
||||
nlabel('ref_inputs')
|
||||
ref_in = obj()
|
||||
ref_in.diamond_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[1.785, 1.785, 0. ],
|
||||
[0. , 1.785, 1.785],
|
||||
[1.785, 0. , 1.785]],
|
||||
elem = ['C','C'],
|
||||
pos = [[0. , 0. , 0. ],
|
||||
[0.8925, 0.8925, 0.8925]],
|
||||
)
|
||||
ref_in.diamond_conv = obj(
|
||||
units = 'A',
|
||||
axes = [[3.57, 0 , 0. ],
|
||||
[0. , 3.57, 0. ],
|
||||
[0 , 0. , 3.57]],
|
||||
elem = ['C','C','C','C','C','C','C','C'],
|
||||
pos = [[0.0000, 0.0000, 0.0000],
|
||||
[0.8925, 0.8925, 0.8925],
|
||||
[0.0000, 1.7850, 1.7850],
|
||||
[0.8925, 2.6775, 2.6775],
|
||||
[1.7850, 0.0000, 1.7850],
|
||||
[2.6775, 0.8925, 2.6775],
|
||||
[1.7850, 1.7850, 0.0000],
|
||||
[2.6775, 2.6775, 0.8925]],
|
||||
)
|
||||
ref_in.wurtzite_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 3.350, 0.00000000, 0.00],
|
||||
[-1.675, 2.90118510, 0.00],
|
||||
[ 0.000, 0.00000000, 5.22]],
|
||||
elem = ['Zn','O','Zn','O'],
|
||||
pos = [[0.00000000e+00, 0.00000000e+00, 3.26250000e+00],
|
||||
[0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
|
||||
[1.67500000e+00, 9.67061701e-01, 6.52500000e-01],
|
||||
[1.67500000e+00, 9.67061701e-01, 2.61000000e+00]],
|
||||
)
|
||||
ref_in.oxygen_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 2.70150000e+00, -1.71450000e+00, 0.00000000e+00],
|
||||
[ 2.70150000e+00, 1.71450000e+00, 0.00000000e+00],
|
||||
[-3.43801471e+00, 0.00000000e+00, 3.74799291e+00]],
|
||||
elem = ['O','O'],
|
||||
pos = [[ 0., 0., 0.575],
|
||||
[ 0., 0., -0.575]],
|
||||
)
|
||||
ref_in.CuO_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 2.34150000e+00, -1.71100000e+00, 0.00000000e+00],
|
||||
[ 2.34150000e+00, 1.71100000e+00, 0.00000000e+00],
|
||||
[-8.49894838e-01, 0.00000000e+00, 5.05708046e+00]],
|
||||
elem = ['Cu','O','Cu','O'],
|
||||
pos = [[ 1.17075 , 0.8555 , 0. ],
|
||||
[-0.21247371, 1.430396, 1.26427011],
|
||||
[ 0.74580258, 2.5665 , 2.52854023],
|
||||
[ 1.70407887, 0.280604, 3.79281034]],
|
||||
)
|
||||
ref_in.Ca2CuO3_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 1.885, 1.625, -6.115],
|
||||
[-1.885, 1.625, 6.115],
|
||||
[ 1.885, -1.625, 6.115]],
|
||||
elem = ['Cu','O','O','O','Ca','Ca'],
|
||||
pos = [[0.000, 0.000, 0.000],
|
||||
[1.885, 0.000, 0.000],
|
||||
[0.000, 0.000, 1.960],
|
||||
[0.000, 0.000, 10.270],
|
||||
[0.000, 0.000, 4.290],
|
||||
[0.000, 0.000, 7.940]],
|
||||
)
|
||||
ref_in.La2CuO4_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 1.9045, 1.9045, -6.5845],
|
||||
[-1.9045, 1.9045, 6.5845],
|
||||
[ 1.9045, -1.9045, 6.5845]],
|
||||
elem = ['Cu','O','O','O','O','La','La'],
|
||||
pos = [[ 0. , 0. , 0. ],
|
||||
[ 0.95225 , 0.95225 , -3.29225 ],
|
||||
[-0.95225 , 0.95225 , 3.29225 ],
|
||||
[ 0.346619, -0.346619, 1.198379],
|
||||
[-0.346619, 0.346619, -1.198379],
|
||||
[ 0.689429, -0.689429, 2.383589],
|
||||
[-0.689429, 0.689429, -2.383589]],
|
||||
)
|
||||
ref_in.graphene_prim = obj(
|
||||
units = 'A',
|
||||
axes = [[ 2.462, 0.00000000, 0.00],
|
||||
[-1.231, 2.13215454, 0.00],
|
||||
[ 0.000, 0.00000000, 15.00]],
|
||||
elem = ['C','C'],
|
||||
pos = [[0. , 0. , 0. ],
|
||||
[1.231, 0.71071818, 0. ]],
|
||||
)
|
||||
nunit('diagonal_tiling')
|
||||
|
||||
nunit('matrix_tiling')
|
||||
|
||||
nlabel('direct_init')
|
||||
ref = obj()
|
||||
for name,inputs in ref_in.iteritems():
|
||||
ref[name] = Structure(**inputs)
|
||||
#end for
|
||||
nunit('gen_molecule')
|
||||
|
||||
nunit('gen_diamond_direct')
|
||||
|
||||
nlabel('generate_init')
|
||||
gen = obj()
|
||||
for name,inputs in ref_in.iteritems():
|
||||
gen[name] = generate_structure(**inputs)
|
||||
#end for
|
||||
nunit('gen_diamond_lattice')
|
||||
|
||||
nunit('gen_graphene')
|
||||
|
||||
nlabel('crystal_init')
|
||||
crys = obj()
|
||||
for (latt,cell),inputs in Crystal.known_crystals.iteritems():
|
||||
s = generate_structure(structure=latt,cell=cell)
|
||||
crys[latt+'_'+cell] = s
|
||||
#end for
|
||||
nunit('read_write')
|
||||
|
||||
nunit('bounding_box')
|
||||
|
||||
nlabel('check_generate_init')
|
||||
for name,s in ref.iteritems():
|
||||
nassert(structure_same(s,gen[name]))
|
||||
#end for
|
||||
nunit('opt_tiling')
|
||||
|
||||
nunit('unit_coords')
|
||||
|
||||
nlabel('check_crystal_init')
|
||||
for name,s in ref.iteritems():
|
||||
nassert(structure_same(s,crys[name]))
|
||||
#end for
|
||||
nunit('monkhorst_pack_kpoints')
|
||||
|
||||
nunit('count_kshells')
|
||||
|
||||
nlabel('diagonal_tiling')
|
||||
diag_tilings = [
|
||||
(1, 1, 1),
|
||||
(1, 2, 3),
|
||||
(1, 2, 4),
|
||||
(1, 3, 1),
|
||||
(1, 3, 2),
|
||||
(1, 3, 3),
|
||||
(1, 5, 3),
|
||||
(1, 5, 5),
|
||||
(1, 5, 6),
|
||||
(2, 1, 2),
|
||||
(2, 1, 3),
|
||||
(2, 2, 2),
|
||||
(2, 3, 1),
|
||||
(2, 3, 2),
|
||||
(2, 3, 3),
|
||||
(2, 4, 4),
|
||||
(2, 5, 1),
|
||||
(2, 5, 2),
|
||||
(2, 5, 3),
|
||||
(3, 1, 1),
|
||||
(3, 1, 2),
|
||||
(3, 1, 3),
|
||||
(3, 2, 1),
|
||||
(3, 2, 3),
|
||||
(3, 3, 6),
|
||||
(4, 6, 4),
|
||||
(5, 5, 1),
|
||||
(5, 5, 5),
|
||||
(6, 2, 6),
|
||||
(6, 3, 1),
|
||||
(6, 3, 6),
|
||||
(6, 4, 6),
|
||||
(6, 6, 4),
|
||||
]
|
||||
for name,s in ref.iteritems():
|
||||
for tvec in diag_tilings:
|
||||
st = s.tile(tvec)
|
||||
st.check_tiling()
|
||||
#end for
|
||||
#end for
|
||||
nunit('rinscribe')
|
||||
|
||||
nunit('rwigner')
|
||||
|
||||
nlabel('matrix_tiling')
|
||||
matrix_tilings = [
|
||||
(-3,-2, 0,-2,-2,-3, 3, 2,-1),
|
||||
(-3,-1, 3, 0, 1, 1,-3, 3,-3),
|
||||
(-3, 0,-2,-3, 0, 3, 2,-3, 0),
|
||||
(-3, 1, 0,-3, 3,-3, 0,-2, 1),
|
||||
(-2,-1, 2, 3,-3,-3,-2, 2,-2),
|
||||
(-2, 0, 3,-2, 1,-1,-3, 0, 1),
|
||||
(-2, 1,-3,-3, 0, 3, 2, 0, 3),
|
||||
(-2, 2,-3,-1, 0, 1,-1,-2, 3),
|
||||
(-1, 3, 2,-3, 2,-2, 3,-3,-1),
|
||||
(-1, 3, 3,-3, 3, 0,-3,-1, 1),
|
||||
( 0,-1,-2, 2, 3, 1, 3,-2, 0),
|
||||
( 0, 1, 3,-2, 3, 1, 2, 1, 2),
|
||||
( 0, 3,-1,-1,-1, 2, 2, 3, 2),
|
||||
( 1,-3,-3,-3, 3, 0,-2, 2,-2),
|
||||
( 1,-2, 2, 1, 1, 1, 3, 2,-1),
|
||||
( 1, 0, 1,-3, 2, 1, 1, 2,-2),
|
||||
( 1, 2, 1,-2, 1,-1,-2, 3, 2),
|
||||
( 1, 2, 1, 2, 1,-1, 3, 2, 2),
|
||||
( 1, 2, 2,-2, 1, 0, 1, 0,-1),
|
||||
( 1, 2, 2, 1, 0, 1,-3, 0,-2),
|
||||
( 1, 3,-1, 0, 1,-2, 1, 0, 2),
|
||||
( 1, 3, 0,-1, 0,-3, 2, 0, 2),
|
||||
( 1, 3, 0, 0,-2,-2,-1,-1, 1),
|
||||
( 1, 3, 1,-3, 2, 0, 0, 0, 2),
|
||||
( 2,-3, 0, 2, 2,-3,-1,-2, 0),
|
||||
( 2,-2, 1, 3, 3,-2,-2, 1,-3),
|
||||
( 2,-1, 2,-1, 0,-3, 2, 0, 1),
|
||||
( 2,-1, 2, 0,-2, 0,-2, 0, 0),
|
||||
( 2,-1, 3, 2, 1, 2, 1,-1,-3),
|
||||
( 2, 1, 2, 0,-3,-2,-2,-3,-1),
|
||||
( 2, 2, 1,-3,-2,-3, 2,-1,-2),
|
||||
( 2, 3,-3, 1, 3, 1, 2,-2,-1),
|
||||
( 3,-3, 0, 1,-2, 3, 2, 1, 1),
|
||||
( 3,-2, 3, 3,-3,-3, 0, 0,-1),
|
||||
( 3,-1, 2,-3, 2,-2, 3, 2,-1),
|
||||
( 3, 0,-3, 0, 2,-1, 3,-2,-1),
|
||||
( 3, 0, 2, 3,-2,-3,-3,-2, 1),
|
||||
( 3, 1, 1,-2,-1,-3, 3, 1, 0),
|
||||
( 3, 2,-3,-2, 2, 1, 1, 0,-1),
|
||||
( 3, 2,-2,-1,-3,-1, 3, 3, 2),
|
||||
( 3, 2, 3,-1, 2, 2, 0,-1, 0),
|
||||
( 3, 3,-1, 0,-3, 2,-3,-1, 0),
|
||||
( 3, 3, 1,-3,-2,-3, 2,-3, 3),
|
||||
( 3, 3, 1, 1,-2, 2, 2,-2, 0),
|
||||
]
|
||||
#for name in sorted(ref.keys()):
|
||||
for name in ['diamond_prim']:
|
||||
s = ref[name]
|
||||
npass = 0
|
||||
for tmat in matrix_tilings:
|
||||
tmat = np.array(tmat,dtype=int)
|
||||
tmat.shape = 3,3
|
||||
st = s.tile(tmat)
|
||||
st.check_tiling()
|
||||
#end for
|
||||
#end for
|
||||
nunit('volume')
|
||||
|
||||
nunit('min_image_distances')
|
||||
|
||||
nunit('freeze')
|
||||
|
||||
nunit('interpolate')
|
||||
|
||||
# call all unit tests
|
||||
nunit_all()
|
||||
|
||||
# restore logging function
|
||||
nlog_restore()
|
||||
#end def structure
|
||||
|
||||
|
||||
|
||||
def physical_system():
|
||||
# call all unit tests
|
||||
nunit_all()
|
||||
#end def physical_system
|
||||
|
||||
|
||||
|
||||
def basisset():
|
||||
nunit_all()
|
||||
#end def basisset
|
||||
|
||||
|
||||
|
||||
def pseudopotential():
|
||||
nunit_all()
|
||||
#end def pseudopotential
|
||||
|
||||
|
||||
|
||||
def nexus_base():
|
||||
nunit('import')
|
||||
|
||||
nunit('namespaces')
|
||||
|
||||
nunit('empty_init')
|
||||
|
||||
nunit('write_splash')
|
||||
|
||||
nunit('enter_leave')
|
||||
|
||||
nunit_all()
|
||||
#end def nexus_base
|
||||
|
||||
|
||||
|
||||
def pwscf_input():
|
||||
# divert logging function
|
||||
nlog_divert()
|
||||
|
@ -3465,28 +3280,32 @@ def user_examples(label):
|
|||
NexusTest( versions )
|
||||
NexusTest( required_dependencies )
|
||||
NexusTest( optional_dependencies , optional=True)
|
||||
NexusTest( nexus_imports )
|
||||
NexusTest( testing )
|
||||
NexusTest( execute )
|
||||
NexusTest( memory )
|
||||
NexusTest( plotting )
|
||||
NexusTest( superstring )
|
||||
NexusTest( unit_converter )
|
||||
NexusTest( generic_logging )
|
||||
NexusTest( generic_intrinsics )
|
||||
NexusTest( generic_extensions )
|
||||
NexusTest( developer )
|
||||
NexusTest( unit_converter )
|
||||
NexusTest( periodic_table )
|
||||
NexusTest( numerics )
|
||||
NexusTest( grid_functions )
|
||||
NexusTest( fileio )
|
||||
NexusTest( hdfreader )
|
||||
NexusTest( nexus_imports )
|
||||
NexusTest( settings_operation , 'settings' )
|
||||
NexusTest( machines )
|
||||
NexusTest( xmlreader )
|
||||
NexusTest( structure )
|
||||
NexusTest( physical_system )
|
||||
NexusTest( basisset )
|
||||
NexusTest( pseudopotential )
|
||||
NexusTest( nexus_base )
|
||||
NexusTest( machines )
|
||||
NexusTest( pwscf_input )
|
||||
NexusTest( qmcpack_input )
|
||||
NexusTest( grid_functions )
|
||||
NexusTest( settings_operation , 'settings' )
|
||||
|
||||
for label in example_information.keys():
|
||||
NexusTest(
|
||||
|
|
|
@ -65,23 +65,24 @@ class BasisSets(DevBase):
|
|||
bsfiles = bsfiles[0]
|
||||
#end if
|
||||
bss = []
|
||||
print
|
||||
print ' Basissets'
|
||||
self.log('')
|
||||
self.log(' Basissets')
|
||||
for filepath in bsfiles:
|
||||
print ' reading basis: ',filepath
|
||||
self.log(' reading basis: '+filepath)
|
||||
ext = filepath.split('.')[-1].lower()
|
||||
if ext=='gms_bas':
|
||||
if ext=='gms_bas' or ext=='bas':
|
||||
bs = gamessBasisFile(filepath)
|
||||
else:
|
||||
bs = BasisFile(filepath)
|
||||
#end if
|
||||
bss.append(bs)
|
||||
#end for
|
||||
print
|
||||
self.log('')
|
||||
self.addbs(bss)
|
||||
#end def readbs
|
||||
|
||||
|
||||
# test needed
|
||||
def bases_by_atom(self,*bsfiles):
|
||||
bss = obj()
|
||||
for bsfile in bsfiles:
|
||||
|
@ -213,7 +214,7 @@ def process_gaussian_text(text,format,pp=True,basis=True,preserve_spacing=False)
|
|||
last_empty = True
|
||||
for rline in rawlines:
|
||||
line = rline.strip()
|
||||
if (not line.startswith('!')) and (not line.startswith('#')) and len(line)>0:
|
||||
if (not line.startswith('!')) and (not line.startswith('#')) and (not line.startswith('*')) and len(line)>0 and line!='$DATA' and line!='$END':
|
||||
if last_empty:
|
||||
lines = []
|
||||
sections.append(lines)
|
||||
|
@ -315,7 +316,7 @@ class GaussianBasisSet(DevBase):
|
|||
self.read_text(text,format)
|
||||
#end def read
|
||||
|
||||
|
||||
|
||||
def write(self,filepath=None,format=None):
|
||||
if format is None:
|
||||
self.error('format keyword must be specified to write file {0}\nvalid options are: {1}'.format(filepath,self.formats))
|
||||
|
@ -478,11 +479,13 @@ class GaussianBasisSet(DevBase):
|
|||
#end def write_text
|
||||
|
||||
|
||||
# test needed
|
||||
def size(self):
|
||||
return len(self.basis)
|
||||
#end def size
|
||||
|
||||
|
||||
# test needed
|
||||
def lset(self):
|
||||
lset = set()
|
||||
for bf in self.basis:
|
||||
|
@ -492,11 +495,13 @@ class GaussianBasisSet(DevBase):
|
|||
#end def lset
|
||||
|
||||
|
||||
# test needed
|
||||
def lcount(self):
|
||||
return len(self.lset())
|
||||
#end def lcount
|
||||
|
||||
|
||||
# test needed
|
||||
def lbasis(self):
|
||||
lbasis = obj()
|
||||
for n in range(len(self.basis)):
|
||||
|
@ -511,6 +516,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def lbasis
|
||||
|
||||
|
||||
# test needed
|
||||
def lsort(self):
|
||||
lbasis = self.lbasis()
|
||||
self.basis.clear()
|
||||
|
@ -526,6 +532,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def lsort
|
||||
|
||||
|
||||
# test needed
|
||||
def uncontracted(self):
|
||||
all_uncon = True
|
||||
for bf in self.basis:
|
||||
|
@ -535,11 +542,13 @@ class GaussianBasisSet(DevBase):
|
|||
#end def uncontracted
|
||||
|
||||
|
||||
# test needed
|
||||
def contracted(self):
|
||||
return not self.uncontracted()
|
||||
#end def contracted
|
||||
|
||||
|
||||
# test needed
|
||||
def uncontract(self,tol=1e-3):
|
||||
if self.uncontracted():
|
||||
return
|
||||
|
@ -572,6 +581,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def uncontract
|
||||
|
||||
|
||||
# test needed
|
||||
def contracted_basis_size(self):
|
||||
bcount = obj()
|
||||
for bf in self.basis:
|
||||
|
@ -591,6 +601,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def contracted_basis_size
|
||||
|
||||
|
||||
# test needed
|
||||
def uncontracted_basis_size(self):
|
||||
if self.uncontracted():
|
||||
return self.contracted_basis_size()
|
||||
|
@ -601,6 +612,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def uncontracted_basis_size
|
||||
|
||||
|
||||
# test needed
|
||||
def basis_size(self):
|
||||
us = self.uncontracted_basis_size()
|
||||
cs = self.contracted_basis_size()
|
||||
|
@ -608,6 +620,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def basis_size
|
||||
|
||||
|
||||
# test needed
|
||||
def prim_expons(self):
|
||||
if self.contracted():
|
||||
self.error('cannot find primitive gaussian expons because basis is contracted')
|
||||
|
@ -625,6 +638,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def prim_expons
|
||||
|
||||
|
||||
# test needed
|
||||
def prim_widths(self):
|
||||
if self.contracted():
|
||||
self.error('cannot find primitive gaussian widths because basis is contracted')
|
||||
|
@ -642,6 +656,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def prim_widths
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_prims(self,comp=None,keep=None,**lselectors):
|
||||
lbasis = self.lbasis()
|
||||
if comp!=None:
|
||||
|
@ -720,6 +735,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_prims
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_small_prims(self,**keep):
|
||||
lsel = obj()
|
||||
for l,lbas in self.lbasis().iteritems():
|
||||
|
@ -731,6 +747,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_small_prims
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_large_prims(self,**keep):
|
||||
lsel = obj()
|
||||
for l,lbas in self.lbasis().iteritems():
|
||||
|
@ -742,6 +759,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_large_prims
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_small_prims_rel(self,other,**keep):
|
||||
gwidths = other.prim_widths()
|
||||
lsel = obj()
|
||||
|
@ -752,6 +770,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_small_prims_rel
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_large_prims_rel(self,other,**keep):
|
||||
gwidths = other.prim_widths()
|
||||
lsel = obj()
|
||||
|
@ -762,6 +781,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_large_prims_rel
|
||||
|
||||
|
||||
# test needed
|
||||
def remove_channels(self,llist):
|
||||
lbasis = self.lbasis()
|
||||
for l in llist:
|
||||
|
@ -782,6 +802,7 @@ class GaussianBasisSet(DevBase):
|
|||
#end def remove_channels
|
||||
|
||||
|
||||
# test needed
|
||||
def incorporate(self,other,tol=1e-3,unique=False):
|
||||
uncontracted = self.uncontracted() and other.uncontracted()
|
||||
lbasis = self.lbasis()
|
||||
|
|
|
@ -542,6 +542,7 @@ class Settings(NexusCore):
|
|||
settings = Settings()
|
||||
|
||||
|
||||
# test needed
|
||||
def run_project(*args,**kwargs):
|
||||
if nexus_core.graph_sims:
|
||||
graph_sims()
|
||||
|
@ -558,7 +559,7 @@ def run_project(*args,**kwargs):
|
|||
|
||||
|
||||
|
||||
|
||||
# test needed
|
||||
# read input function
|
||||
# place here for now as it depends on all other input functions
|
||||
def read_input(filepath,format=None):
|
||||
|
|
|
@ -97,7 +97,7 @@ class Ion(Particle):
|
|||
ps.core_electrons = ps.protons - valence
|
||||
return ps
|
||||
#end def pseudize
|
||||
#end class
|
||||
#end class Ion
|
||||
|
||||
|
||||
class PseudoIon(Ion):
|
||||
|
@ -141,6 +141,7 @@ class Particles(Matter):
|
|||
return p
|
||||
#end def get_particle
|
||||
|
||||
# test needed
|
||||
def get(self,quantity):
|
||||
q = obj()
|
||||
for name,particle in self.iteritems():
|
||||
|
@ -457,6 +458,11 @@ class PhysicalSystem(Matter):
|
|||
#end def check_consistent
|
||||
|
||||
|
||||
def is_valid(self):
|
||||
return self.check_consistent(exit=False)
|
||||
#end def is_valid
|
||||
|
||||
|
||||
def change_units(self,units):
|
||||
self.structure.change_units(units,folded=False)
|
||||
if self.folded_system!=None:
|
||||
|
@ -573,47 +579,7 @@ class PhysicalSystem(Matter):
|
|||
#end def get_smallest
|
||||
|
||||
|
||||
def folded_representation(self,arg0,arg1=None):
|
||||
self.error('folded_representation needs a developers attention to make it equivalent with tile')
|
||||
if isinstance(arg0,PhysicalSystem):
|
||||
folded_system = arg0
|
||||
elif isinstance(arg0,str):
|
||||
shape = arg0
|
||||
tiling = arg1
|
||||
if tiling is None:
|
||||
tiling = (1,1,1)
|
||||
#end if
|
||||
if not 'generation_info' in self:
|
||||
self.error('system was not formed with generate_physical_system, cannot form folded representation')
|
||||
#end if
|
||||
structure,element,scale,units,net_charge,net_spin,particles,valency = \
|
||||
self.generation_info.tuple('structure','element','scale','units', \
|
||||
'net_charge','net_spin','particles','valency')
|
||||
folded_system = generate_physical_system(
|
||||
structure = structure,
|
||||
shape = shape,
|
||||
element = element,
|
||||
tiling = tiling,
|
||||
scale = scale,
|
||||
units = units,
|
||||
net_charge = net_charge,
|
||||
net_spin = net_spin,
|
||||
particles = particles,
|
||||
**valency
|
||||
)
|
||||
else:
|
||||
self.error('unrecognized inputs in folded_representation')
|
||||
#end if
|
||||
tilematrix,kmap = self.structure.fold(folded_system.structure,'tilematrix','kmap')
|
||||
self.set(
|
||||
folded_system = folded_system,
|
||||
tilematrix = tilematrix,
|
||||
kmap = kmap
|
||||
)
|
||||
return folded_system
|
||||
#end def folded_representation
|
||||
|
||||
|
||||
# test needed
|
||||
def large_Zeff_elem(self,Zmin):
|
||||
elem = []
|
||||
for atom,Zeff in self.valency.iteritems():
|
||||
|
@ -625,6 +591,7 @@ class PhysicalSystem(Matter):
|
|||
#end def large_Zeff_elem
|
||||
|
||||
|
||||
# test needed
|
||||
def ae_pp_species(self):
|
||||
species = set(self.structure.elem)
|
||||
if self.pseudized:
|
||||
|
@ -637,6 +604,7 @@ class PhysicalSystem(Matter):
|
|||
return ae_species,pp_species
|
||||
#end def ae_pp_species
|
||||
|
||||
|
||||
def kf_rpa(self):
|
||||
nelecs = self.particles.electron_counts()
|
||||
volume = self.structure.volume()
|
||||
|
@ -647,6 +615,7 @@ class PhysicalSystem(Matter):
|
|||
#end class PhysicalSystem
|
||||
|
||||
|
||||
|
||||
import os
|
||||
from structure import generate_structure,read_structure
|
||||
from copy import deepcopy
|
||||
|
@ -799,26 +768,11 @@ def generate_physical_system(**kwargs):
|
|||
#end def generate_physical_system
|
||||
|
||||
|
||||
|
||||
# test needed
|
||||
def ghost_atoms(*particles):
|
||||
for particle in particles:
|
||||
Matter.particle_collection.add_particles(Ion(name=particle,mass=0,charge=0,spin=0,protons=0,neutrons=0))
|
||||
#end for
|
||||
#end def ghost_atoms
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
from structure import generate_structure
|
||||
|
||||
ps = PhysicalSystem(
|
||||
structure = generate_structure('diamond','sc','Ge',(2,2,2),scale=5.639,units='A'),
|
||||
net_charge = 1,
|
||||
net_spin = 1,
|
||||
Ge = 4
|
||||
)
|
||||
|
||||
print 'net_charge',ps.net_charge
|
||||
print 'net_spin ',ps.net_spin
|
||||
print ps.particles
|
||||
|
||||
#end if
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -79,7 +79,7 @@ class MethodAnalyzer(QAanalyzer):
|
|||
complete &= 'opt' in files
|
||||
#end if
|
||||
equil = request.equilibration
|
||||
nblocks_exclude = -1
|
||||
nblocks_exclude = 0
|
||||
if isinstance(equil,int):
|
||||
nblocks_exclude = equil
|
||||
elif isinstance(equil,(dict,obj)):
|
||||
|
|
|
@ -932,6 +932,7 @@ class Structure(Sobj):
|
|||
#end def has_folded_structure
|
||||
|
||||
|
||||
# test needed
|
||||
def group_atoms(self,folded=True):
|
||||
if len(self.elem)>0:
|
||||
order = self.elem.argsort()
|
||||
|
@ -946,6 +947,7 @@ class Structure(Sobj):
|
|||
#end def group_atoms
|
||||
|
||||
|
||||
# test needed
|
||||
def rename(self,folded=True,**name_pairs):
|
||||
elem = self.elem
|
||||
for old,new in name_pairs.iteritems():
|
||||
|
@ -961,6 +963,7 @@ class Structure(Sobj):
|
|||
#end def rename
|
||||
|
||||
|
||||
# test needed
|
||||
def reset_axes(self,axes=None):
|
||||
if axes is None:
|
||||
axes = self.axes
|
||||
|
@ -974,11 +977,13 @@ class Structure(Sobj):
|
|||
#end def reset_axes
|
||||
|
||||
|
||||
# test needed
|
||||
def adjust_axes(self,axes):
|
||||
self.skew(dot(inv(self.axes),axes))
|
||||
#end def adjust_axes
|
||||
|
||||
|
||||
# test needed
|
||||
def reshape_axes(self,reshaping):
|
||||
R = array(reshaping)
|
||||
if abs(abs(det(R))-1)<1e-6:
|
||||
|
@ -1018,6 +1023,7 @@ class Structure(Sobj):
|
|||
#end def corners
|
||||
|
||||
|
||||
# test needed
|
||||
def miller_direction(self,h,k,l,normalize=False):
|
||||
d = dot((h,k,l),self.axes)
|
||||
if normalize:
|
||||
|
@ -1027,6 +1033,7 @@ class Structure(Sobj):
|
|||
#end def miller_direction
|
||||
|
||||
|
||||
# test needed
|
||||
def miller_normal(self,h,k,l,normalize=False):
|
||||
d = dot((h,k,l),self.kaxes)
|
||||
if normalize:
|
||||
|
@ -1036,6 +1043,7 @@ class Structure(Sobj):
|
|||
#end def miller_normal
|
||||
|
||||
|
||||
# test needed
|
||||
def project_plane(self,a1,a2,points=None):
|
||||
# a1/a2: in plane vectors
|
||||
if points is None:
|
||||
|
@ -1097,6 +1105,7 @@ class Structure(Sobj):
|
|||
#end def center_molecule
|
||||
|
||||
|
||||
# test needed
|
||||
def center_solid(self):
|
||||
u = self.pos_unit()
|
||||
du = (1-u.min(0)-u.max(0))/2
|
||||
|
@ -1104,6 +1113,7 @@ class Structure(Sobj):
|
|||
#end def center_solid
|
||||
|
||||
|
||||
# test needed
|
||||
def permute(self,permutation):
|
||||
dim = self.dim
|
||||
P = empty((dim,dim),dtype=int)
|
||||
|
@ -1141,6 +1151,7 @@ class Structure(Sobj):
|
|||
#end def permute
|
||||
|
||||
|
||||
# test needed
|
||||
def rotate_plane(self,plane,angle,units='degrees'):
|
||||
self.pos = rotate_plane(plane,angle,self.pos,units)
|
||||
if self.has_axes():
|
||||
|
@ -1150,6 +1161,7 @@ class Structure(Sobj):
|
|||
#end def rotate_plane
|
||||
|
||||
|
||||
# test needed
|
||||
def upcast(self,DerivedStructure):
|
||||
if not issubclass(DerivedStructure,Structure):
|
||||
self.error(DerivedStructure.__name__,'is not derived from Structure')
|
||||
|
@ -1162,12 +1174,14 @@ class Structure(Sobj):
|
|||
#end def upcast
|
||||
|
||||
|
||||
# test needed
|
||||
def incorporate(self,other):
|
||||
self.set_elem(list(self.elem)+list(other.elem))
|
||||
self.pos=array(list(self.pos)+list(other.pos))
|
||||
#end def incorporate
|
||||
|
||||
|
||||
# test needed
|
||||
def clone_from(self,other):
|
||||
if not isinstance(other,Structure):
|
||||
self.error('cloning failed\ncan only clone from other Structure objects\nreceived object of type: {0}'.format(other.__class__.__name__))
|
||||
|
@ -1177,6 +1191,7 @@ class Structure(Sobj):
|
|||
#end def clone_from
|
||||
|
||||
|
||||
# test needed
|
||||
def add_atoms(self,elem,pos):
|
||||
self.set_elem(list(self.elem)+list(elem))
|
||||
self.pos=array(list(self.pos)+list(pos))
|
||||
|
@ -1215,6 +1230,7 @@ class Structure(Sobj):
|
|||
#end def all_periodic
|
||||
|
||||
|
||||
# test needed
|
||||
def distances(self,pos1=None,pos2=None):
|
||||
if isinstance(pos1,Structure):
|
||||
pos1 = pos1.pos
|
||||
|
@ -1311,6 +1327,7 @@ class Structure(Sobj):
|
|||
#end def rinscribe
|
||||
|
||||
|
||||
# test needed
|
||||
def rwigner_cube(self,*args,**kwargs):
|
||||
cube = Structure()
|
||||
a = self.volume()**(1./3)
|
||||
|
@ -1319,6 +1336,7 @@ class Structure(Sobj):
|
|||
#end def rwigner_cube
|
||||
|
||||
|
||||
# test needed
|
||||
def rinscribe_cube(self,*args,**kwargs):
|
||||
cube = Structure()
|
||||
a = self.volume()**(1./3)
|
||||
|
@ -1337,6 +1355,7 @@ class Structure(Sobj):
|
|||
#end def rcell
|
||||
|
||||
|
||||
# test needed
|
||||
# scale invariant measure of deviation from cube shape
|
||||
# based on deviation of face diagonals from cube
|
||||
def cube_deviation(self):
|
||||
|
@ -1352,6 +1371,7 @@ class Structure(Sobj):
|
|||
#end def cube_deviation
|
||||
|
||||
|
||||
# test needed
|
||||
# apply volume preserving shear-removing transformations to cell axes
|
||||
# resulting unsheared cell has orthogonal axes
|
||||
# while remaining periodically correct
|
||||
|
@ -1384,6 +1404,7 @@ class Structure(Sobj):
|
|||
#end def unsheared_axes
|
||||
|
||||
|
||||
# test needed
|
||||
# vectors parallel to cell faces
|
||||
# length of vectors is distance between parallel face planes
|
||||
# note that the product of distances is not the cell volume in general
|
||||
|
@ -1407,11 +1428,13 @@ class Structure(Sobj):
|
|||
#end def face_vectors
|
||||
|
||||
|
||||
# test needed
|
||||
def face_distances(self):
|
||||
return self.face_vectors(distances=True)[1]
|
||||
#end def face_distances
|
||||
|
||||
|
||||
# test needed
|
||||
def rescale(self,scale):
|
||||
self.scale *= scale
|
||||
self.axes *= scale
|
||||
|
@ -1425,6 +1448,7 @@ class Structure(Sobj):
|
|||
#end def rescale
|
||||
|
||||
|
||||
# test needed
|
||||
def stretch(self,s1,s2,s3):
|
||||
if self.dim!=3:
|
||||
self.error('stretch is currently only implemented for 3 dimensions')
|
||||
|
@ -1434,6 +1458,7 @@ class Structure(Sobj):
|
|||
#end def stretch
|
||||
|
||||
|
||||
# test needed
|
||||
def skew(self,skew):
|
||||
axinv = inv(self.axes)
|
||||
axnew = dot(self.axes,skew)
|
||||
|
@ -1450,6 +1475,7 @@ class Structure(Sobj):
|
|||
#end def skew
|
||||
|
||||
|
||||
# test needed
|
||||
def change_units(self,units,folded=True):
|
||||
if units!=self.units:
|
||||
scale = convert(1,self.units,units)
|
||||
|
@ -1467,6 +1493,7 @@ class Structure(Sobj):
|
|||
#end def change_units
|
||||
|
||||
|
||||
# test needed
|
||||
# insert sep space at loc along axis
|
||||
# if sep<0, space is removed instead
|
||||
def cleave(self,axis,loc,sep=None,remove=False,tol=1e-6):
|
||||
|
@ -1534,6 +1561,7 @@ class Structure(Sobj):
|
|||
#end def cleave
|
||||
|
||||
|
||||
# test needed
|
||||
def translate(self,v):
|
||||
v = array(v)
|
||||
pos = self.pos
|
||||
|
@ -1547,6 +1575,7 @@ class Structure(Sobj):
|
|||
#end def translate
|
||||
|
||||
|
||||
# test needed
|
||||
def slide(self,v,recenter=True):
|
||||
v = array(v)
|
||||
pos = self.pos
|
||||
|
@ -1562,12 +1591,14 @@ class Structure(Sobj):
|
|||
#end def slide
|
||||
|
||||
|
||||
# test needed
|
||||
def zero_corner(self):
|
||||
corner = self.center-self.axes.sum(0)/2
|
||||
self.translate(-corner)
|
||||
#end def zero_corner
|
||||
|
||||
|
||||
# test needed
|
||||
def locate_simple(self,pos):
|
||||
pos = array(pos)
|
||||
if pos.shape==(self.dim,):
|
||||
|
@ -1578,6 +1609,7 @@ class Structure(Sobj):
|
|||
#end def locate_simple
|
||||
|
||||
|
||||
# test needed
|
||||
def locate(self,identifiers,radii=None,exterior=False):
|
||||
indices = None
|
||||
if isinstance(identifiers,Structure):
|
||||
|
@ -1744,6 +1776,7 @@ class Structure(Sobj):
|
|||
#end def magnetize
|
||||
|
||||
|
||||
# test needed
|
||||
def carve(self,identifiers):
|
||||
indices = self.locate(identifiers)
|
||||
if isinstance(identifiers,Structure):
|
||||
|
@ -1760,6 +1793,7 @@ class Structure(Sobj):
|
|||
#end def carve
|
||||
|
||||
|
||||
# test needed
|
||||
def remove(self,identifiers):
|
||||
indices = self.locate(identifiers)
|
||||
keep = list(set(range(len(self.pos)))-set(indices))
|
||||
|
@ -1772,6 +1806,7 @@ class Structure(Sobj):
|
|||
#end def remove
|
||||
|
||||
|
||||
# test needed
|
||||
def replace(self,identifiers,elem=None,pos=None,radii=None,exterior=False):
|
||||
indices = self.locate(identifiers,radii,exterior)
|
||||
if isinstance(elem,Structure):
|
||||
|
@ -1808,6 +1843,7 @@ class Structure(Sobj):
|
|||
#end def replace
|
||||
|
||||
|
||||
# test needed
|
||||
def replace_nearest(self,elem,pos=None):
|
||||
if isinstance(elem,Structure):
|
||||
cell = elem
|
||||
|
@ -1854,6 +1890,7 @@ class Structure(Sobj):
|
|||
#end def replace_nearest
|
||||
|
||||
|
||||
# test needed
|
||||
def point_defect(self,identifiers=None,elem=None,dr=None):
|
||||
if isinstance(elem,str):
|
||||
elem = [elem]
|
||||
|
@ -1937,6 +1974,7 @@ class Structure(Sobj):
|
|||
#end def point_defect
|
||||
|
||||
|
||||
# test needed
|
||||
def species(self,symbol=False):
|
||||
if not symbol:
|
||||
return set(self.elem)
|
||||
|
@ -1952,6 +1990,7 @@ class Structure(Sobj):
|
|||
#end def species
|
||||
|
||||
|
||||
# test needed
|
||||
def ordered_species(self,symbol=False):
|
||||
speclab_set = set()
|
||||
species_labels = []
|
||||
|
@ -1982,6 +2021,7 @@ class Structure(Sobj):
|
|||
#end def ordered_species
|
||||
|
||||
|
||||
# test needed
|
||||
def order_by_species(self,folded=False):
|
||||
species = []
|
||||
species_counts = []
|
||||
|
@ -2015,6 +2055,7 @@ class Structure(Sobj):
|
|||
#end def order_by_species
|
||||
|
||||
|
||||
# test needed
|
||||
def reorder(self,order):
|
||||
order = array(order)
|
||||
self.elem = self.elem[order]
|
||||
|
@ -2022,6 +2063,7 @@ class Structure(Sobj):
|
|||
#end def reorder
|
||||
|
||||
|
||||
# test needed
|
||||
# find layers parallel to a particular cell face
|
||||
# layers are found by scanning a window of width dtol along the axis and counting
|
||||
# the number of atoms within the window. window position w/ max number of atoms
|
||||
|
@ -2122,6 +2164,7 @@ class Structure(Sobj):
|
|||
#end def layers
|
||||
|
||||
|
||||
# test needed
|
||||
def layer_composition(self,layers):
|
||||
lcomp = obj()
|
||||
for d,ind in layers.iteritems():
|
||||
|
@ -2140,6 +2183,7 @@ class Structure(Sobj):
|
|||
#end def layer_composition
|
||||
|
||||
|
||||
# test needed
|
||||
def shells(self,identifiers,radii=None,exterior=False,cumshells=False,distances=False,dtol=1e-6):
|
||||
# get indices for 'core' and 'bulk'
|
||||
# core is selected by identifiers, forms core for shells to be built around
|
||||
|
@ -2217,6 +2261,7 @@ class Structure(Sobj):
|
|||
#end def shells
|
||||
|
||||
|
||||
# test needed
|
||||
# find connected sets of atoms.
|
||||
# indices is a list of atomic indices to consider (self.pos[indices] are their positions)
|
||||
# atoms are considered connected if they are within rmax of each other
|
||||
|
@ -2443,6 +2488,7 @@ class Structure(Sobj):
|
|||
#end def connected_graphs
|
||||
|
||||
|
||||
# test needed
|
||||
# returns connected graphs that are rings up to the requested order
|
||||
# rings are constructed by pairing lines that share endpoints
|
||||
# all vertices of a ring have degree two
|
||||
|
@ -2508,6 +2554,7 @@ class Structure(Sobj):
|
|||
#end def ring_graphs
|
||||
|
||||
|
||||
# test needed
|
||||
# find the centroid of a set of points/atoms in min image convention
|
||||
def min_image_centroid(self,points=None,indices=None):
|
||||
if indices!=None:
|
||||
|
@ -2527,6 +2574,7 @@ class Structure(Sobj):
|
|||
#end def min_image_centroid
|
||||
|
||||
|
||||
# test needed
|
||||
# find min image centroids of multiple sets of points/atoms
|
||||
def min_image_centroids(self,points=None,indices=None):
|
||||
cents = []
|
||||
|
@ -2649,6 +2697,7 @@ class Structure(Sobj):
|
|||
#end def neighbor_table
|
||||
|
||||
|
||||
# test needed
|
||||
def min_image_norms(self,points,norms):
|
||||
if isinstance(norms,int) or isinstance(norms,float):
|
||||
norms = [norms]
|
||||
|
@ -2666,6 +2715,7 @@ class Structure(Sobj):
|
|||
#end def min_image_norms
|
||||
|
||||
|
||||
# test needed
|
||||
# get all neighbors according to contacting voronoi polyhedra in PBC
|
||||
def voronoi_neighbors(self,indices=None,restrict=False,distance_ordered=True):
|
||||
if indices is None:
|
||||
|
@ -2724,6 +2774,7 @@ class Structure(Sobj):
|
|||
#end def voronoi_neighbors
|
||||
|
||||
|
||||
# test needed
|
||||
# get nearest neighbors according to constrants (voronoi, max distance, coord. number)
|
||||
def nearest_neighbors(self,indices=None,rmax=None,nmax=None,restrict=False,voronoi=False,distances=False,**spec_max):
|
||||
if indices is None:
|
||||
|
@ -2787,6 +2838,7 @@ class Structure(Sobj):
|
|||
#end def nearest_neighbors
|
||||
|
||||
|
||||
# test needed
|
||||
# determine local chemical coordination limited by constraints
|
||||
def chemical_coordination(self,indices=None,nmax=None,rmax=None,restrict=False,voronoi=False,neighbors=False,distances=False,**spec_max):
|
||||
if indices is None:
|
||||
|
@ -2835,6 +2887,7 @@ class Structure(Sobj):
|
|||
#end def chemical_coordination
|
||||
|
||||
|
||||
# test needed
|
||||
def rcore_max(self,units=None):
|
||||
nt,dt = self.neighbor_table(self.pos,distances=True)
|
||||
d = dt[:,1]
|
||||
|
@ -2846,6 +2899,7 @@ class Structure(Sobj):
|
|||
#end def rcore_max
|
||||
|
||||
|
||||
# test needed
|
||||
def cell_image(self,p,center=None):
|
||||
pos = array(p,dtype=float)
|
||||
if center is None:
|
||||
|
@ -2863,6 +2917,7 @@ class Structure(Sobj):
|
|||
#end def cell_image
|
||||
|
||||
|
||||
# test needed
|
||||
def center_distances(self,points,center=None):
|
||||
if center is None:
|
||||
c = self.center.copy()
|
||||
|
@ -2877,6 +2932,7 @@ class Structure(Sobj):
|
|||
#end def center_distances
|
||||
|
||||
|
||||
# test needed
|
||||
def recenter(self,center=None):
|
||||
if center is not None:
|
||||
self.center=array(center,dtype=float)
|
||||
|
@ -2894,6 +2950,7 @@ class Structure(Sobj):
|
|||
#end def recenter
|
||||
|
||||
|
||||
# test needed
|
||||
def recorner(self):
|
||||
pos = self.pos
|
||||
axes = self.axes
|
||||
|
@ -2905,6 +2962,7 @@ class Structure(Sobj):
|
|||
#end def recorner
|
||||
|
||||
|
||||
# test needed
|
||||
def recenter_k(self,kpoints=None,kaxes=None,kcenter=None,remove_duplicates=False):
|
||||
use_self = kpoints==None
|
||||
if use_self:
|
||||
|
@ -2961,6 +3019,7 @@ class Structure(Sobj):
|
|||
#end def recenter_k
|
||||
|
||||
|
||||
# test needed
|
||||
def inside(self,pos,axes=None,center=None,tol=1e-8,separate=False):
|
||||
if axes==None:
|
||||
axes=self.axes
|
||||
|
@ -3259,6 +3318,7 @@ class Structure(Sobj):
|
|||
#end def check_tiling
|
||||
|
||||
|
||||
# test needed
|
||||
def kfold(self,tiling,kpoints,kweights):
|
||||
if isinstance(tiling,int):
|
||||
tiling = self.dim*[tiling]
|
||||
|
@ -3284,6 +3344,7 @@ class Structure(Sobj):
|
|||
#end def get_smallest
|
||||
|
||||
|
||||
# test needed
|
||||
def fold(self,small,*requests):
|
||||
self.error('fold needs a developers attention to make it equivalent with tile')
|
||||
if self.dim!=3:
|
||||
|
@ -3449,6 +3510,7 @@ class Structure(Sobj):
|
|||
#end def add_kpoints
|
||||
|
||||
|
||||
# test needed
|
||||
def clear_kpoints(self):
|
||||
self.kpoints = empty((0,self.dim))
|
||||
self.kweights = empty((0,))
|
||||
|
@ -3518,6 +3580,7 @@ class Structure(Sobj):
|
|||
#end def kpoints_reduced
|
||||
|
||||
|
||||
# test needed
|
||||
def inversion_symmetrize_kpoints(self,tol=1e-10,folded=False):
|
||||
kp = self.kpoints
|
||||
kaxes = self.kaxes
|
||||
|
@ -3542,6 +3605,7 @@ class Structure(Sobj):
|
|||
#end def inversion_symmetrize_kpoints
|
||||
|
||||
|
||||
# test needed
|
||||
def unique_points(self,points,axes,weights=None,tol=1e-10):
|
||||
pmap = obj()
|
||||
npoints = len(points)
|
||||
|
@ -3583,6 +3647,7 @@ class Structure(Sobj):
|
|||
#end def unique_points
|
||||
|
||||
|
||||
# test needed
|
||||
def unique_points_fast(self,points,axes,weights=None,tol=1e-10):
|
||||
# use an O(N) cell table instead of an O(N^2) neighbor table
|
||||
pmap = obj()
|
||||
|
@ -3636,6 +3701,7 @@ class Structure(Sobj):
|
|||
#end def unique_points_fast
|
||||
|
||||
|
||||
# test needed
|
||||
def unique_positions(self,tol=1e-10,folded=False):
|
||||
pos,weights,pmap = self.unique_points(self.pos,self.axes)
|
||||
if len(pos)!=len(self.pos):
|
||||
|
@ -3648,6 +3714,7 @@ class Structure(Sobj):
|
|||
#end def unique_positions
|
||||
|
||||
|
||||
# test needed
|
||||
def unique_kpoints(self,tol=1e-10,folded=False):
|
||||
kmap = obj()
|
||||
kp = self.kpoints
|
||||
|
@ -3703,6 +3770,7 @@ class Structure(Sobj):
|
|||
#end def kmap
|
||||
|
||||
|
||||
# test needed
|
||||
def select_twist(self,selector='smallest',tol=1e-6):
|
||||
index = None
|
||||
invalid_selector = False
|
||||
|
@ -3737,6 +3805,7 @@ class Structure(Sobj):
|
|||
#end def select_twist
|
||||
|
||||
|
||||
# test needed
|
||||
def fold_pos(self,large,tol=0.001):
|
||||
vratio = large.volume()/self.volume()
|
||||
if abs(vratio-int(around(vratio)))>1e-6:
|
||||
|
@ -3808,6 +3877,7 @@ class Structure(Sobj):
|
|||
#end def pos_to_cartesian
|
||||
|
||||
|
||||
# test needed
|
||||
def at_Gpoint(self):
|
||||
kpu = self.kpoints_unit()
|
||||
kg = array([0,0,0])
|
||||
|
@ -3815,6 +3885,7 @@ class Structure(Sobj):
|
|||
#end def at_Gpoint
|
||||
|
||||
|
||||
# test needed
|
||||
def at_Lpoint(self):
|
||||
kpu = self.kpoints_unit()
|
||||
kg = array([.5,.5,.5])
|
||||
|
@ -3822,12 +3893,14 @@ class Structure(Sobj):
|
|||
#end def at_Lpoint
|
||||
|
||||
|
||||
# test needed
|
||||
def at_real_kpoint(self):
|
||||
kpu = 2*self.kpoints_unit()
|
||||
return len(kpu)==1 and abs(kpu-around(kpu)).sum()<1e-6
|
||||
#end def at_real_kpoint
|
||||
|
||||
|
||||
# test needed
|
||||
def bonds(self,neighbors,vectors=False):
|
||||
if self.dim!=3:
|
||||
self.error('bonds is currently only implemented for 3 dimensions')
|
||||
|
@ -3866,6 +3939,7 @@ class Structure(Sobj):
|
|||
#end def bonds
|
||||
|
||||
|
||||
# test needed
|
||||
def displacement(self,reference,map=False):
|
||||
if self.dim!=3:
|
||||
self.error('displacement is currently only implemented for 3 dimensions')
|
||||
|
@ -3883,11 +3957,13 @@ class Structure(Sobj):
|
|||
#end def displacement
|
||||
|
||||
|
||||
# test needed
|
||||
def scalar_displacement(self,reference):
|
||||
return sqrt((self.displacement(reference)**2).sum(1))
|
||||
#end def scalar_displacement
|
||||
|
||||
|
||||
# test needed
|
||||
def distortion(self,reference,neighbors):
|
||||
if self.dim!=3:
|
||||
self.error('distortion is currently only implemented for 3 dimensions')
|
||||
|
@ -3939,6 +4015,7 @@ class Structure(Sobj):
|
|||
#end def distortion
|
||||
|
||||
|
||||
# test needed
|
||||
def bond_compression(self,reference,neighbors):
|
||||
ref = reference
|
||||
rbi,rbc,rbl = ref.bonds(neighbors)
|
||||
|
@ -3948,6 +4025,7 @@ class Structure(Sobj):
|
|||
#end def bond_compression
|
||||
|
||||
|
||||
# test needed
|
||||
def boundary(self,dims=(0,1,2),dtol=1e-6):
|
||||
dim_eff = len(dims)
|
||||
natoms,dim = self.pos.shape
|
||||
|
@ -4014,6 +4092,7 @@ class Structure(Sobj):
|
|||
#end def embed
|
||||
|
||||
|
||||
# test needed
|
||||
def shell(self,cell,neighbors,direction='in'):
|
||||
if self.dim!=3:
|
||||
self.error('shell is currently only implemented for 3 dimensions')
|
||||
|
@ -4413,6 +4492,7 @@ class Structure(Sobj):
|
|||
#end def read_cif
|
||||
|
||||
|
||||
# test needed
|
||||
def read_fhi_aims(self,filepath):
|
||||
if os.path.exists(filepath):
|
||||
lines = open(filepath,'r').read().splitlines()
|
||||
|
@ -4563,6 +4643,7 @@ class Structure(Sobj):
|
|||
#end def write_poscar
|
||||
|
||||
|
||||
# test needed
|
||||
def write_fhi_aims(self,filepath=None):
|
||||
s = self.copy()
|
||||
s.change_units('A')
|
||||
|
@ -4904,6 +4985,7 @@ def get_structure_with_bands(
|
|||
units = 'A')
|
||||
#end def get_structure_with_bands
|
||||
|
||||
# test needed
|
||||
def get_band_tiling(
|
||||
structure = None,
|
||||
check_standard = True,
|
||||
|
@ -5266,6 +5348,7 @@ def interpolate_structures(struct1,struct2=None,images=None,min_image=True,recen
|
|||
#end def interpolate_structures
|
||||
|
||||
|
||||
# test needed
|
||||
def structure_animation(filepath,structures,tiling=None):
|
||||
path,file = os.path.split(filepath)
|
||||
if not file.endswith('xyz'):
|
||||
|
@ -6042,6 +6125,7 @@ class Crystal(Structure):
|
|||
#end class Crystal
|
||||
|
||||
|
||||
# test needed
|
||||
class Jellium(Structure):
|
||||
prefactors = obj()
|
||||
prefactors.transfer_from({1:2*pi,2:4*pi,3:4./3*pi})
|
||||
|
@ -6104,6 +6188,7 @@ class Jellium(Structure):
|
|||
|
||||
|
||||
|
||||
# test needed
|
||||
def generate_cell(shape,tiling=None,scale=1.,units=None,struct_type=Structure):
|
||||
if tiling is None:
|
||||
tiling = (1,1,1)
|
||||
|
@ -6149,6 +6234,7 @@ def generate_structure(type='crystal',*args,**kwargs):
|
|||
|
||||
|
||||
|
||||
# test needed
|
||||
def generate_atom_structure(
|
||||
atom = None,
|
||||
units = 'A',
|
||||
|
@ -6177,6 +6263,7 @@ def generate_atom_structure(
|
|||
#end def generate_atom_structure
|
||||
|
||||
|
||||
# test needed
|
||||
def generate_dimer_structure(
|
||||
dimer = None,
|
||||
units = 'A',
|
||||
|
@ -6218,6 +6305,7 @@ def generate_dimer_structure(
|
|||
#end def generate_dimer_structure
|
||||
|
||||
|
||||
# test needed
|
||||
def generate_trimer_structure(
|
||||
trimer = None,
|
||||
units = 'A',
|
||||
|
@ -6299,6 +6387,7 @@ def generate_trimer_structure(
|
|||
#end def generate_trimer_structure
|
||||
|
||||
|
||||
# test needed
|
||||
def generate_jellium_structure(*args,**kwargs):
|
||||
return Jellium(*args,**kwargs)
|
||||
#end def generate_jellium_structure
|
||||
|
@ -6529,40 +6618,6 @@ def read_structure(filepath,elem=None,format=None):
|
|||
|
||||
|
||||
|
||||
#if __name__=='__main__':
|
||||
# from numpy.random import rand
|
||||
# from matplotlib.pyplot import figure,plot,show
|
||||
#
|
||||
# ax = array([[1.0,.3,.1],[.2,1.2,-.1],[.2,.1,1.]])
|
||||
# #ax = array([[1.0,0,0],[0,1.,0],[0,0,1.]])
|
||||
# pos = 4*(rand(50,3)-.5)
|
||||
# c = (ax[0]+ax[1])/2
|
||||
# elem = []
|
||||
# for i in range(len(pos)):
|
||||
# elem.append('Ge')
|
||||
# #end for
|
||||
# s = Structure(axes=ax,pos=pos,elem=elem)
|
||||
#
|
||||
# #figure()
|
||||
# #plot(s.pos[:,0],s.pos[:,1],'bo')
|
||||
# #plot([0,x1,x1+x2,x2,0],[0,y1,y1+y2,y2,0],'k-',lw=2)
|
||||
# #s.recenter(c)
|
||||
# #plot(s.pos[:,0],s.pos[:,1],'r.')
|
||||
#
|
||||
# #figure()
|
||||
# #s.plot2d('bo')
|
||||
# #s.recenter(c)
|
||||
# #s.plot2d('r.')
|
||||
# #show()
|
||||
#
|
||||
# figure()
|
||||
# s.recenter(c)
|
||||
# s.plot2d('bo')
|
||||
# cs=s.carve(s.axes/2,s.center)
|
||||
# cs.plot2d('r.')
|
||||
# show()
|
||||
##end if
|
||||
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
|
|
@ -225,3 +225,55 @@ def setup_unit_test_output_directory(test,subtest):
|
|||
assert(os.path.exists(path))
|
||||
return path
|
||||
#end def setup_unit_test_output_directory
|
||||
|
||||
|
||||
# class used to divert log output when desired
|
||||
class FakeLog:
|
||||
def __init__(self):
|
||||
self.reset()
|
||||
#end def __init__
|
||||
|
||||
def reset(self):
|
||||
self.s = ''
|
||||
#end def reset
|
||||
|
||||
def write(self,s):
|
||||
self.s+=s
|
||||
#end def write
|
||||
|
||||
def close(self):
|
||||
None
|
||||
#end def close
|
||||
|
||||
def contents(self):
|
||||
return self.s
|
||||
#end def contents
|
||||
#end class FakeLog
|
||||
|
||||
|
||||
# dict to temporarily store logger when log output is diverted
|
||||
logging_storage = dict()
|
||||
|
||||
|
||||
|
||||
# divert nexus log output
|
||||
def divert_nexus_log():
|
||||
from generic import generic_settings,object_interface
|
||||
assert(len(logging_storage)==0)
|
||||
logging_storage['devlog'] = generic_settings.devlog
|
||||
logging_storage['objlog'] = object_interface._logfile
|
||||
logfile = FakeLog()
|
||||
generic_settings.devlog = logfile
|
||||
object_interface._logfile = logfile
|
||||
return logfile
|
||||
#end def divert_nexus_log
|
||||
|
||||
|
||||
# restore nexus log output
|
||||
def restore_nexus_log():
|
||||
from generic import generic_settings,object_interface
|
||||
generic_settings.devlog = logging_storage['devlog']
|
||||
object_interface._logfile = logging_storage['objlog']
|
||||
logging_storage.clear()
|
||||
assert(len(logging_storage)==0)
|
||||
#end def restore_nexus_log
|
||||
|
|
|
@ -92,7 +92,7 @@ class XMLelement(DevBase):
|
|||
#end for
|
||||
#end if
|
||||
return s
|
||||
#end def list
|
||||
#end def _to_string
|
||||
|
||||
# def __str__(self):
|
||||
# return self._to_string()
|
||||
|
@ -118,6 +118,7 @@ class XMLelement(DevBase):
|
|||
#end def __init__
|
||||
|
||||
|
||||
# test needed
|
||||
def condense(self):
|
||||
for name,elem in self._elements.iteritems():
|
||||
if isinstance(elem,XMLelement):
|
||||
|
@ -159,6 +160,7 @@ class XMLelement(DevBase):
|
|||
#end def condense
|
||||
|
||||
|
||||
# test needed
|
||||
def convert_numeric(self):
|
||||
for name,attr in self._attributes.iteritems():
|
||||
self[name] = string2val(attr)
|
||||
|
@ -280,6 +282,7 @@ class XMLreader(DevBase):
|
|||
return
|
||||
#end def __init__
|
||||
|
||||
# test needed
|
||||
def include_files(self):
|
||||
pair = '<include','/>'
|
||||
qpair = '<?','?>'
|
||||
|
|
|
@ -0,0 +1,193 @@
|
|||
|
||||
import testing
|
||||
from testing import value_eq,object_eq
|
||||
from testing import divert_nexus_log,restore_nexus_log
|
||||
|
||||
|
||||
associated_files = dict()
|
||||
|
||||
|
||||
def get_filenames():
|
||||
filenames = [
|
||||
'Fe.aug-cc-pwcv5z-dk.0.bas',
|
||||
'Fe.aug-cc-pwcv5z-dk.0.gbs',
|
||||
'Fe.BFD_VQZ.bas',
|
||||
'Fe.BFD_VQZ.gbs',
|
||||
'Fe.stuttgart_rsc_1997.0.bas',
|
||||
'Fe.stuttgart_rsc_1997.0.gbs',
|
||||
'Fe.stuttgart_rsc_1997_ecp.0.bas',
|
||||
'Fe.stuttgart_rsc_1997_ecp.0.gbs',
|
||||
]
|
||||
return filenames
|
||||
#end def get_filenames
|
||||
|
||||
|
||||
def get_files():
|
||||
return testing.collect_unit_test_file_paths('basisset',associated_files)
|
||||
#end def get_files
|
||||
|
||||
|
||||
|
||||
def test_files():
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
assert(set(files.keys())==set(filenames))
|
||||
#end def test_files
|
||||
|
||||
|
||||
|
||||
def test_import():
|
||||
import basisset
|
||||
from basisset import BasisSets
|
||||
from basisset import process_gaussian_text
|
||||
from basisset import GaussianBasisSet
|
||||
#end def test_import
|
||||
|
||||
|
||||
|
||||
def test_basissets():
|
||||
from basisset import BasisSets
|
||||
from basisset import BasisFile
|
||||
from basisset import gamessBasisFile
|
||||
|
||||
# empty initialization
|
||||
BasisSets()
|
||||
BasisFile()
|
||||
gamessBasisFile()
|
||||
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
f = [files[fn] for fn in filenames]
|
||||
|
||||
# standard initialization
|
||||
divert_nexus_log()
|
||||
bf = BasisFile(f[1])
|
||||
gbf = gamessBasisFile(f[0])
|
||||
bs = BasisSets(f[2:]+[bf,gbf])
|
||||
restore_nexus_log()
|
||||
|
||||
assert(bf.element=='Fe')
|
||||
assert(bf.filename=='Fe.aug-cc-pwcv5z-dk.0.gbs')
|
||||
|
||||
assert(gbf.element=='Fe')
|
||||
assert(gbf.filename=='Fe.aug-cc-pwcv5z-dk.0.bas')
|
||||
assert(gbf.text.startswith('IRON'))
|
||||
assert(gbf.text.endswith('1 1.3776500 1.0000000'))
|
||||
assert(len(gbf.text.strip())==21135)
|
||||
|
||||
for fn in filenames:
|
||||
assert(fn in bs)
|
||||
assert(isinstance(bs[fn],BasisFile))
|
||||
if fn.endswith('.bas'):
|
||||
assert(isinstance(bs[fn],gamessBasisFile))
|
||||
#end if
|
||||
#end for
|
||||
#end def test_basissets
|
||||
|
||||
|
||||
|
||||
def test_process_gaussian_text():
|
||||
from basisset import process_gaussian_text
|
||||
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
|
||||
bs_ref = {
|
||||
'Fe.aug-cc-pwcv5z-dk.0.bas' : 503,
|
||||
'Fe.aug-cc-pwcv5z-dk.0.gbs' : 503,
|
||||
'Fe.BFD_VQZ.bas' : 132,
|
||||
'Fe.BFD_VQZ.gbs' : 132,
|
||||
'Fe.stuttgart_rsc_1997.0.bas' : 38,
|
||||
'Fe.stuttgart_rsc_1997.0.gbs' : 38,
|
||||
|
||||
}
|
||||
|
||||
pp_ref = {
|
||||
'Fe.BFD_VQZ.bas' : ( 9, 132 ),
|
||||
'Fe.BFD_VQZ.gbs' : ( 13, 132 ),
|
||||
'Fe.stuttgart_rsc_1997.0.bas' : ( 13, 38 ),
|
||||
'Fe.stuttgart_rsc_1997.0.gbs' : ( 17, 38 ),
|
||||
'Fe.stuttgart_rsc_1997_ecp.0.bas' : ( 13, None ),
|
||||
'Fe.stuttgart_rsc_1997_ecp.0.gbs' : ( 17, None ),
|
||||
}
|
||||
|
||||
for fn in filenames:
|
||||
|
||||
if fn.endswith('.bas'):
|
||||
format = 'gamess'
|
||||
elif fn.endswith('.gbs'):
|
||||
format = 'gaussian'
|
||||
else:
|
||||
format = None
|
||||
#end if
|
||||
|
||||
f = open(files[fn],'r')
|
||||
text = f.read()
|
||||
f.close()
|
||||
|
||||
bs = process_gaussian_text(text,format,pp=False)
|
||||
|
||||
if fn in bs_ref:
|
||||
assert(len(bs)==bs_ref[fn])
|
||||
#end if
|
||||
|
||||
pp,bs = process_gaussian_text(text,format)
|
||||
|
||||
if fn in pp_ref:
|
||||
ppr,bsr = pp_ref[fn]
|
||||
assert(len(pp)==ppr)
|
||||
if bsr is None:
|
||||
assert(bs is None)
|
||||
else:
|
||||
assert(len(bs)==bsr)
|
||||
#end if
|
||||
#end if
|
||||
#end for
|
||||
#end def test_process_gaussian_text
|
||||
|
||||
|
||||
|
||||
|
||||
def test_gaussianbasisset():
|
||||
from basisset import GaussianBasisSet
|
||||
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
|
||||
GaussianBasisSet()
|
||||
|
||||
ref = {
|
||||
'Fe.aug-cc-pwcv5z-dk.0.bas' : 49,
|
||||
'Fe.aug-cc-pwcv5z-dk.0.gbs' : 49,
|
||||
'Fe.BFD_VQZ.bas' : 23,
|
||||
'Fe.BFD_VQZ.gbs' : 23,
|
||||
'Fe.stuttgart_rsc_1997.0.bas' : 15,
|
||||
'Fe.stuttgart_rsc_1997.0.gbs' : 15,
|
||||
}
|
||||
|
||||
gbs = dict()
|
||||
for fn in filenames:
|
||||
if 'ecp' not in fn:
|
||||
if fn.endswith('.bas'):
|
||||
format = 'gamess'
|
||||
elif fn.endswith('.gbs'):
|
||||
format = 'gaussian'
|
||||
else:
|
||||
format = None
|
||||
#end if
|
||||
|
||||
bs = GaussianBasisSet(files[fn],format)
|
||||
|
||||
assert(bs.name=='Fe')
|
||||
assert(len(bs.basis)==ref[fn])
|
||||
|
||||
text = bs.write(format=format)
|
||||
text = 'header line\n'+text
|
||||
bs2 = GaussianBasisSet()
|
||||
bs2.read_text(text,format=format)
|
||||
|
||||
assert(object_eq(bs.basis,bs2.basis))
|
||||
#end if
|
||||
#end for
|
||||
#end def test_gaussianbasisset
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
Fe 26 0. 0. 0.
|
||||
s 8 1.00
|
||||
1 25.882657 -0.010318
|
||||
2 14.037755 0.230364
|
||||
3 9.007794 -0.566551
|
||||
4 2.068350 0.544437
|
||||
5 0.993498 0.540001
|
||||
6 0.471151 0.143115
|
||||
7 0.102489 0.007386
|
||||
8 0.036902 0.001869
|
||||
s 8 1.00
|
||||
1 25.882657 0.000341
|
||||
2 14.037755 -0.047646
|
||||
3 9.007794 0.136465
|
||||
4 2.068350 -0.153371
|
||||
5 0.993498 -0.288555
|
||||
6 0.471151 -0.044212
|
||||
7 0.102489 0.704768
|
||||
8 0.036902 0.415407
|
||||
s 8 1.00
|
||||
1 25.882657 -0.030967
|
||||
2 14.037755 -0.034192
|
||||
3 9.007794 0.383443
|
||||
4 2.068350 -1.259192
|
||||
5 0.993498 -0.098913
|
||||
6 0.471151 1.194321
|
||||
7 0.102489 0.555024
|
||||
8 0.036902 -1.077563
|
||||
s 8 1.00
|
||||
1 25.882657 0.429968
|
||||
2 14.037755 -1.786544
|
||||
3 9.007794 1.482641
|
||||
4 2.068350 2.684004
|
||||
5 0.993498 -6.152490
|
||||
6 0.471151 4.806621
|
||||
7 0.102489 -2.134831
|
||||
8 0.036902 0.805728
|
||||
s 8 1.00
|
||||
1 25.882657 1.274830
|
||||
2 14.037755 -6.369131
|
||||
3 9.007794 7.265762
|
||||
4 2.068350 -4.893384
|
||||
5 0.993498 4.859963
|
||||
6 0.471151 -1.939411
|
||||
7 0.102489 -0.429262
|
||||
8 0.036902 1.856456
|
||||
s 1 1.00
|
||||
1 0.017500 1.000000
|
||||
p 7 1.00
|
||||
1 16.659389 0.007223
|
||||
2 10.450653 -0.070315
|
||||
3 4.183289 0.229161
|
||||
4 2.117962 0.393199
|
||||
5 1.064494 0.361596
|
||||
6 0.514743 0.154139
|
||||
7 0.210442 0.016498
|
||||
p 7 1.00
|
||||
1 16.659389 -0.005560
|
||||
2 10.450653 0.063506
|
||||
3 4.183289 -0.276956
|
||||
4 2.117962 -0.321479
|
||||
5 1.064494 -0.004808
|
||||
6 0.514743 0.330833
|
||||
7 0.210442 0.357095
|
||||
p 7 1.00
|
||||
1 16.659389 0.008185
|
||||
2 10.450653 -0.125348
|
||||
3 4.183289 0.657186
|
||||
4 2.117962 0.505908
|
||||
5 1.064494 -0.773757
|
||||
6 0.514743 -0.592779
|
||||
7 0.210442 0.185315
|
||||
p 7 1.00
|
||||
1 16.659389 0.037533
|
||||
2 10.450653 0.089805
|
||||
3 4.183289 -1.569597
|
||||
4 2.117962 1.106861
|
||||
5 1.064494 1.129157
|
||||
6 0.514743 -1.167998
|
||||
7 0.210442 -0.795499
|
||||
p 7 1.00
|
||||
1 16.659389 -0.348881
|
||||
2 10.450653 0.672826
|
||||
3 4.183289 1.674870
|
||||
4 2.117962 -3.923602
|
||||
5 1.064494 2.917359
|
||||
6 0.514743 0.019595
|
||||
7 0.210442 -1.965905
|
||||
p 1 1.00
|
||||
1 0.105000 1.000000
|
||||
d 6 1.00
|
||||
1 10.232413 0.081591
|
||||
2 4.841151 0.263190
|
||||
3 2.039827 0.342856
|
||||
4 0.840565 0.338326
|
||||
5 0.328485 0.240730
|
||||
6 0.116926 0.088375
|
||||
d 6 1.00
|
||||
1 10.232413 -0.086500
|
||||
2 4.841151 -0.339738
|
||||
3 2.039827 -0.328882
|
||||
4 0.840565 0.130025
|
||||
5 0.328485 0.494941
|
||||
6 0.116926 0.365933
|
||||
d 6 1.00
|
||||
1 10.232413 -0.101424
|
||||
2 4.841151 -0.548492
|
||||
3 2.039827 -0.002091
|
||||
4 0.840565 0.828457
|
||||
5 0.328485 -0.088206
|
||||
6 0.116926 -0.590958
|
||||
d 6 1.00
|
||||
1 10.232413 -0.233647
|
||||
2 4.841151 -0.793234
|
||||
3 2.039827 1.273621
|
||||
4 0.840565 -0.201388
|
||||
5 0.328485 -0.821928
|
||||
6 0.116926 0.641824
|
||||
d 1 1.00
|
||||
1 0.058000 1.000000
|
||||
f 1 1.00
|
||||
1 0.817020 1.000000
|
||||
f 1 1.00
|
||||
1 2.413470 1.000000
|
||||
f 1 1.00
|
||||
1 6.141057 1.000000
|
||||
g 1 1.00
|
||||
1 1.926033 1.000000
|
||||
g 1 1.00
|
||||
1 4.951166 1.000000
|
||||
h 1 1.00
|
||||
1 4.344918 1.000000
|
||||
|
||||
|
||||
Fe-QMC_SC GEN 10 2
|
||||
3
|
||||
16.00000000 1 3.72075632
|
||||
59.53210107 3 3.92321272
|
||||
-68.75847841 2 3.89595440
|
||||
1
|
||||
112.92561163 2 10.42343546
|
||||
1
|
||||
52.55882759 2 8.41664076
|
|
@ -0,0 +1,146 @@
|
|||
Fe 0
|
||||
s 8 1.00
|
||||
25.882657 -0.010318
|
||||
14.037755 0.230364
|
||||
9.007794 -0.566551
|
||||
2.068350 0.544437
|
||||
0.993498 0.540001
|
||||
0.471151 0.143115
|
||||
0.102489 0.007386
|
||||
0.036902 0.001869
|
||||
s 8 1.00
|
||||
25.882657 0.000341
|
||||
14.037755 -0.047646
|
||||
9.007794 0.136465
|
||||
2.068350 -0.153371
|
||||
0.993498 -0.288555
|
||||
0.471151 -0.044212
|
||||
0.102489 0.704768
|
||||
0.036902 0.415407
|
||||
s 8 1.00
|
||||
25.882657 -0.030967
|
||||
14.037755 -0.034192
|
||||
9.007794 0.383443
|
||||
2.068350 -1.259192
|
||||
0.993498 -0.098913
|
||||
0.471151 1.194321
|
||||
0.102489 0.555024
|
||||
0.036902 -1.077563
|
||||
s 8 1.00
|
||||
25.882657 0.429968
|
||||
14.037755 -1.786544
|
||||
9.007794 1.482641
|
||||
2.068350 2.684004
|
||||
0.993498 -6.152490
|
||||
0.471151 4.806621
|
||||
0.102489 -2.134831
|
||||
0.036902 0.805728
|
||||
s 8 1.00
|
||||
25.882657 1.274830
|
||||
14.037755 -6.369131
|
||||
9.007794 7.265762
|
||||
2.068350 -4.893384
|
||||
0.993498 4.859963
|
||||
0.471151 -1.939411
|
||||
0.102489 -0.429262
|
||||
0.036902 1.856456
|
||||
s 1 1.00
|
||||
0.017500 1.000000
|
||||
p 7 1.00
|
||||
16.659389 0.007223
|
||||
10.450653 -0.070315
|
||||
4.183289 0.229161
|
||||
2.117962 0.393199
|
||||
1.064494 0.361596
|
||||
0.514743 0.154139
|
||||
0.210442 0.016498
|
||||
p 7 1.00
|
||||
16.659389 -0.005560
|
||||
10.450653 0.063506
|
||||
4.183289 -0.276956
|
||||
2.117962 -0.321479
|
||||
1.064494 -0.004808
|
||||
0.514743 0.330833
|
||||
0.210442 0.357095
|
||||
p 7 1.00
|
||||
16.659389 0.008185
|
||||
10.450653 -0.125348
|
||||
4.183289 0.657186
|
||||
2.117962 0.505908
|
||||
1.064494 -0.773757
|
||||
0.514743 -0.592779
|
||||
0.210442 0.185315
|
||||
p 7 1.00
|
||||
16.659389 0.037533
|
||||
10.450653 0.089805
|
||||
4.183289 -1.569597
|
||||
2.117962 1.106861
|
||||
1.064494 1.129157
|
||||
0.514743 -1.167998
|
||||
0.210442 -0.795499
|
||||
p 7 1.00
|
||||
16.659389 -0.348881
|
||||
10.450653 0.672826
|
||||
4.183289 1.674870
|
||||
2.117962 -3.923602
|
||||
1.064494 2.917359
|
||||
0.514743 0.019595
|
||||
0.210442 -1.965905
|
||||
p 1 1.00
|
||||
0.105000 1.000000
|
||||
d 6 1.00
|
||||
10.232413 0.081591
|
||||
4.841151 0.263190
|
||||
2.039827 0.342856
|
||||
0.840565 0.338326
|
||||
0.328485 0.240730
|
||||
0.116926 0.088375
|
||||
d 6 1.00
|
||||
10.232413 -0.086500
|
||||
4.841151 -0.339738
|
||||
2.039827 -0.328882
|
||||
0.840565 0.130025
|
||||
0.328485 0.494941
|
||||
0.116926 0.365933
|
||||
d 6 1.00
|
||||
10.232413 -0.101424
|
||||
4.841151 -0.548492
|
||||
2.039827 -0.002091
|
||||
0.840565 0.828457
|
||||
0.328485 -0.088206
|
||||
0.116926 -0.590958
|
||||
d 6 1.00
|
||||
10.232413 -0.233647
|
||||
4.841151 -0.793234
|
||||
2.039827 1.273621
|
||||
0.840565 -0.201388
|
||||
0.328485 -0.821928
|
||||
0.116926 0.641824
|
||||
d 1 1.00
|
||||
0.058000 1.000000
|
||||
f 1 1.00
|
||||
0.817020 1.000000
|
||||
f 1 1.00
|
||||
2.413470 1.000000
|
||||
f 1 1.00
|
||||
6.141057 1.000000
|
||||
g 1 1.00
|
||||
1.926033 1.000000
|
||||
g 1 1.00
|
||||
4.951166 1.000000
|
||||
h 1 1.00
|
||||
4.344918 1.000000
|
||||
|
||||
Fe 0
|
||||
QMC_SC 2 10
|
||||
COMMENT LINE
|
||||
3
|
||||
1 3.72075632 16.00000000
|
||||
3 3.92321272 59.53210107
|
||||
2 3.89595440 -68.75847841
|
||||
COMMENT LINE
|
||||
1
|
||||
2 10.42343546 112.92561163
|
||||
COMMENT LINE
|
||||
1
|
||||
2 8.41664076 52.55882759
|
|
@ -0,0 +1,519 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: aug-cc-pwCV5Z-DK
|
||||
! Description: V5ZPD All-electron Douglas-Kroll Core-Valence
|
||||
! Quintuple Zeta + Polarization
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
$DATA
|
||||
|
||||
IRON
|
||||
S 28
|
||||
1 1.497690E+08 9.531119E-06
|
||||
2 2.672250E+07 2.300510E-05
|
||||
3 5.959000E+06 6.533733E-05
|
||||
4 1.593610E+06 1.539246E-04
|
||||
5 4.934640E+05 3.441447E-04
|
||||
6 1.717900E+05 7.285032E-04
|
||||
7 6.562090E+04 1.517001E-03
|
||||
8 2.696560E+04 3.152876E-03
|
||||
9 1.173530E+04 6.646998E-03
|
||||
10 5.343430E+03 1.421791E-02
|
||||
11 2.522500E+03 3.045407E-02
|
||||
12 1.226430E+03 6.326536E-02
|
||||
13 6.112690E+02 1.217368E-01
|
||||
14 3.113080E+02 2.031899E-01
|
||||
15 1.616240E+02 2.639911E-01
|
||||
16 8.537670E+01 2.217772E-01
|
||||
17 4.579110E+01 9.737963E-02
|
||||
18 2.486770E+01 4.984019E-02
|
||||
19 1.362020E+01 8.424513E-02
|
||||
20 7.481060E+00 6.965248E-02
|
||||
21 4.088170E+00 1.953405E-02
|
||||
22 2.199050E+00 1.411159E-03
|
||||
23 1.148150E+00 -3.351105E-05
|
||||
24 5.772650E-01 -6.461351E-05
|
||||
25 1.976350E-01 -5.426027E-07
|
||||
26 1.089860E-01 9.196538E-06
|
||||
27 5.321600E-02 8.539820E-06
|
||||
28 2.557100E-02 3.106496E-06
|
||||
S 28
|
||||
1 1.497690E+08 -4.913763E-06
|
||||
2 2.672250E+07 -1.186149E-05
|
||||
3 5.959000E+06 -3.369390E-05
|
||||
4 1.593610E+06 -7.940325E-05
|
||||
5 4.934640E+05 -1.776260E-04
|
||||
6 1.717900E+05 -3.763323E-04
|
||||
7 6.562090E+04 -7.847577E-04
|
||||
8 2.696560E+04 -1.634599E-03
|
||||
9 1.173530E+04 -3.458929E-03
|
||||
10 5.343430E+03 -7.445276E-03
|
||||
11 2.522500E+03 -1.613255E-02
|
||||
12 1.226430E+03 -3.424328E-02
|
||||
13 6.112690E+02 -6.867767E-02
|
||||
14 3.113080E+02 -1.241129E-01
|
||||
15 1.616240E+02 -1.879234E-01
|
||||
16 8.537670E+01 -2.035676E-01
|
||||
17 4.579110E+01 -8.676264E-02
|
||||
18 2.486770E+01 1.846239E-01
|
||||
19 1.362020E+01 4.648402E-01
|
||||
20 7.481060E+00 3.903679E-01
|
||||
21 4.088170E+00 1.090655E-01
|
||||
22 2.199050E+00 7.382610E-03
|
||||
23 1.148150E+00 -1.537976E-03
|
||||
24 5.772650E-01 -7.905751E-04
|
||||
25 1.976350E-01 -6.577098E-05
|
||||
26 1.089860E-01 8.549943E-05
|
||||
27 5.321600E-02 3.097134E-05
|
||||
28 2.557100E-02 2.023587E-05
|
||||
S 28
|
||||
1 1.497690E+08 1.145921E-06
|
||||
2 2.672250E+07 2.766402E-06
|
||||
3 5.959000E+06 7.859110E-06
|
||||
4 1.593610E+06 1.852562E-05
|
||||
5 4.934640E+05 4.145544E-05
|
||||
6 1.717900E+05 8.789446E-05
|
||||
7 6.562090E+04 1.834278E-04
|
||||
8 2.696560E+04 3.827944E-04
|
||||
9 1.173530E+04 8.117003E-04
|
||||
10 5.343430E+03 1.756160E-03
|
||||
11 2.522500E+03 3.832022E-03
|
||||
12 1.226430E+03 8.263218E-03
|
||||
13 6.112690E+02 1.700162E-02
|
||||
14 3.113080E+02 3.230925E-02
|
||||
15 1.616240E+02 5.300739E-02
|
||||
16 8.537670E+01 6.470433E-02
|
||||
17 4.579110E+01 2.828077E-02
|
||||
18 2.486770E+01 -9.137907E-02
|
||||
19 1.362020E+01 -2.999505E-01
|
||||
20 7.481060E+00 -3.644776E-01
|
||||
21 4.088170E+00 -1.915949E-02
|
||||
22 2.199050E+00 4.570656E-01
|
||||
23 1.148150E+00 5.657498E-01
|
||||
24 5.772650E-01 2.232925E-01
|
||||
25 1.976350E-01 1.356199E-02
|
||||
26 1.089860E-01 -2.894495E-03
|
||||
27 5.321600E-02 2.889479E-03
|
||||
28 2.557100E-02 1.159783E-04
|
||||
S 28
|
||||
1 1.497690E+08 -2.499184E-07
|
||||
2 2.672250E+07 -6.033367E-07
|
||||
3 5.959000E+06 -1.714026E-06
|
||||
4 1.593610E+06 -4.040379E-06
|
||||
5 4.934640E+05 -9.041239E-06
|
||||
6 1.717900E+05 -1.916995E-05
|
||||
7 6.562090E+04 -4.000594E-05
|
||||
8 2.696560E+04 -8.349108E-05
|
||||
9 1.173530E+04 -1.770532E-04
|
||||
10 5.343430E+03 -3.830627E-04
|
||||
11 2.522500E+03 -8.361335E-04
|
||||
12 1.226430E+03 -1.803028E-03
|
||||
13 6.112690E+02 -3.713337E-03
|
||||
14 3.113080E+02 -7.060540E-03
|
||||
15 1.616240E+02 -1.161964E-02
|
||||
16 8.537670E+01 -1.421996E-02
|
||||
17 4.579110E+01 -6.293242E-03
|
||||
18 2.486770E+01 2.055029E-02
|
||||
19 1.362020E+01 6.959376E-02
|
||||
20 7.481060E+00 8.869390E-02
|
||||
21 4.088170E+00 4.909512E-04
|
||||
22 2.199050E+00 -1.299238E-01
|
||||
23 1.148150E+00 -2.097213E-01
|
||||
24 5.772650E-01 -1.737261E-01
|
||||
25 1.976350E-01 1.060750E-01
|
||||
26 1.089860E-01 4.180125E-01
|
||||
27 5.321600E-02 4.927516E-01
|
||||
28 2.557100E-02 1.478611E-01
|
||||
S 28
|
||||
1 1.497690E+08 -5.057064E-07
|
||||
2 2.672250E+07 -1.220404E-06
|
||||
3 5.959000E+06 -3.469376E-06
|
||||
4 1.593610E+06 -8.167834E-06
|
||||
5 4.934640E+05 -1.832321E-05
|
||||
6 1.717900E+05 -3.866489E-05
|
||||
7 6.562090E+04 -8.138991E-05
|
||||
8 2.696560E+04 -1.674412E-04
|
||||
9 1.173530E+04 -3.628889E-04
|
||||
10 5.343430E+03 -7.617575E-04
|
||||
11 2.522500E+03 -1.728858E-03
|
||||
12 1.226430E+03 -3.554612E-03
|
||||
13 6.112690E+02 -7.758713E-03
|
||||
14 3.113080E+02 -1.373763E-02
|
||||
15 1.616240E+02 -2.493160E-02
|
||||
16 8.537670E+01 -2.593594E-02
|
||||
17 4.579110E+01 -1.941813E-02
|
||||
18 2.486770E+01 5.554122E-02
|
||||
19 1.362020E+01 1.214082E-01
|
||||
20 7.481060E+00 2.442000E-01
|
||||
21 4.088170E+00 -9.045983E-02
|
||||
22 2.199050E+00 -2.628125E-01
|
||||
23 1.148150E+00 -7.631501E-01
|
||||
24 5.772650E-01 3.326928E-01
|
||||
25 1.976350E-01 1.404621E+00
|
||||
26 1.089860E-01 -4.692165E-02
|
||||
27 5.321600E-02 -5.871979E-01
|
||||
28 2.557100E-02 -5.175077E-01
|
||||
S 28
|
||||
1 1.497690E+08 -8.093468E-07
|
||||
2 2.672250E+07 -1.952950E-06
|
||||
3 5.959000E+06 -5.553066E-06
|
||||
4 1.593610E+06 -1.306815E-05
|
||||
5 4.934640E+05 -2.934013E-05
|
||||
6 1.717900E+05 -6.181847E-05
|
||||
7 6.562090E+04 -1.304882E-04
|
||||
8 2.696560E+04 -2.672449E-04
|
||||
9 1.173530E+04 -5.831799E-04
|
||||
10 5.343430E+03 -1.212784E-03
|
||||
11 2.522500E+03 -2.786404E-03
|
||||
12 1.226430E+03 -5.647232E-03
|
||||
13 6.112690E+02 -1.255431E-02
|
||||
14 3.113080E+02 -2.178032E-02
|
||||
15 1.616240E+02 -4.077901E-02
|
||||
16 8.537670E+01 -4.054708E-02
|
||||
17 4.579110E+01 -3.465794E-02
|
||||
18 2.486770E+01 9.685341E-02
|
||||
19 1.362020E+01 2.002373E-01
|
||||
20 7.481060E+00 4.769334E-01
|
||||
21 4.088170E+00 -2.581863E-01
|
||||
22 2.199050E+00 -9.230158E-01
|
||||
23 1.148150E+00 -9.809175E-01
|
||||
24 5.772650E-01 2.397220E+00
|
||||
25 1.976350E-01 3.264145E-01
|
||||
26 1.089860E-01 -2.193316E+00
|
||||
27 5.321600E-02 3.872588E-01
|
||||
28 2.557100E-02 8.823095E-01
|
||||
S 28
|
||||
1 1.497690E+08 1.009555E-06
|
||||
2 2.672250E+07 2.438973E-06
|
||||
3 5.959000E+06 6.919803E-06
|
||||
4 1.593610E+06 1.635306E-05
|
||||
5 4.934640E+05 3.641348E-05
|
||||
6 1.717900E+05 7.794704E-05
|
||||
7 6.562090E+04 1.599140E-04
|
||||
8 2.696560E+04 3.433745E-04
|
||||
9 1.173530E+04 6.974589E-04
|
||||
10 5.343430E+03 1.602278E-03
|
||||
11 2.522500E+03 3.239062E-03
|
||||
12 1.226430E+03 7.683257E-03
|
||||
13 6.112690E+02 1.414236E-02
|
||||
14 3.113080E+02 3.109497E-02
|
||||
15 1.616240E+02 4.257946E-02
|
||||
16 8.537670E+01 7.133516E-02
|
||||
17 4.579110E+01 2.183397E-03
|
||||
18 2.486770E+01 -3.611419E-02
|
||||
19 1.362020E+01 -4.667594E-01
|
||||
20 7.481060E+00 -4.745196E-01
|
||||
21 4.088170E+00 3.405478E-01
|
||||
22 2.199050E+00 2.965055E+00
|
||||
23 1.148150E+00 -3.124263E+00
|
||||
24 5.772650E-01 -7.678803E-01
|
||||
25 1.976350E-01 4.549504E+00
|
||||
26 1.089860E-01 -3.555516E+00
|
||||
27 5.321600E-02 -7.601738E-01
|
||||
28 2.557100E-02 1.387333E+00
|
||||
S 28
|
||||
1 1.497690E+08 -1.171395E-06
|
||||
2 2.672250E+07 -2.828050E-06
|
||||
3 5.959000E+06 -8.033704E-06
|
||||
4 1.593610E+06 -1.894135E-05
|
||||
5 4.934640E+05 -4.237323E-05
|
||||
6 1.717900E+05 -8.991028E-05
|
||||
7 6.562090E+04 -1.874489E-04
|
||||
8 2.696560E+04 -3.920043E-04
|
||||
9 1.173530E+04 -8.294306E-04
|
||||
10 5.343430E+03 -1.802024E-03
|
||||
11 2.522500E+03 -3.921863E-03
|
||||
12 1.226430E+03 -8.517307E-03
|
||||
13 6.112690E+02 -1.752690E-02
|
||||
14 3.113080E+02 -3.380397E-02
|
||||
15 1.616240E+02 -5.606095E-02
|
||||
16 8.537670E+01 -7.105126E-02
|
||||
17 4.579110E+01 -3.324306E-02
|
||||
18 2.486770E+01 1.098520E-01
|
||||
19 1.362020E+01 4.989928E-01
|
||||
20 7.481060E+00 1.180867E+00
|
||||
21 4.088170E+00 -2.682314E+00
|
||||
22 2.199050E+00 -1.995422E+00
|
||||
23 1.148150E+00 8.024293E+00
|
||||
24 5.772650E-01 -7.388690E+00
|
||||
25 1.976350E-01 3.656810E+00
|
||||
26 1.089860E-01 5.149325E-01
|
||||
27 5.321600E-02 -3.554667E+00
|
||||
28 2.557100E-02 1.997451E+00
|
||||
S 1
|
||||
1 6.622400E+00 1.000000E+00
|
||||
S 1
|
||||
1 2.214000E+00 1.000000E+00
|
||||
S 1
|
||||
1 2.557100E-02 1.000000E+00
|
||||
S 1
|
||||
1 0.0122900 1.0000000
|
||||
P 20
|
||||
1 8.694730E+04 2.100000E-05
|
||||
2 2.125400E+04 6.500000E-05
|
||||
3 6.741140E+03 2.530000E-04
|
||||
4 2.557160E+03 8.630000E-04
|
||||
5 1.093510E+03 2.880000E-03
|
||||
6 5.061610E+02 8.871000E-03
|
||||
7 2.471390E+02 2.510200E-02
|
||||
8 1.254150E+02 6.332100E-02
|
||||
9 6.565120E+01 1.358630E-01
|
||||
10 3.530790E+01 2.327030E-01
|
||||
11 1.942600E+01 3.046360E-01
|
||||
12 1.084380E+01 2.687880E-01
|
||||
13 6.043590E+00 1.273450E-01
|
||||
14 3.302450E+00 2.283300E-02
|
||||
15 1.763890E+00 -1.141000E-03
|
||||
16 9.213860E-01 -2.029000E-03
|
||||
17 4.603730E-01 -8.150000E-04
|
||||
18 1.837720E-01 -5.400000E-05
|
||||
19 7.583300E-02 -2.000000E-06
|
||||
20 3.109900E-02 -1.000000E-06
|
||||
P 20
|
||||
1 8.694730E+04 -7.000000E-06
|
||||
2 2.125400E+04 -2.300000E-05
|
||||
3 6.741140E+03 -8.900000E-05
|
||||
4 2.557160E+03 -3.050000E-04
|
||||
5 1.093510E+03 -1.021000E-03
|
||||
6 5.061610E+02 -3.160000E-03
|
||||
7 2.471390E+02 -9.040000E-03
|
||||
8 1.254150E+02 -2.325300E-02
|
||||
9 6.565120E+01 -5.143700E-02
|
||||
10 3.530790E+01 -9.133900E-02
|
||||
11 1.942600E+01 -1.258840E-01
|
||||
12 1.084380E+01 -1.069500E-01
|
||||
13 6.043590E+00 4.101900E-02
|
||||
14 3.302450E+00 2.708820E-01
|
||||
15 1.763890E+00 4.012450E-01
|
||||
16 9.213860E-01 3.176300E-01
|
||||
17 4.603730E-01 1.157220E-01
|
||||
18 1.837720E-01 1.016500E-02
|
||||
19 7.583300E-02 -1.700000E-04
|
||||
20 3.109900E-02 2.000000E-04
|
||||
P 20
|
||||
1 8.694730E+04 1.000000E-06
|
||||
2 2.125400E+04 5.000000E-06
|
||||
3 6.741140E+03 1.800000E-05
|
||||
4 2.557160E+03 6.200000E-05
|
||||
5 1.093510E+03 2.060000E-04
|
||||
6 5.061610E+02 6.410000E-04
|
||||
7 2.471390E+02 1.823000E-03
|
||||
8 1.254150E+02 4.724000E-03
|
||||
9 6.565120E+01 1.040000E-02
|
||||
10 3.530790E+01 1.867000E-02
|
||||
11 1.942600E+01 2.558200E-02
|
||||
12 1.084380E+01 2.223100E-02
|
||||
13 6.043590E+00 -1.184000E-02
|
||||
14 3.302450E+00 -6.396100E-02
|
||||
15 1.763890E+00 -1.027460E-01
|
||||
16 9.213860E-01 -8.752100E-02
|
||||
17 4.603730E-01 1.970400E-02
|
||||
18 1.837720E-01 3.183820E-01
|
||||
19 7.583300E-02 5.417010E-01
|
||||
20 3.109900E-02 2.560760E-01
|
||||
P 20
|
||||
1 8.694730E+04 2.000000E-06
|
||||
2 2.125400E+04 8.000000E-06
|
||||
3 6.741140E+03 3.000000E-05
|
||||
4 2.557160E+03 1.010000E-04
|
||||
5 1.093510E+03 3.450000E-04
|
||||
6 5.061610E+02 1.044000E-03
|
||||
7 2.471390E+02 3.062000E-03
|
||||
8 1.254150E+02 7.685000E-03
|
||||
9 6.565120E+01 1.753200E-02
|
||||
10 3.530790E+01 3.016100E-02
|
||||
11 1.942600E+01 4.422700E-02
|
||||
12 1.084380E+01 3.394600E-02
|
||||
13 6.043590E+00 -1.352500E-02
|
||||
14 3.302450E+00 -1.194880E-01
|
||||
15 1.763890E+00 -1.621650E-01
|
||||
16 9.213860E-01 -1.665290E-01
|
||||
17 4.603730E-01 1.323570E-01
|
||||
18 1.837720E-01 6.424150E-01
|
||||
19 7.583300E-02 3.670330E-01
|
||||
20 3.109900E-02 1.163200E-02
|
||||
P 20
|
||||
1 8.694730E+04 5.000000E-06
|
||||
2 2.125400E+04 1.600000E-05
|
||||
3 6.741140E+03 6.400000E-05
|
||||
4 2.557160E+03 2.050000E-04
|
||||
5 1.093510E+03 7.420000E-04
|
||||
6 5.061610E+02 2.112000E-03
|
||||
7 2.471390E+02 6.608000E-03
|
||||
8 1.254150E+02 1.552500E-02
|
||||
9 6.565120E+01 3.812900E-02
|
||||
10 3.530790E+01 5.988300E-02
|
||||
11 1.942600E+01 1.016430E-01
|
||||
12 1.084380E+01 6.563800E-02
|
||||
13 6.043590E+00 -8.619000E-03
|
||||
14 3.302450E+00 -3.943080E-01
|
||||
15 1.763890E+00 -4.130690E-01
|
||||
16 9.213860E-01 8.383000E-03
|
||||
17 4.603730E-01 1.195480E+00
|
||||
18 1.837720E-01 -8.571000E-02
|
||||
19 7.583300E-02 -7.319400E-01
|
||||
20 3.109900E-02 -9.115000E-03
|
||||
P 20
|
||||
1 8.694730E+04 7.000000E-06
|
||||
2 2.125400E+04 2.200000E-05
|
||||
3 6.741140E+03 7.500000E-05
|
||||
4 2.557160E+03 2.990000E-04
|
||||
5 1.093510E+03 8.360000E-04
|
||||
6 5.061610E+02 3.150000E-03
|
||||
7 2.471390E+02 7.347000E-03
|
||||
8 1.254150E+02 2.347700E-02
|
||||
9 6.565120E+01 4.108700E-02
|
||||
10 3.530790E+01 9.755200E-02
|
||||
11 1.942600E+01 9.084200E-02
|
||||
12 1.084380E+01 2.145040E-01
|
||||
13 6.043590E+00 -2.163130E-01
|
||||
14 3.302450E+00 -6.998590E-01
|
||||
15 1.763890E+00 -5.724700E-01
|
||||
16 9.213860E-01 2.128303E+00
|
||||
17 4.603730E-01 -6.883840E-01
|
||||
18 1.837720E-01 -1.235466E+00
|
||||
19 7.583300E-02 1.097960E+00
|
||||
20 3.109900E-02 2.099000E-02
|
||||
P 20
|
||||
1 8.694730E+04 9.000000E-06
|
||||
2 2.125400E+04 2.900000E-05
|
||||
3 6.741140E+03 1.090000E-04
|
||||
4 2.557160E+03 3.970000E-04
|
||||
5 1.093510E+03 1.230000E-03
|
||||
6 5.061610E+02 4.171000E-03
|
||||
7 2.471390E+02 1.095300E-02
|
||||
8 1.254150E+02 3.129800E-02
|
||||
9 6.565120E+01 6.292500E-02
|
||||
10 3.530790E+01 1.287670E-01
|
||||
11 1.942600E+01 1.531790E-01
|
||||
12 1.084380E+01 3.717700E-01
|
||||
13 6.043590E+00 -8.112890E-01
|
||||
14 3.302450E+00 -1.554388E+00
|
||||
15 1.763890E+00 2.844491E+00
|
||||
16 9.213860E-01 -3.331810E-01
|
||||
17 4.603730E-01 -2.070494E+00
|
||||
18 1.837720E-01 2.197026E+00
|
||||
19 7.583300E-02 -1.047747E+00
|
||||
20 3.109900E-02 -7.557600E-02
|
||||
P 1
|
||||
1 1.001280E+01 1.000000E+00
|
||||
P 1
|
||||
1 3.186900E+00 1.000000E+00
|
||||
P 1
|
||||
1 3.109900E-02 1.000000E+00
|
||||
P 1
|
||||
1 0.0127500 1.0000000
|
||||
D 12
|
||||
1 5.184160E+02 1.600000E-04
|
||||
2 1.528190E+02 1.455000E-03
|
||||
3 5.858690E+01 8.031000E-03
|
||||
4 2.545640E+01 2.971400E-02
|
||||
5 1.178680E+01 8.223200E-02
|
||||
6 5.718610E+00 1.721170E-01
|
||||
7 2.824170E+00 2.605020E-01
|
||||
8 1.379850E+00 2.998410E-01
|
||||
9 6.561600E-01 2.711060E-01
|
||||
10 2.996090E-01 1.810280E-01
|
||||
11 1.293610E-01 7.104300E-02
|
||||
12 5.115500E-02 7.823000E-03
|
||||
D 12
|
||||
1 5.184160E+02 -1.770000E-04
|
||||
2 1.528190E+02 -1.610000E-03
|
||||
3 5.858690E+01 -8.916000E-03
|
||||
4 2.545640E+01 -3.317100E-02
|
||||
5 1.178680E+01 -9.400200E-02
|
||||
6 5.718610E+00 -1.993290E-01
|
||||
7 2.824170E+00 -2.718150E-01
|
||||
8 1.379850E+00 -1.664290E-01
|
||||
9 6.561600E-01 1.583620E-01
|
||||
10 2.996090E-01 4.350360E-01
|
||||
11 1.293610E-01 3.719440E-01
|
||||
12 5.115500E-02 7.954900E-02
|
||||
D 12
|
||||
1 5.184160E+02 -2.540000E-04
|
||||
2 1.528190E+02 -2.339000E-03
|
||||
3 5.858690E+01 -1.299300E-02
|
||||
4 2.545640E+01 -4.910900E-02
|
||||
5 1.178680E+01 -1.441260E-01
|
||||
6 5.718610E+00 -3.047430E-01
|
||||
7 2.824170E+00 -2.717250E-01
|
||||
8 1.379850E+00 2.521590E-01
|
||||
9 6.561600E-01 6.338040E-01
|
||||
10 2.996090E-01 1.322800E-02
|
||||
11 1.293610E-01 -6.003050E-01
|
||||
12 5.115500E-02 -1.874510E-01
|
||||
D 12
|
||||
1 5.184160E+02 -3.410000E-04
|
||||
2 1.528190E+02 -3.247000E-03
|
||||
3 5.858690E+01 -1.768300E-02
|
||||
4 2.545640E+01 -6.901000E-02
|
||||
5 1.178680E+01 -2.130540E-01
|
||||
6 5.718610E+00 -4.729490E-01
|
||||
7 2.824170E+00 8.417800E-02
|
||||
8 1.379850E+00 1.019310E+00
|
||||
9 6.561600E-01 -3.538990E-01
|
||||
10 2.996090E-01 -8.589280E-01
|
||||
11 1.293610E-01 5.806560E-01
|
||||
12 5.115500E-02 2.904510E-01
|
||||
D 12
|
||||
1 5.184160E+02 -4.710000E-04
|
||||
2 1.528190E+02 -4.007000E-03
|
||||
3 5.858690E+01 -2.411700E-02
|
||||
4 2.545640E+01 -8.928600E-02
|
||||
5 1.178680E+01 -3.436340E-01
|
||||
6 5.718610E+00 -5.125270E-01
|
||||
7 2.824170E+00 1.246333E+00
|
||||
8 1.379850E+00 -2.830500E-02
|
||||
9 6.561600E-01 -1.483245E+00
|
||||
10 2.996090E-01 1.390922E+00
|
||||
11 1.293610E-01 -1.698910E-01
|
||||
12 5.115500E-02 -5.211150E-01
|
||||
D 1
|
||||
1 7.098200E+00 1.000000E+00
|
||||
D 1
|
||||
1 4.277200E+00 1.000000E+00
|
||||
D 1
|
||||
1 5.115500E-02 1.000000E+00
|
||||
D 1
|
||||
1 0.0202300 1.0000000
|
||||
F 1
|
||||
1 1.104710E+01 1.000000E+00
|
||||
F 1
|
||||
1 4.854100E+00 1.000000E+00
|
||||
F 1
|
||||
1 2.132900E+00 1.000000E+00
|
||||
F 1
|
||||
1 9.372000E-01 1.000000E+00
|
||||
F 1
|
||||
1 3.141000E-01 1.000000E+00
|
||||
F 1
|
||||
1 0.1052700 1.0000000
|
||||
G 1
|
||||
1 7.547500E+00 1.000000E+00
|
||||
G 1
|
||||
1 3.673700E+00 1.000000E+00
|
||||
G 1
|
||||
1 1.788100E+00 1.000000E+00
|
||||
G 1
|
||||
1 6.564000E-01 1.000000E+00
|
||||
G 1
|
||||
1 0.2409600 1.0000000
|
||||
H 1
|
||||
1 6.926300E+00 1.000000E+00
|
||||
H 1
|
||||
1 3.252700E+00 1.000000E+00
|
||||
H 1
|
||||
1 1.296400E+00 1.000000E+00
|
||||
H 1
|
||||
1 0.5166900 1.0000000
|
||||
I 1
|
||||
1 7.056900E+00 1.000000E+00
|
||||
I 1
|
||||
1 1.3776500 1.0000000
|
||||
$END
|
|
@ -0,0 +1,517 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: aug-cc-pwCV5Z-DK
|
||||
! Description: V5ZPD All-electron Douglas-Kroll Core-Valence
|
||||
! Quintuple Zeta + Polarization
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
Fe 0
|
||||
S 28 1.00
|
||||
1.497690D+08 9.531119D-06
|
||||
2.672250D+07 2.300510D-05
|
||||
5.959000D+06 6.533733D-05
|
||||
1.593610D+06 1.539246D-04
|
||||
4.934640D+05 3.441447D-04
|
||||
1.717900D+05 7.285032D-04
|
||||
6.562090D+04 1.517001D-03
|
||||
2.696560D+04 3.152876D-03
|
||||
1.173530D+04 6.646998D-03
|
||||
5.343430D+03 1.421791D-02
|
||||
2.522500D+03 3.045407D-02
|
||||
1.226430D+03 6.326536D-02
|
||||
6.112690D+02 1.217368D-01
|
||||
3.113080D+02 2.031899D-01
|
||||
1.616240D+02 2.639911D-01
|
||||
8.537670D+01 2.217772D-01
|
||||
4.579110D+01 9.737963D-02
|
||||
2.486770D+01 4.984019D-02
|
||||
1.362020D+01 8.424513D-02
|
||||
7.481060D+00 6.965248D-02
|
||||
4.088170D+00 1.953405D-02
|
||||
2.199050D+00 1.411159D-03
|
||||
1.148150D+00 -3.351105D-05
|
||||
5.772650D-01 -6.461351D-05
|
||||
1.976350D-01 -5.426027D-07
|
||||
1.089860D-01 9.196538D-06
|
||||
5.321600D-02 8.539820D-06
|
||||
2.557100D-02 3.106496D-06
|
||||
S 28 1.00
|
||||
1.497690D+08 -4.913763D-06
|
||||
2.672250D+07 -1.186149D-05
|
||||
5.959000D+06 -3.369390D-05
|
||||
1.593610D+06 -7.940325D-05
|
||||
4.934640D+05 -1.776260D-04
|
||||
1.717900D+05 -3.763323D-04
|
||||
6.562090D+04 -7.847577D-04
|
||||
2.696560D+04 -1.634599D-03
|
||||
1.173530D+04 -3.458929D-03
|
||||
5.343430D+03 -7.445276D-03
|
||||
2.522500D+03 -1.613255D-02
|
||||
1.226430D+03 -3.424328D-02
|
||||
6.112690D+02 -6.867767D-02
|
||||
3.113080D+02 -1.241129D-01
|
||||
1.616240D+02 -1.879234D-01
|
||||
8.537670D+01 -2.035676D-01
|
||||
4.579110D+01 -8.676264D-02
|
||||
2.486770D+01 1.846239D-01
|
||||
1.362020D+01 4.648402D-01
|
||||
7.481060D+00 3.903679D-01
|
||||
4.088170D+00 1.090655D-01
|
||||
2.199050D+00 7.382610D-03
|
||||
1.148150D+00 -1.537976D-03
|
||||
5.772650D-01 -7.905751D-04
|
||||
1.976350D-01 -6.577098D-05
|
||||
1.089860D-01 8.549943D-05
|
||||
5.321600D-02 3.097134D-05
|
||||
2.557100D-02 2.023587D-05
|
||||
S 28 1.00
|
||||
1.497690D+08 1.145921D-06
|
||||
2.672250D+07 2.766402D-06
|
||||
5.959000D+06 7.859110D-06
|
||||
1.593610D+06 1.852562D-05
|
||||
4.934640D+05 4.145544D-05
|
||||
1.717900D+05 8.789446D-05
|
||||
6.562090D+04 1.834278D-04
|
||||
2.696560D+04 3.827944D-04
|
||||
1.173530D+04 8.117003D-04
|
||||
5.343430D+03 1.756160D-03
|
||||
2.522500D+03 3.832022D-03
|
||||
1.226430D+03 8.263218D-03
|
||||
6.112690D+02 1.700162D-02
|
||||
3.113080D+02 3.230925D-02
|
||||
1.616240D+02 5.300739D-02
|
||||
8.537670D+01 6.470433D-02
|
||||
4.579110D+01 2.828077D-02
|
||||
2.486770D+01 -9.137907D-02
|
||||
1.362020D+01 -2.999505D-01
|
||||
7.481060D+00 -3.644776D-01
|
||||
4.088170D+00 -1.915949D-02
|
||||
2.199050D+00 4.570656D-01
|
||||
1.148150D+00 5.657498D-01
|
||||
5.772650D-01 2.232925D-01
|
||||
1.976350D-01 1.356199D-02
|
||||
1.089860D-01 -2.894495D-03
|
||||
5.321600D-02 2.889479D-03
|
||||
2.557100D-02 1.159783D-04
|
||||
S 28 1.00
|
||||
1.497690D+08 -2.499184D-07
|
||||
2.672250D+07 -6.033367D-07
|
||||
5.959000D+06 -1.714026D-06
|
||||
1.593610D+06 -4.040379D-06
|
||||
4.934640D+05 -9.041239D-06
|
||||
1.717900D+05 -1.916995D-05
|
||||
6.562090D+04 -4.000594D-05
|
||||
2.696560D+04 -8.349108D-05
|
||||
1.173530D+04 -1.770532D-04
|
||||
5.343430D+03 -3.830627D-04
|
||||
2.522500D+03 -8.361335D-04
|
||||
1.226430D+03 -1.803028D-03
|
||||
6.112690D+02 -3.713337D-03
|
||||
3.113080D+02 -7.060540D-03
|
||||
1.616240D+02 -1.161964D-02
|
||||
8.537670D+01 -1.421996D-02
|
||||
4.579110D+01 -6.293242D-03
|
||||
2.486770D+01 2.055029D-02
|
||||
1.362020D+01 6.959376D-02
|
||||
7.481060D+00 8.869390D-02
|
||||
4.088170D+00 4.909512D-04
|
||||
2.199050D+00 -1.299238D-01
|
||||
1.148150D+00 -2.097213D-01
|
||||
5.772650D-01 -1.737261D-01
|
||||
1.976350D-01 1.060750D-01
|
||||
1.089860D-01 4.180125D-01
|
||||
5.321600D-02 4.927516D-01
|
||||
2.557100D-02 1.478611D-01
|
||||
S 28 1.00
|
||||
1.497690D+08 -5.057064D-07
|
||||
2.672250D+07 -1.220404D-06
|
||||
5.959000D+06 -3.469376D-06
|
||||
1.593610D+06 -8.167834D-06
|
||||
4.934640D+05 -1.832321D-05
|
||||
1.717900D+05 -3.866489D-05
|
||||
6.562090D+04 -8.138991D-05
|
||||
2.696560D+04 -1.674412D-04
|
||||
1.173530D+04 -3.628889D-04
|
||||
5.343430D+03 -7.617575D-04
|
||||
2.522500D+03 -1.728858D-03
|
||||
1.226430D+03 -3.554612D-03
|
||||
6.112690D+02 -7.758713D-03
|
||||
3.113080D+02 -1.373763D-02
|
||||
1.616240D+02 -2.493160D-02
|
||||
8.537670D+01 -2.593594D-02
|
||||
4.579110D+01 -1.941813D-02
|
||||
2.486770D+01 5.554122D-02
|
||||
1.362020D+01 1.214082D-01
|
||||
7.481060D+00 2.442000D-01
|
||||
4.088170D+00 -9.045983D-02
|
||||
2.199050D+00 -2.628125D-01
|
||||
1.148150D+00 -7.631501D-01
|
||||
5.772650D-01 3.326928D-01
|
||||
1.976350D-01 1.404621D+00
|
||||
1.089860D-01 -4.692165D-02
|
||||
5.321600D-02 -5.871979D-01
|
||||
2.557100D-02 -5.175077D-01
|
||||
S 28 1.00
|
||||
1.497690D+08 -8.093468D-07
|
||||
2.672250D+07 -1.952950D-06
|
||||
5.959000D+06 -5.553066D-06
|
||||
1.593610D+06 -1.306815D-05
|
||||
4.934640D+05 -2.934013D-05
|
||||
1.717900D+05 -6.181847D-05
|
||||
6.562090D+04 -1.304882D-04
|
||||
2.696560D+04 -2.672449D-04
|
||||
1.173530D+04 -5.831799D-04
|
||||
5.343430D+03 -1.212784D-03
|
||||
2.522500D+03 -2.786404D-03
|
||||
1.226430D+03 -5.647232D-03
|
||||
6.112690D+02 -1.255431D-02
|
||||
3.113080D+02 -2.178032D-02
|
||||
1.616240D+02 -4.077901D-02
|
||||
8.537670D+01 -4.054708D-02
|
||||
4.579110D+01 -3.465794D-02
|
||||
2.486770D+01 9.685341D-02
|
||||
1.362020D+01 2.002373D-01
|
||||
7.481060D+00 4.769334D-01
|
||||
4.088170D+00 -2.581863D-01
|
||||
2.199050D+00 -9.230158D-01
|
||||
1.148150D+00 -9.809175D-01
|
||||
5.772650D-01 2.397220D+00
|
||||
1.976350D-01 3.264145D-01
|
||||
1.089860D-01 -2.193316D+00
|
||||
5.321600D-02 3.872588D-01
|
||||
2.557100D-02 8.823095D-01
|
||||
S 28 1.00
|
||||
1.497690D+08 1.009555D-06
|
||||
2.672250D+07 2.438973D-06
|
||||
5.959000D+06 6.919803D-06
|
||||
1.593610D+06 1.635306D-05
|
||||
4.934640D+05 3.641348D-05
|
||||
1.717900D+05 7.794704D-05
|
||||
6.562090D+04 1.599140D-04
|
||||
2.696560D+04 3.433745D-04
|
||||
1.173530D+04 6.974589D-04
|
||||
5.343430D+03 1.602278D-03
|
||||
2.522500D+03 3.239062D-03
|
||||
1.226430D+03 7.683257D-03
|
||||
6.112690D+02 1.414236D-02
|
||||
3.113080D+02 3.109497D-02
|
||||
1.616240D+02 4.257946D-02
|
||||
8.537670D+01 7.133516D-02
|
||||
4.579110D+01 2.183397D-03
|
||||
2.486770D+01 -3.611419D-02
|
||||
1.362020D+01 -4.667594D-01
|
||||
7.481060D+00 -4.745196D-01
|
||||
4.088170D+00 3.405478D-01
|
||||
2.199050D+00 2.965055D+00
|
||||
1.148150D+00 -3.124263D+00
|
||||
5.772650D-01 -7.678803D-01
|
||||
1.976350D-01 4.549504D+00
|
||||
1.089860D-01 -3.555516D+00
|
||||
5.321600D-02 -7.601738D-01
|
||||
2.557100D-02 1.387333D+00
|
||||
S 28 1.00
|
||||
1.497690D+08 -1.171395D-06
|
||||
2.672250D+07 -2.828050D-06
|
||||
5.959000D+06 -8.033704D-06
|
||||
1.593610D+06 -1.894135D-05
|
||||
4.934640D+05 -4.237323D-05
|
||||
1.717900D+05 -8.991028D-05
|
||||
6.562090D+04 -1.874489D-04
|
||||
2.696560D+04 -3.920043D-04
|
||||
1.173530D+04 -8.294306D-04
|
||||
5.343430D+03 -1.802024D-03
|
||||
2.522500D+03 -3.921863D-03
|
||||
1.226430D+03 -8.517307D-03
|
||||
6.112690D+02 -1.752690D-02
|
||||
3.113080D+02 -3.380397D-02
|
||||
1.616240D+02 -5.606095D-02
|
||||
8.537670D+01 -7.105126D-02
|
||||
4.579110D+01 -3.324306D-02
|
||||
2.486770D+01 1.098520D-01
|
||||
1.362020D+01 4.989928D-01
|
||||
7.481060D+00 1.180867D+00
|
||||
4.088170D+00 -2.682314D+00
|
||||
2.199050D+00 -1.995422D+00
|
||||
1.148150D+00 8.024293D+00
|
||||
5.772650D-01 -7.388690D+00
|
||||
1.976350D-01 3.656810D+00
|
||||
1.089860D-01 5.149325D-01
|
||||
5.321600D-02 -3.554667D+00
|
||||
2.557100D-02 1.997451D+00
|
||||
S 1 1.00
|
||||
6.622400D+00 1.000000D+00
|
||||
S 1 1.00
|
||||
2.214000D+00 1.000000D+00
|
||||
S 1 1.00
|
||||
2.557100D-02 1.000000D+00
|
||||
S 1 1.00
|
||||
0.0122900 1.0000000
|
||||
P 20 1.00
|
||||
8.694730D+04 2.100000D-05
|
||||
2.125400D+04 6.500000D-05
|
||||
6.741140D+03 2.530000D-04
|
||||
2.557160D+03 8.630000D-04
|
||||
1.093510D+03 2.880000D-03
|
||||
5.061610D+02 8.871000D-03
|
||||
2.471390D+02 2.510200D-02
|
||||
1.254150D+02 6.332100D-02
|
||||
6.565120D+01 1.358630D-01
|
||||
3.530790D+01 2.327030D-01
|
||||
1.942600D+01 3.046360D-01
|
||||
1.084380D+01 2.687880D-01
|
||||
6.043590D+00 1.273450D-01
|
||||
3.302450D+00 2.283300D-02
|
||||
1.763890D+00 -1.141000D-03
|
||||
9.213860D-01 -2.029000D-03
|
||||
4.603730D-01 -8.150000D-04
|
||||
1.837720D-01 -5.400000D-05
|
||||
7.583300D-02 -2.000000D-06
|
||||
3.109900D-02 -1.000000D-06
|
||||
P 20 1.00
|
||||
8.694730D+04 -7.000000D-06
|
||||
2.125400D+04 -2.300000D-05
|
||||
6.741140D+03 -8.900000D-05
|
||||
2.557160D+03 -3.050000D-04
|
||||
1.093510D+03 -1.021000D-03
|
||||
5.061610D+02 -3.160000D-03
|
||||
2.471390D+02 -9.040000D-03
|
||||
1.254150D+02 -2.325300D-02
|
||||
6.565120D+01 -5.143700D-02
|
||||
3.530790D+01 -9.133900D-02
|
||||
1.942600D+01 -1.258840D-01
|
||||
1.084380D+01 -1.069500D-01
|
||||
6.043590D+00 4.101900D-02
|
||||
3.302450D+00 2.708820D-01
|
||||
1.763890D+00 4.012450D-01
|
||||
9.213860D-01 3.176300D-01
|
||||
4.603730D-01 1.157220D-01
|
||||
1.837720D-01 1.016500D-02
|
||||
7.583300D-02 -1.700000D-04
|
||||
3.109900D-02 2.000000D-04
|
||||
P 20 1.00
|
||||
8.694730D+04 1.000000D-06
|
||||
2.125400D+04 5.000000D-06
|
||||
6.741140D+03 1.800000D-05
|
||||
2.557160D+03 6.200000D-05
|
||||
1.093510D+03 2.060000D-04
|
||||
5.061610D+02 6.410000D-04
|
||||
2.471390D+02 1.823000D-03
|
||||
1.254150D+02 4.724000D-03
|
||||
6.565120D+01 1.040000D-02
|
||||
3.530790D+01 1.867000D-02
|
||||
1.942600D+01 2.558200D-02
|
||||
1.084380D+01 2.223100D-02
|
||||
6.043590D+00 -1.184000D-02
|
||||
3.302450D+00 -6.396100D-02
|
||||
1.763890D+00 -1.027460D-01
|
||||
9.213860D-01 -8.752100D-02
|
||||
4.603730D-01 1.970400D-02
|
||||
1.837720D-01 3.183820D-01
|
||||
7.583300D-02 5.417010D-01
|
||||
3.109900D-02 2.560760D-01
|
||||
P 20 1.00
|
||||
8.694730D+04 2.000000D-06
|
||||
2.125400D+04 8.000000D-06
|
||||
6.741140D+03 3.000000D-05
|
||||
2.557160D+03 1.010000D-04
|
||||
1.093510D+03 3.450000D-04
|
||||
5.061610D+02 1.044000D-03
|
||||
2.471390D+02 3.062000D-03
|
||||
1.254150D+02 7.685000D-03
|
||||
6.565120D+01 1.753200D-02
|
||||
3.530790D+01 3.016100D-02
|
||||
1.942600D+01 4.422700D-02
|
||||
1.084380D+01 3.394600D-02
|
||||
6.043590D+00 -1.352500D-02
|
||||
3.302450D+00 -1.194880D-01
|
||||
1.763890D+00 -1.621650D-01
|
||||
9.213860D-01 -1.665290D-01
|
||||
4.603730D-01 1.323570D-01
|
||||
1.837720D-01 6.424150D-01
|
||||
7.583300D-02 3.670330D-01
|
||||
3.109900D-02 1.163200D-02
|
||||
P 20 1.00
|
||||
8.694730D+04 5.000000D-06
|
||||
2.125400D+04 1.600000D-05
|
||||
6.741140D+03 6.400000D-05
|
||||
2.557160D+03 2.050000D-04
|
||||
1.093510D+03 7.420000D-04
|
||||
5.061610D+02 2.112000D-03
|
||||
2.471390D+02 6.608000D-03
|
||||
1.254150D+02 1.552500D-02
|
||||
6.565120D+01 3.812900D-02
|
||||
3.530790D+01 5.988300D-02
|
||||
1.942600D+01 1.016430D-01
|
||||
1.084380D+01 6.563800D-02
|
||||
6.043590D+00 -8.619000D-03
|
||||
3.302450D+00 -3.943080D-01
|
||||
1.763890D+00 -4.130690D-01
|
||||
9.213860D-01 8.383000D-03
|
||||
4.603730D-01 1.195480D+00
|
||||
1.837720D-01 -8.571000D-02
|
||||
7.583300D-02 -7.319400D-01
|
||||
3.109900D-02 -9.115000D-03
|
||||
P 20 1.00
|
||||
8.694730D+04 7.000000D-06
|
||||
2.125400D+04 2.200000D-05
|
||||
6.741140D+03 7.500000D-05
|
||||
2.557160D+03 2.990000D-04
|
||||
1.093510D+03 8.360000D-04
|
||||
5.061610D+02 3.150000D-03
|
||||
2.471390D+02 7.347000D-03
|
||||
1.254150D+02 2.347700D-02
|
||||
6.565120D+01 4.108700D-02
|
||||
3.530790D+01 9.755200D-02
|
||||
1.942600D+01 9.084200D-02
|
||||
1.084380D+01 2.145040D-01
|
||||
6.043590D+00 -2.163130D-01
|
||||
3.302450D+00 -6.998590D-01
|
||||
1.763890D+00 -5.724700D-01
|
||||
9.213860D-01 2.128303D+00
|
||||
4.603730D-01 -6.883840D-01
|
||||
1.837720D-01 -1.235466D+00
|
||||
7.583300D-02 1.097960D+00
|
||||
3.109900D-02 2.099000D-02
|
||||
P 20 1.00
|
||||
8.694730D+04 9.000000D-06
|
||||
2.125400D+04 2.900000D-05
|
||||
6.741140D+03 1.090000D-04
|
||||
2.557160D+03 3.970000D-04
|
||||
1.093510D+03 1.230000D-03
|
||||
5.061610D+02 4.171000D-03
|
||||
2.471390D+02 1.095300D-02
|
||||
1.254150D+02 3.129800D-02
|
||||
6.565120D+01 6.292500D-02
|
||||
3.530790D+01 1.287670D-01
|
||||
1.942600D+01 1.531790D-01
|
||||
1.084380D+01 3.717700D-01
|
||||
6.043590D+00 -8.112890D-01
|
||||
3.302450D+00 -1.554388D+00
|
||||
1.763890D+00 2.844491D+00
|
||||
9.213860D-01 -3.331810D-01
|
||||
4.603730D-01 -2.070494D+00
|
||||
1.837720D-01 2.197026D+00
|
||||
7.583300D-02 -1.047747D+00
|
||||
3.109900D-02 -7.557600D-02
|
||||
P 1 1.00
|
||||
1.001280D+01 1.000000D+00
|
||||
P 1 1.00
|
||||
3.186900D+00 1.000000D+00
|
||||
P 1 1.00
|
||||
3.109900D-02 1.000000D+00
|
||||
P 1 1.00
|
||||
0.0127500 1.0000000
|
||||
D 12 1.00
|
||||
5.184160D+02 1.600000D-04
|
||||
1.528190D+02 1.455000D-03
|
||||
5.858690D+01 8.031000D-03
|
||||
2.545640D+01 2.971400D-02
|
||||
1.178680D+01 8.223200D-02
|
||||
5.718610D+00 1.721170D-01
|
||||
2.824170D+00 2.605020D-01
|
||||
1.379850D+00 2.998410D-01
|
||||
6.561600D-01 2.711060D-01
|
||||
2.996090D-01 1.810280D-01
|
||||
1.293610D-01 7.104300D-02
|
||||
5.115500D-02 7.823000D-03
|
||||
D 12 1.00
|
||||
5.184160D+02 -1.770000D-04
|
||||
1.528190D+02 -1.610000D-03
|
||||
5.858690D+01 -8.916000D-03
|
||||
2.545640D+01 -3.317100D-02
|
||||
1.178680D+01 -9.400200D-02
|
||||
5.718610D+00 -1.993290D-01
|
||||
2.824170D+00 -2.718150D-01
|
||||
1.379850D+00 -1.664290D-01
|
||||
6.561600D-01 1.583620D-01
|
||||
2.996090D-01 4.350360D-01
|
||||
1.293610D-01 3.719440D-01
|
||||
5.115500D-02 7.954900D-02
|
||||
D 12 1.00
|
||||
5.184160D+02 -2.540000D-04
|
||||
1.528190D+02 -2.339000D-03
|
||||
5.858690D+01 -1.299300D-02
|
||||
2.545640D+01 -4.910900D-02
|
||||
1.178680D+01 -1.441260D-01
|
||||
5.718610D+00 -3.047430D-01
|
||||
2.824170D+00 -2.717250D-01
|
||||
1.379850D+00 2.521590D-01
|
||||
6.561600D-01 6.338040D-01
|
||||
2.996090D-01 1.322800D-02
|
||||
1.293610D-01 -6.003050D-01
|
||||
5.115500D-02 -1.874510D-01
|
||||
D 12 1.00
|
||||
5.184160D+02 -3.410000D-04
|
||||
1.528190D+02 -3.247000D-03
|
||||
5.858690D+01 -1.768300D-02
|
||||
2.545640D+01 -6.901000D-02
|
||||
1.178680D+01 -2.130540D-01
|
||||
5.718610D+00 -4.729490D-01
|
||||
2.824170D+00 8.417800D-02
|
||||
1.379850D+00 1.019310D+00
|
||||
6.561600D-01 -3.538990D-01
|
||||
2.996090D-01 -8.589280D-01
|
||||
1.293610D-01 5.806560D-01
|
||||
5.115500D-02 2.904510D-01
|
||||
D 12 1.00
|
||||
5.184160D+02 -4.710000D-04
|
||||
1.528190D+02 -4.007000D-03
|
||||
5.858690D+01 -2.411700D-02
|
||||
2.545640D+01 -8.928600D-02
|
||||
1.178680D+01 -3.436340D-01
|
||||
5.718610D+00 -5.125270D-01
|
||||
2.824170D+00 1.246333D+00
|
||||
1.379850D+00 -2.830500D-02
|
||||
6.561600D-01 -1.483245D+00
|
||||
2.996090D-01 1.390922D+00
|
||||
1.293610D-01 -1.698910D-01
|
||||
5.115500D-02 -5.211150D-01
|
||||
D 1 1.00
|
||||
7.098200D+00 1.000000D+00
|
||||
D 1 1.00
|
||||
4.277200D+00 1.000000D+00
|
||||
D 1 1.00
|
||||
5.115500D-02 1.000000D+00
|
||||
D 1 1.00
|
||||
0.0202300 1.0000000
|
||||
F 1 1.00
|
||||
1.104710D+01 1.000000D+00
|
||||
F 1 1.00
|
||||
4.854100D+00 1.000000D+00
|
||||
F 1 1.00
|
||||
2.132900D+00 1.000000D+00
|
||||
F 1 1.00
|
||||
9.372000D-01 1.000000D+00
|
||||
F 1 1.00
|
||||
3.141000D-01 1.000000D+00
|
||||
F 1 1.00
|
||||
0.1052700 1.0000000
|
||||
G 1 1.00
|
||||
7.547500D+00 1.000000D+00
|
||||
G 1 1.00
|
||||
3.673700D+00 1.000000D+00
|
||||
G 1 1.00
|
||||
1.788100D+00 1.000000D+00
|
||||
G 1 1.00
|
||||
6.564000D-01 1.000000D+00
|
||||
G 1 1.00
|
||||
0.2409600 1.0000000
|
||||
H 1 1.00
|
||||
6.926300D+00 1.000000D+00
|
||||
H 1 1.00
|
||||
3.252700D+00 1.000000D+00
|
||||
H 1 1.00
|
||||
1.296400D+00 1.000000D+00
|
||||
H 1 1.00
|
||||
0.5166900 1.0000000
|
||||
I 1 1.00
|
||||
7.056900D+00 1.000000D+00
|
||||
I 1 1.00
|
||||
1.3776500 1.0000000
|
||||
****
|
|
@ -0,0 +1,68 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: Stuttgart RSC 1997
|
||||
! Description: Stuttgart RSC 1997 ECP + Valence basis
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
$DATA
|
||||
|
||||
IRON
|
||||
S 3
|
||||
1 20.5130280 0.2347140
|
||||
2 9.7767920 -0.8775270
|
||||
3 4.5735990 -0.3416360
|
||||
S 1
|
||||
1 1.9499100 1.0000000
|
||||
S 1
|
||||
1 0.7664880 1.0000000
|
||||
S 1
|
||||
1 0.1007980 1.0000000
|
||||
S 1
|
||||
1 0.0375160 1.0000000
|
||||
S 1
|
||||
1 0.0100000 1.0000000
|
||||
P 2
|
||||
1 63.1253260 0.0271470
|
||||
2 11.6568550 -1.0118750
|
||||
P 2
|
||||
1 5.1786610 0.2151680
|
||||
2 2.0355320 0.8250950
|
||||
P 1
|
||||
1 0.7088180 1.0000000
|
||||
P 1
|
||||
1 0.1101680 1.0000000
|
||||
P 1
|
||||
1 0.0294440 1.0000000
|
||||
D 4
|
||||
1 33.6667900 0.0365290
|
||||
2 10.2356950 0.1828250
|
||||
3 3.4664880 0.4370690
|
||||
4 1.1272960 0.5751780
|
||||
D 1
|
||||
1 0.3082470 1.0000000
|
||||
D 1
|
||||
1 0.0800000 1.0000000
|
||||
F 1
|
||||
1 2.0000000 1.0000000
|
||||
$END
|
||||
|
||||
$ECP
|
||||
FE-ECP GEN 10 3
|
||||
1 ----- f-ul potential -----
|
||||
0.000000000 2 1.000000000
|
||||
2 ----- s-f potential -----
|
||||
253.749588000 2 20.930000000
|
||||
37.922845000 2 9.445000000
|
||||
2 ----- p-f potential -----
|
||||
161.036812000 2 21.760000000
|
||||
27.651298000 2 9.178000000
|
||||
2 ----- d-f potential -----
|
||||
-24.431276000 2 25.900000000
|
||||
-1.434251000 2 8.835000000
|
||||
$END
|
|
@ -0,0 +1,68 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: Stuttgart RSC 1997
|
||||
! Description: Stuttgart RSC 1997 ECP + Valence basis
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
Fe 0
|
||||
S 3 1.00
|
||||
20.5130280 0.2347140
|
||||
9.7767920 -0.8775270
|
||||
4.5735990 -0.3416360
|
||||
S 1 1.00
|
||||
1.9499100 1.0000000
|
||||
S 1 1.00
|
||||
0.7664880 1.0000000
|
||||
S 1 1.00
|
||||
0.1007980 1.0000000
|
||||
S 1 1.00
|
||||
0.0375160 1.0000000
|
||||
S 1 1.00
|
||||
0.0100000 1.0000000
|
||||
P 2 1.00
|
||||
63.1253260 0.0271470
|
||||
11.6568550 -1.0118750
|
||||
P 2 1.00
|
||||
5.1786610 0.2151680
|
||||
2.0355320 0.8250950
|
||||
P 1 1.00
|
||||
0.7088180 1.0000000
|
||||
P 1 1.00
|
||||
0.1101680 1.0000000
|
||||
P 1 1.00
|
||||
0.0294440 1.0000000
|
||||
D 4 1.00
|
||||
33.6667900 0.0365290
|
||||
10.2356950 0.1828250
|
||||
3.4664880 0.4370690
|
||||
1.1272960 0.5751780
|
||||
D 1 1.00
|
||||
0.3082470 1.0000000
|
||||
D 1 1.00
|
||||
0.0800000 1.0000000
|
||||
F 1 1.00
|
||||
2.0000000 1.0000000
|
||||
****
|
||||
FE 0
|
||||
FE-ECP 3 10
|
||||
f potential
|
||||
1
|
||||
2 1.000000000 0.000000000
|
||||
s-f potential
|
||||
2
|
||||
2 20.930000000 253.749588000
|
||||
2 9.445000000 37.922845000
|
||||
p-f potential
|
||||
2
|
||||
2 21.760000000 161.036812000
|
||||
2 9.178000000 27.651298000
|
||||
d-f potential
|
||||
2
|
||||
2 25.900000000 -24.431276000
|
||||
2 8.835000000 -1.434251000
|
|
@ -0,0 +1,28 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: Stuttgart RSC 1997 ECP
|
||||
! Description: Stuttgart RSC 1997 ECP
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
$ECP
|
||||
FE-ECP GEN 10 3
|
||||
1 ----- f-ul potential -----
|
||||
0.000000000 2 1.000000000
|
||||
2 ----- s-f potential -----
|
||||
253.749588000 2 20.930000000
|
||||
37.922845000 2 9.445000000
|
||||
2 ----- p-f potential -----
|
||||
161.036812000 2 21.760000000
|
||||
27.651298000 2 9.178000000
|
||||
2 ----- d-f potential -----
|
||||
-24.431276000 2 25.900000000
|
||||
-1.434251000 2 8.835000000
|
||||
$END
|
|
@ -0,0 +1,29 @@
|
|||
!----------------------------------------------------------------------
|
||||
! Basis Set Exchange
|
||||
! Version v0.8.9
|
||||
! https://www.basissetexchange.org
|
||||
!----------------------------------------------------------------------
|
||||
! Basis set: Stuttgart RSC 1997 ECP
|
||||
! Description: Stuttgart RSC 1997 ECP
|
||||
! Role: orbital
|
||||
! Version: 0 (Data from the original Basis Set Exchange)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
FE 0
|
||||
FE-ECP 3 10
|
||||
f potential
|
||||
1
|
||||
2 1.000000000 0.000000000
|
||||
s-f potential
|
||||
2
|
||||
2 20.930000000 253.749588000
|
||||
2 9.445000000 37.922845000
|
||||
p-f potential
|
||||
2
|
||||
2 21.760000000 161.036812000
|
||||
2 9.178000000 27.651298000
|
||||
d-f potential
|
||||
2
|
||||
2 25.900000000 -24.431276000
|
||||
2 8.835000000 -1.434251000
|
|
@ -0,0 +1,74 @@
|
|||
|
||||
import testing
|
||||
from testing import value_eq,object_eq
|
||||
from testing import divert_nexus_log,restore_nexus_log
|
||||
|
||||
|
||||
def test_import():
|
||||
import nexus_base
|
||||
from nexus_base import nexus_core,nexus_noncore,nexus_core_noncore
|
||||
from nexus_base import NexusCore
|
||||
#end def test_import
|
||||
|
||||
|
||||
|
||||
def test_namespaces():
|
||||
from nexus_base import nexus_core,nexus_core_defaults
|
||||
from nexus_base import nexus_noncore,nexus_noncore_defaults
|
||||
from nexus_base import nexus_core_noncore,nexus_core_noncore_defaults
|
||||
|
||||
assert('runs' in nexus_core_defaults)
|
||||
assert('basis_dir' in nexus_noncore_defaults)
|
||||
assert('pseudo_dir' in nexus_core_noncore_defaults)
|
||||
|
||||
assert(object_eq(nexus_core,nexus_core_defaults))
|
||||
assert(object_eq(nexus_noncore,nexus_noncore_defaults))
|
||||
assert(object_eq(nexus_core_noncore,nexus_core_noncore_defaults))
|
||||
#end def test_namespaces
|
||||
|
||||
|
||||
|
||||
def test_empty_init():
|
||||
from nexus_base import NexusCore
|
||||
nc = NexusCore()
|
||||
#end def test_empty_init
|
||||
|
||||
|
||||
|
||||
def test_write_splash():
|
||||
from nexus_base import NexusCore
|
||||
log = divert_nexus_log()
|
||||
nc = NexusCore()
|
||||
assert(not nc.wrote_splash)
|
||||
nc.write_splash()
|
||||
assert('Nexus' in log.contents())
|
||||
assert('Please cite:' in log.contents())
|
||||
assert(nc.wrote_splash)
|
||||
restore_nexus_log()
|
||||
#end def test_write_splash
|
||||
|
||||
|
||||
|
||||
def test_enter_leave():
|
||||
import os
|
||||
from nexus_base import NexusCore
|
||||
|
||||
tpath = testing.setup_unit_test_output_directory('nexus_base','test_enter_leave')
|
||||
|
||||
cwd = os.getcwd()
|
||||
|
||||
log = divert_nexus_log()
|
||||
|
||||
nc = NexusCore()
|
||||
|
||||
nc.enter(tpath)
|
||||
tcwd = os.getcwd()
|
||||
assert(tcwd==tpath)
|
||||
assert('Entering' in log.contents())
|
||||
assert(tpath in log.contents())
|
||||
|
||||
nc.leave()
|
||||
assert(os.getcwd()==cwd)
|
||||
|
||||
restore_nexus_log()
|
||||
#end def test_enter_leave
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
|
||||
def test_imports():
|
||||
import nexus
|
||||
from nexus import settings,job,run_project
|
||||
from nexus import ppset
|
||||
from nexus import read_structure,read_input
|
||||
from nexus import generate_structure
|
||||
from nexus import generate_physical_system
|
||||
from nexus import generate_qmcpack,generate_convert4qmc
|
||||
from nexus import generate_pwscf,generate_pw2qmcpack
|
||||
from nexus import generate_gamess
|
||||
from nexus import generate_pyscf
|
||||
from nexus import generate_quantum_package
|
||||
from nexus import generate_vasp
|
||||
from nexus import ci,error
|
||||
#end def test_imports
|
||||
|
|
@ -1,34 +1,519 @@
|
|||
#!/usr/bin/env python
|
||||
import numpy as np
|
||||
|
||||
def example_structure_h4():
|
||||
# hydrogen at rs=1.31
|
||||
from structure import Structure
|
||||
natom = 4
|
||||
alat = 3.3521298178767225
|
||||
axes = alat*np.eye(3)
|
||||
elem = ['H']*natom
|
||||
pos = np.array([
|
||||
[0, 0, 0], [alat/2., 0, 0], [0, alat/2, 0], [0, 0, alat/2]
|
||||
])
|
||||
s1 = Structure(axes=axes, elem=elem, pos=pos, units='B')
|
||||
return s1
|
||||
#end def example_structure_h4
|
||||
import numpy as np
|
||||
import testing
|
||||
from testing import value_eq,object_eq,object_diff,print_diff
|
||||
|
||||
from test_structure import structure_same
|
||||
|
||||
|
||||
def system_same(s1,s2,pseudized=True,tiled=False):
|
||||
same = True
|
||||
keys = ('net_charge','net_spin','pseudized','particles')
|
||||
o1 = s1.obj(keys)
|
||||
o2 = s2.obj(keys)
|
||||
qsame = object_eq(o1,o2)
|
||||
vsame = True
|
||||
if pseudized:
|
||||
vsame = s1.valency==s2.valency
|
||||
#end if
|
||||
ssame = structure_same(s1.structure,s2.structure)
|
||||
fsame = True
|
||||
if tiled:
|
||||
fsame = system_same(s1.folded_system,s2.folded_system)
|
||||
#end if
|
||||
same = qsame and vsame and ssame and fsame
|
||||
return same
|
||||
#end def system_same
|
||||
|
||||
|
||||
|
||||
def test_import():
|
||||
import physical_system
|
||||
from physical_system import Matter,Particle,Ion,PseudoIon,Particles
|
||||
from physical_system import PhysicalSystem,generate_physical_system
|
||||
#end def test_import
|
||||
|
||||
|
||||
|
||||
def test_particle_initialization():
|
||||
from generic import obj
|
||||
from physical_system import Matter,Particle,Ion,PseudoIon,Particles
|
||||
from physical_system import PhysicalSystem,generate_physical_system
|
||||
|
||||
# empty initialization
|
||||
Matter()
|
||||
p = Particle()
|
||||
i = Ion()
|
||||
pi = PseudoIon()
|
||||
Particles()
|
||||
|
||||
def check_none(v,vfields):
|
||||
for f in vfields:
|
||||
assert(f in v)
|
||||
assert(v[f] is None)
|
||||
#end for
|
||||
#end def check_none
|
||||
|
||||
pfields = 'name mass charge spin'.split()
|
||||
ifields = pfields + 'protons neutrons'.split()
|
||||
pifields = ifields+['core_electrons']
|
||||
|
||||
check_none(p,pfields)
|
||||
check_none(i,ifields)
|
||||
check_none(pi,pifields)
|
||||
|
||||
# matter
|
||||
elements = Matter.elements
|
||||
assert(len(elements)==103)
|
||||
assert('Si' in elements)
|
||||
|
||||
pc = Matter.particle_collection
|
||||
for e in elements:
|
||||
assert(e in pc)
|
||||
#end for
|
||||
assert('up_electron' in pc)
|
||||
assert('down_electron' in pc)
|
||||
|
||||
u = pc.up_electron
|
||||
assert(u.name=='up_electron')
|
||||
assert(value_eq(u.mass,1.0))
|
||||
assert(u.charge==-1)
|
||||
assert(u.spin==1)
|
||||
|
||||
d = pc.down_electron
|
||||
assert(d.name=='down_electron')
|
||||
assert(value_eq(d.mass,1.0))
|
||||
assert(d.charge==-1)
|
||||
assert(d.spin==-1)
|
||||
|
||||
si = pc.Si
|
||||
assert(si.name=='Si')
|
||||
assert(value_eq(si.mass,51197.6459833))
|
||||
assert(si.charge==14)
|
||||
assert(si.protons==14)
|
||||
assert(si.neutrons==14)
|
||||
|
||||
# test get_particle
|
||||
assert(object_eq(pc.get_particle('Si'),si))
|
||||
si1 = si.copy()
|
||||
si1.name = 'Si1'
|
||||
assert(object_eq(pc.get_particle('Si1'),si1))
|
||||
|
||||
#end def test_particle_initialization
|
||||
|
||||
|
||||
|
||||
def test_physical_system_initialization():
|
||||
import os
|
||||
from generic import obj
|
||||
from structure import generate_structure
|
||||
from physical_system import generate_physical_system
|
||||
from physical_system import PhysicalSystem
|
||||
|
||||
tpath = testing.setup_unit_test_output_directory('physical_system','test_physical_system_initialization')
|
||||
|
||||
d2 = generate_structure(
|
||||
structure = 'diamond',
|
||||
cell = 'prim',
|
||||
)
|
||||
d2_path = os.path.join(tpath,'diamond2.xsf')
|
||||
d2.write(d2_path)
|
||||
|
||||
d8 = generate_structure(
|
||||
structure = 'diamond',
|
||||
cell = 'conv',
|
||||
)
|
||||
d8_path = os.path.join(tpath,'diamond8.xsf')
|
||||
d8.write(d8_path)
|
||||
|
||||
|
||||
d8_tile = d2.tile([[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]])
|
||||
|
||||
d8_tile_pos_ref = np.array([
|
||||
[0. , 0. , 0. ],
|
||||
[0.25, 0.25, 0.25],
|
||||
[0.5 , 0.5 , 0. ],
|
||||
[0.75, 0.75, 0.25],
|
||||
[0. , 0.5 , 0.5 ],
|
||||
[0.25, 0.75, 0.75],
|
||||
[0.5 , 0. , 0.5 ],
|
||||
[0.75, 0.25, 0.75]])
|
||||
assert(value_eq(d8_tile.pos_unit(),d8_tile_pos_ref))
|
||||
|
||||
|
||||
direct_notile = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[3.57, 0.00, 0.00],
|
||||
[0.00, 3.57, 0.00],
|
||||
[0.00, 0.00, 3.57]],
|
||||
elem = 8*['C'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25],
|
||||
[0.00, 0.50, 0.50],
|
||||
[0.25, 0.75, 0.75],
|
||||
[0.50, 0.00, 0.50],
|
||||
[0.75, 0.25, 0.75],
|
||||
[0.50, 0.50, 0.00],
|
||||
[0.75, 0.75, 0.25]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
direct_tile = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[1.785, 1.785, 0. ],
|
||||
[0. , 1.785, 1.785],
|
||||
[1.785, 0. , 1.785]],
|
||||
elem = 2*['C'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25]],
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
struct_notile = generate_physical_system(
|
||||
structure = d8,
|
||||
C = 4,
|
||||
)
|
||||
|
||||
struct_tile = generate_physical_system(
|
||||
structure = d2,
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
read_notile = generate_physical_system(
|
||||
structure = d8_path,
|
||||
C = 4,
|
||||
)
|
||||
|
||||
read_tile = generate_physical_system(
|
||||
structure = d2_path,
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
gen_notile = generate_physical_system(
|
||||
lattice = 'cubic', # cubic tetragonal orthorhombic rhombohedral
|
||||
# hexagonal triclinic monoclinic
|
||||
cell = 'conventional', # primitive, conventional
|
||||
centering = 'F', # P A B C I R F
|
||||
constants = 3.57, # a,b,c,alpha,beta,gamma
|
||||
units = 'A', # A or B
|
||||
atoms = 'C', # species in primitive cell
|
||||
basis = [[0,0,0], # basis vectors (optional)
|
||||
[.25,.25,.25]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
gen_tile = generate_physical_system(
|
||||
lattice = 'cubic', # cubic tetragonal orthorhombic rhombohedral
|
||||
# hexagonal triclinic monoclinic
|
||||
cell = 'primitive', # primitive, conventional
|
||||
centering = 'F', # P A B C I R F
|
||||
constants = 3.57, # a,b,c,alpha,beta,gamma
|
||||
units = 'A', # A or B
|
||||
atoms = 'C', # species in primitive cell
|
||||
basis = [[0,0,0], # basis vectors (optional)
|
||||
[.25,.25,.25]],
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
lookup_notile = generate_physical_system(
|
||||
structure = 'diamond',
|
||||
cell = 'conv',
|
||||
C = 4,
|
||||
)
|
||||
|
||||
lookup_tile = generate_physical_system(
|
||||
structure = 'diamond',
|
||||
cell = 'prim',
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
pref = obj(
|
||||
C = obj(
|
||||
charge = 4,
|
||||
core_electrons = 2,
|
||||
count = 8,
|
||||
mass = 21894.7135906,
|
||||
name = 'C',
|
||||
neutrons = 6,
|
||||
protons = 6,
|
||||
spin = 0,
|
||||
),
|
||||
down_electron = obj(
|
||||
charge = -1,
|
||||
count = 16,
|
||||
mass = 1.0,
|
||||
name = 'down_electron',
|
||||
spin = -1,
|
||||
),
|
||||
up_electron = obj(
|
||||
charge = -1,
|
||||
count = 16,
|
||||
mass = 1.0,
|
||||
name = 'up_electron',
|
||||
spin = 1,
|
||||
),
|
||||
)
|
||||
|
||||
# check direct system w/o tiling
|
||||
ref = direct_notile
|
||||
sref = ref.structure
|
||||
assert(ref.net_charge==0)
|
||||
assert(ref.net_spin==0)
|
||||
assert(ref.pseudized)
|
||||
assert(object_eq(ref.valency,obj(C=4)))
|
||||
assert(object_eq(ref.particles.to_obj(),pref))
|
||||
assert(structure_same(sref,d8))
|
||||
assert(value_eq(sref.axes,3.57*np.eye(3)))
|
||||
assert(tuple(sref.bconds)==tuple('ppp'))
|
||||
assert(list(sref.elem)==8*['C'])
|
||||
assert(value_eq(tuple(sref.pos[-1]),(2.6775,2.6775,0.8925)))
|
||||
assert(sref.units=='A')
|
||||
assert(object_eq(ref.particles.get_ions().to_obj(),obj(C=pref.C)))
|
||||
assert(object_eq(ref.particles.get_electrons().to_obj(),obj(down_electron=pref.down_electron,up_electron=pref.up_electron)))
|
||||
|
||||
# check direct system w/ tiling
|
||||
ref = direct_tile
|
||||
sref = ref.structure
|
||||
assert(ref.net_charge==0)
|
||||
assert(ref.net_spin==0)
|
||||
assert(ref.pseudized)
|
||||
assert(object_eq(ref.valency,obj(C=4)))
|
||||
assert(object_eq(ref.particles.to_obj(),pref))
|
||||
assert(structure_same(sref,d8_tile))
|
||||
assert(value_eq(sref.axes,3.57*np.eye(3)))
|
||||
assert(tuple(sref.bconds)==tuple('ppp'))
|
||||
assert(list(sref.elem)==8*['C'])
|
||||
assert(value_eq(tuple(sref.pos[-1]),(2.6775,0.8925,2.6775)))
|
||||
assert(sref.units=='A')
|
||||
ref = direct_tile.folded_system
|
||||
sref = ref.structure
|
||||
pref.C.count = 2
|
||||
pref.down_electron.count = 4
|
||||
pref.up_electron.count = 4
|
||||
assert(ref.net_charge==0)
|
||||
assert(ref.net_spin==0)
|
||||
assert(ref.pseudized)
|
||||
assert(object_eq(ref.valency,obj(C=4)))
|
||||
assert(object_eq(ref.particles.to_obj(),pref))
|
||||
assert(structure_same(sref,d2))
|
||||
assert(value_eq(sref.axes,1.785*np.array([[1.,1,0],[0,1,1],[1,0,1]])))
|
||||
assert(tuple(sref.bconds)==tuple('ppp'))
|
||||
assert(list(sref.elem)==2*['C'])
|
||||
assert(value_eq(tuple(sref.pos[-1]),(0.8925,0.8925,0.8925)))
|
||||
assert(sref.units=='A')
|
||||
|
||||
|
||||
ref_notile = direct_notile
|
||||
ref_tile = direct_tile
|
||||
|
||||
assert(system_same(struct_notile,ref_notile))
|
||||
assert(system_same(read_notile ,ref_notile))
|
||||
assert(system_same(gen_notile ,ref_notile))
|
||||
assert(system_same(lookup_notile,ref_notile))
|
||||
|
||||
assert(system_same(struct_tile,ref_tile,tiled=True))
|
||||
assert(system_same(read_tile ,ref_tile,tiled=True))
|
||||
assert(system_same(gen_tile ,ref_tile,tiled=True))
|
||||
assert(system_same(lookup_tile,ref_tile,tiled=True))
|
||||
|
||||
systems_notile = [
|
||||
direct_notile,
|
||||
struct_notile,
|
||||
read_notile ,
|
||||
gen_notile ,
|
||||
lookup_notile,
|
||||
]
|
||||
systems_tile = [
|
||||
direct_tile,
|
||||
struct_tile,
|
||||
read_tile ,
|
||||
gen_tile ,
|
||||
lookup_tile,
|
||||
]
|
||||
systems = systems_notile+systems_tile
|
||||
for sys in systems:
|
||||
assert(sys.is_valid())
|
||||
#end for
|
||||
|
||||
# test has_folded
|
||||
for sys in systems_notile:
|
||||
assert(not sys.has_folded())
|
||||
#end for
|
||||
for sys in systems_tile:
|
||||
assert(sys.has_folded())
|
||||
#end for
|
||||
|
||||
# test copy
|
||||
for sys in systems:
|
||||
c = sys.copy()
|
||||
assert(id(c)!=id(sys))
|
||||
assert(c.is_valid())
|
||||
assert(system_same(c,sys,tiled=sys.has_folded()))
|
||||
#end for
|
||||
|
||||
# test load
|
||||
for i,sys in enumerate(systems):
|
||||
path = os.path.join(tpath,'system_{}'.format(i))
|
||||
sys.save(path)
|
||||
sys2 = PhysicalSystem()
|
||||
sys2.load(path)
|
||||
assert(sys2.is_valid())
|
||||
assert(system_same(sys2,sys,tiled=sys.has_folded()))
|
||||
#end for
|
||||
|
||||
# test particle counts
|
||||
p = direct_notile.particles
|
||||
assert(p.count_ions()==8)
|
||||
assert(p.count_ions(species=True)==(8,1))
|
||||
assert(p.count_electrons()==32)
|
||||
assert(p.electron_counts()==[16,16])
|
||||
|
||||
#end def test_physical_system_initialization
|
||||
|
||||
|
||||
|
||||
def test_change_units():
|
||||
from physical_system import generate_physical_system
|
||||
|
||||
sys = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[3.57, 0.00, 0.00],
|
||||
[0.00, 3.57, 0.00],
|
||||
[0.00, 0.00, 3.57]],
|
||||
elem = 8*['C'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25],
|
||||
[0.00, 0.50, 0.50],
|
||||
[0.25, 0.75, 0.75],
|
||||
[0.50, 0.00, 0.50],
|
||||
[0.75, 0.25, 0.75],
|
||||
[0.50, 0.50, 0.00],
|
||||
[0.75, 0.75, 0.25]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
s = sys.structure
|
||||
|
||||
assert(value_eq(s.pos[-1],np.array([2.6775,2.6775,0.8925])))
|
||||
sys.change_units('B')
|
||||
assert(value_eq(s.pos[-1],np.array([5.05974172,5.05974172,1.68658057])))
|
||||
#end def test_change_units
|
||||
|
||||
|
||||
|
||||
def test_rename():
|
||||
from generic import obj
|
||||
from physical_system import generate_physical_system
|
||||
|
||||
sys = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[1.785, 1.785, 0. ],
|
||||
[0. , 1.785, 1.785],
|
||||
[1.785, 0. , 1.785]],
|
||||
elem = ['C1','C2'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25]],
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C1 = 4,
|
||||
C2 = 4,
|
||||
)
|
||||
|
||||
ref = sys
|
||||
assert(object_eq(ref.valency,obj(C1=4,C2=4)))
|
||||
assert(list(ref.structure.elem)==4*['C1','C2'])
|
||||
assert(ref.particles.count_ions()==8)
|
||||
assert(ref.particles.count_ions(species=True)==(8,2))
|
||||
ref = sys.folded_system
|
||||
assert(object_eq(ref.valency,obj(C1=4,C2=4)))
|
||||
assert(list(ref.structure.elem)==['C1','C2'])
|
||||
assert(ref.particles.count_ions()==2)
|
||||
assert(ref.particles.count_ions(species=True)==(2,2))
|
||||
|
||||
sys.rename(C1='C',C2='C')
|
||||
|
||||
ref = sys
|
||||
assert(object_eq(ref.valency,obj(C=4)))
|
||||
assert(list(ref.structure.elem)==8*['C'])
|
||||
assert(ref.particles.count_ions()==8)
|
||||
assert(ref.particles.count_ions(species=True)==(8,1))
|
||||
ref = sys.folded_system
|
||||
assert(object_eq(ref.valency,obj(C=4)))
|
||||
assert(list(ref.structure.elem)==2*['C'])
|
||||
assert(ref.particles.count_ions()==2)
|
||||
assert(ref.particles.count_ions(species=True)==(2,1))
|
||||
|
||||
#end def test_rename
|
||||
|
||||
|
||||
|
||||
def test_tile():
|
||||
from physical_system import generate_physical_system
|
||||
|
||||
d2_ref = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[1.785, 1.785, 0. ],
|
||||
[0. , 1.785, 1.785],
|
||||
[1.785, 0. , 1.785]],
|
||||
elem = 2*['C'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
d8_ref = generate_physical_system(
|
||||
units = 'A',
|
||||
axes = [[1.785, 1.785, 0. ],
|
||||
[0. , 1.785, 1.785],
|
||||
[1.785, 0. , 1.785]],
|
||||
elem = 2*['C'],
|
||||
posu = [[0.00, 0.00, 0.00],
|
||||
[0.25, 0.25, 0.25]],
|
||||
tiling = [[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]],
|
||||
C = 4,
|
||||
)
|
||||
|
||||
d8 = d2_ref.tile([[ 1, -1, 1],
|
||||
[ 1, 1, -1],
|
||||
[-1, 1, 1]])
|
||||
|
||||
assert(system_same(d8,d8_ref,tiled=True))
|
||||
#end def test_tile
|
||||
|
||||
|
||||
|
||||
def test_kf_rpa():
|
||||
from physical_system import generate_physical_system
|
||||
s1 = example_structure_h4()
|
||||
ps = generate_physical_system(
|
||||
structure = s1,
|
||||
net_charge = 1,
|
||||
net_spin = 1,
|
||||
H = 1
|
||||
)
|
||||
kfs = ps.kf_rpa()
|
||||
assert np.isclose(kfs[0], 1.465, atol=1e-3)
|
||||
assert np.isclose(kfs[1], 1.465/2**(1./3), atol=1e-3)
|
||||
from test_structure import example_structure_h4
|
||||
from physical_system import generate_physical_system
|
||||
s1 = example_structure_h4()
|
||||
ps = generate_physical_system(
|
||||
structure = s1,
|
||||
net_charge = 1,
|
||||
net_spin = 1,
|
||||
H = 1
|
||||
)
|
||||
kfs = ps.kf_rpa()
|
||||
assert np.isclose(kfs[0], 1.465, atol=1e-3)
|
||||
assert np.isclose(kfs[1], 1.465/2**(1./3), atol=1e-3)
|
||||
#end def test_kf_rpa
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_kf_rpa()
|
||||
#end __main__
|
||||
|
|
|
@ -0,0 +1,439 @@
|
|||
|
||||
import testing
|
||||
from testing import value_eq,object_eq
|
||||
from testing import divert_nexus_log,restore_nexus_log
|
||||
|
||||
|
||||
associated_files = dict()
|
||||
|
||||
|
||||
def get_filenames():
|
||||
filenames = [
|
||||
'C.BFD.gms',
|
||||
'C.BFD.upf',
|
||||
'C.BFD.xml',
|
||||
]
|
||||
return filenames
|
||||
#end def get_filenames
|
||||
|
||||
|
||||
def get_files():
|
||||
return testing.collect_unit_test_file_paths('pseudopotential',associated_files)
|
||||
#end def get_files
|
||||
|
||||
|
||||
|
||||
def test_files():
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
assert(set(files.keys())==set(filenames))
|
||||
#end def test_files
|
||||
|
||||
|
||||
def test_import():
|
||||
import pseudopotential
|
||||
from pseudopotential import Pseudopotentials
|
||||
from pseudopotential import PseudoFile
|
||||
from pseudopotential import gamessPPFile
|
||||
from pseudopotential import PPset
|
||||
from pseudopotential import Pseudopotential
|
||||
from pseudopotential import SemilocalPP
|
||||
from pseudopotential import GaussianPP
|
||||
from pseudopotential import QmcpackPP
|
||||
from pseudopotential import CasinoPP
|
||||
#end def test_import
|
||||
|
||||
|
||||
|
||||
def test_pp_elem_label():
|
||||
from pseudopotential import pp_elem_label
|
||||
|
||||
ppfiles = [
|
||||
('C' , 'C' , 'C.BFD.xml' ),
|
||||
('C2' , 'C' , 'C2.ONCV.upf' ),
|
||||
('C' , 'C' , 'C_ONCV.upf' ),
|
||||
('C' , 'C' , 'C-ONCV.upf' ),
|
||||
('Co' , 'Co' , 'Co.BFD.xml' ),
|
||||
('Co2', 'Co' , 'Co2.ONCV.upf'),
|
||||
('Co' , 'Co' , 'Co_ONCV.upf' ),
|
||||
('Co' , 'Co' , 'Co-ONCV.upf' ),
|
||||
]
|
||||
|
||||
for reflabel,refsymbol,ppfile in ppfiles:
|
||||
label,symbol,is_elem = pp_elem_label(ppfile)
|
||||
assert(is_elem)
|
||||
assert(label==reflabel)
|
||||
assert(symbol==refsymbol)
|
||||
#end for
|
||||
|
||||
#end def test_pp_elem_label
|
||||
|
||||
|
||||
|
||||
def test_pseudopotentials():
|
||||
from pseudopotential import Pseudopotentials
|
||||
from pseudopotential import PseudoFile
|
||||
from pseudopotential import gamessPPFile
|
||||
|
||||
filenames = get_filenames()
|
||||
files = get_files()
|
||||
|
||||
filepaths = [files[fn] for fn in filenames]
|
||||
|
||||
# empty initialization
|
||||
Pseudopotentials()
|
||||
PseudoFile()
|
||||
gamessPPFile()
|
||||
|
||||
# standard initialization
|
||||
divert_nexus_log()
|
||||
pps = Pseudopotentials(filepaths)
|
||||
restore_nexus_log()
|
||||
|
||||
for fn in filenames:
|
||||
assert(fn in pps)
|
||||
pp = pps[fn]
|
||||
assert(isinstance(pp,PseudoFile))
|
||||
if fn.endswith('.gms'):
|
||||
assert(isinstance(pp,gamessPPFile))
|
||||
#end if
|
||||
assert(pp.element=='C')
|
||||
assert(pp.element_label=='C')
|
||||
assert(pp.filename==fn)
|
||||
#end for
|
||||
|
||||
basis_ref = '''s 9 1.00
|
||||
1 0.051344 0.013991
|
||||
2 0.102619 0.169852
|
||||
3 0.205100 0.397529
|
||||
4 0.409924 0.380369
|
||||
5 0.819297 0.180113
|
||||
6 1.637494 -0.033512
|
||||
7 3.272791 -0.121499
|
||||
8 6.541187 0.015176
|
||||
9 13.073594 -0.000705
|
||||
s 1 1.00
|
||||
1 0.098302 1.000000
|
||||
s 1 1.00
|
||||
1 0.232034 1.000000
|
||||
s 1 1.00
|
||||
1 0.744448 1.000000
|
||||
s 1 1.00
|
||||
1 1.009914 1.000000
|
||||
p 9 1.00
|
||||
1 0.029281 0.001787
|
||||
2 0.058547 0.050426
|
||||
3 0.117063 0.191634
|
||||
4 0.234064 0.302667
|
||||
5 0.468003 0.289868
|
||||
6 0.935757 0.210979
|
||||
7 1.871016 0.112024
|
||||
8 3.741035 0.054425
|
||||
9 7.480076 0.021931
|
||||
p 1 1.00
|
||||
1 0.084047 1.000000
|
||||
p 1 1.00
|
||||
1 0.216618 1.000000
|
||||
p 1 1.00
|
||||
1 0.576869 1.000000
|
||||
p 1 1.00
|
||||
1 1.006252 1.000000
|
||||
d 1 1.00
|
||||
1 0.206619 1.000000
|
||||
d 1 1.00
|
||||
1 0.606933 1.000000
|
||||
d 1 1.00
|
||||
1 1.001526 1.000000
|
||||
d 1 1.00
|
||||
1 1.504882 1.000000
|
||||
f 1 1.00
|
||||
1 0.400573 1.000000
|
||||
f 1 1.00
|
||||
1 1.099564 1.000000
|
||||
f 1 1.00
|
||||
1 1.501091 1.000000
|
||||
g 1 1.00
|
||||
1 0.797648 1.000000
|
||||
g 1 1.00
|
||||
1 1.401343 1.000000
|
||||
h 1 1.00
|
||||
1 1.001703 1.000000'''
|
||||
|
||||
pp_ref = '''C-QMC GEN 2 1
|
||||
3
|
||||
4.00000000 1 8.35973821
|
||||
33.43895285 3 4.48361888
|
||||
-19.17537323 2 3.93831258
|
||||
1
|
||||
22.55164191 2 5.02991637'''
|
||||
|
||||
pp = pps['C.BFD.gms']
|
||||
assert(pp.basis_text==basis_ref)
|
||||
assert(pp.pp_text==pp_ref)
|
||||
|
||||
#end def test_pseudopotentials
|
||||
|
||||
|
||||
|
||||
def test_ppset():
|
||||
from generic import obj
|
||||
from pseudopotential import ppset
|
||||
|
||||
ppset_ref = obj(
|
||||
pseudos = obj(
|
||||
bfd = obj(
|
||||
gamess = obj(C='C.BFD.gms'),
|
||||
pwscf = obj(C='C.BFD.upf'),
|
||||
qmcpack = obj(C='C.BFD.xml'),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
ppset(
|
||||
label = 'bfd',
|
||||
gamess = ['C.BFD.gms'],
|
||||
pwscf = ['C.BFD.upf'],
|
||||
qmcpack = ['C.BFD.xml'],
|
||||
)
|
||||
|
||||
o = ppset.to_obj()
|
||||
assert(object_eq(o,ppset_ref))
|
||||
|
||||
assert(ppset.supports_code('pwscf'))
|
||||
assert(ppset.supports_code('gamess'))
|
||||
assert(ppset.supports_code('vasp'))
|
||||
assert(ppset.supports_code('qmcpack'))
|
||||
|
||||
assert(ppset.has_set('bfd'))
|
||||
|
||||
|
||||
# need to add test for get() method
|
||||
# depends on PhysicalSystem
|
||||
#end def test_ppset
|
||||
|
||||
|
||||
|
||||
def test_pseudopotential_classes():
|
||||
import os
|
||||
import numpy as np
|
||||
from pseudopotential import SemilocalPP
|
||||
from pseudopotential import GaussianPP
|
||||
from pseudopotential import QmcpackPP
|
||||
from pseudopotential import CasinoPP
|
||||
|
||||
tpath = testing.setup_unit_test_output_directory('pseudopotential','test_pseudopotential_classes')
|
||||
|
||||
files = get_files()
|
||||
|
||||
# empty initialization
|
||||
SemilocalPP()
|
||||
GaussianPP()
|
||||
QmcpackPP()
|
||||
CasinoPP()
|
||||
|
||||
|
||||
qpp = QmcpackPP(files['C.BFD.xml'])
|
||||
|
||||
# SemilocalPP attributes/methods
|
||||
assert(qpp.name is None)
|
||||
assert(qpp.rcut is None)
|
||||
assert(qpp.lmax==1)
|
||||
assert(qpp.local=='p')
|
||||
|
||||
assert(qpp.has_component('s'))
|
||||
assert(qpp.has_component('p'))
|
||||
|
||||
assert(isinstance(qpp.get_component('s'),np.ndarray))
|
||||
assert(isinstance(qpp.get_component('p'),np.ndarray))
|
||||
|
||||
assert(qpp.has_local())
|
||||
assert(qpp.has_nonlocal())
|
||||
assert(not qpp.has_L2())
|
||||
|
||||
vnl = qpp.get_nonlocal()
|
||||
|
||||
rc = qpp.find_rcut()
|
||||
assert(value_eq(rc,1.705,tol=1e-3))
|
||||
|
||||
# below follows by virtue of being numeric
|
||||
qpp.assert_numeric('some location')
|
||||
|
||||
vcomp = qpp.components
|
||||
|
||||
vloc = qpp.evaluate_local(rpow=1)
|
||||
assert(value_eq(vloc,vcomp.p))
|
||||
|
||||
vnonloc = qpp.evaluate_nonlocal(l='s',rpow=1)
|
||||
assert(value_eq(vnonloc,vcomp.s))
|
||||
|
||||
vs = qpp.evaluate_channel(l='s',rpow=1)
|
||||
assert(value_eq(vs,vcomp.s+vcomp.p))
|
||||
|
||||
vp = qpp.evaluate_channel(l='p',rpow=1)
|
||||
assert(value_eq(vp,vcomp.p))
|
||||
|
||||
r,vsn = qpp.numeric_channel(l='s',rpow=1)
|
||||
r,vpn = qpp.numeric_channel(l='p',rpow=1)
|
||||
assert(value_eq(r,qpp.r))
|
||||
assert(value_eq(vsn,vs))
|
||||
assert(value_eq(vpn,vp))
|
||||
|
||||
# QmcpackPP attributes/methods
|
||||
assert(qpp.numeric)
|
||||
assert(qpp.Zcore==2)
|
||||
assert(qpp.Zval==4)
|
||||
assert(qpp.core=='He')
|
||||
assert(qpp.element=='C')
|
||||
assert(value_eq(float(qpp.rmin),0.))
|
||||
assert(value_eq(qpp.rmax,10.))
|
||||
assert(value_eq(qpp.r.min(),0.))
|
||||
assert(value_eq(qpp.r.max(),10.))
|
||||
|
||||
assert(value_eq(qpp.v_at_zero('s'),22.551641791033372))
|
||||
assert(value_eq(qpp.v_at_zero('p'),-19.175372435022126))
|
||||
|
||||
qpp_fake = qpp.copy()
|
||||
r = np.linspace(0,10,6)
|
||||
vloc = 0*r + qpp.Zval
|
||||
vnl = 0*r
|
||||
qpp_fake.r = r
|
||||
qpp_fake.components.s = vnl
|
||||
qpp_fake.components.p = vloc
|
||||
|
||||
qtext_ref = '''<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pseudo version="0.5">
|
||||
<header symbol="C" atomic-number="6" zval="4" relativistic="unknown"
|
||||
polarized="unknown" creator="Nexus" flavor="unknown"
|
||||
core-corrections="unknown" xc-functional-type="unknown"
|
||||
xc-functional-parametrization="unknown"/>
|
||||
<grid type="linear" units="bohr" ri="0.0" rf="10.0" npts="6"/>
|
||||
<semilocal units="hartree" format="r*V" npots-down="2" npots-up="0" l-local="1">
|
||||
<vps principal-n="0" l="s" spin="-1" cutoff="10.0" occupation="unknown">
|
||||
<radfunc>
|
||||
<grid type="linear" units="bohr" ri="0.0" rf="10.0" npts="6"/>
|
||||
<data>
|
||||
4.00000000000000e+00 4.00000000000000e+00 4.00000000000000e+00
|
||||
4.00000000000000e+00 4.00000000000000e+00 4.00000000000000e+00
|
||||
</data>
|
||||
</radfunc>
|
||||
</vps>
|
||||
<vps principal-n="0" l="p" spin="-1" cutoff="10.0" occupation="unknown">
|
||||
<radfunc>
|
||||
<grid type="linear" units="bohr" ri="0.0" rf="10.0" npts="6"/>
|
||||
<data>
|
||||
4.00000000000000e+00 4.00000000000000e+00 4.00000000000000e+00
|
||||
4.00000000000000e+00 4.00000000000000e+00 4.00000000000000e+00
|
||||
</data>
|
||||
</radfunc>
|
||||
</vps>
|
||||
</semilocal>
|
||||
</pseudo>'''
|
||||
|
||||
qtext = qpp_fake.write_qmcpack()
|
||||
assert(qtext.strip()==qtext_ref.strip())
|
||||
|
||||
ctext_ref = '''C pseudopotential converted by Nexus
|
||||
Atomic number and pseudo-charge
|
||||
6 4.0
|
||||
Energy units (rydberg/hartree/ev):
|
||||
hartree
|
||||
Angular momentum of local component (0=s,1=p,2=d..)
|
||||
1
|
||||
NLRULE override (1) VMC/DMC (2) config gen (0 ==> input/default value)
|
||||
0 0
|
||||
Number of grid points
|
||||
6
|
||||
R(i) in atomic units
|
||||
0.00000000000000e+00
|
||||
2.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
6.00000000000000e+00
|
||||
8.00000000000000e+00
|
||||
1.00000000000000e+01
|
||||
r*potential (L=0) in Ha
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
r*potential (L=1) in Ha
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00
|
||||
4.00000000000000e+00'''
|
||||
|
||||
ctext = qpp_fake.write_casino()
|
||||
assert(ctext.strip()==ctext_ref.strip())
|
||||
|
||||
|
||||
# tests for GaussianPP
|
||||
gpp = GaussianPP(files['C.BFD.gms'],format='gamess')
|
||||
assert(gpp.Zcore == 2 )
|
||||
assert(gpp.Zval == 4 )
|
||||
assert(gpp.core == 'He')
|
||||
assert(gpp.element == 'C' )
|
||||
assert(gpp.lmax == 1 )
|
||||
assert(gpp.local == 'p' )
|
||||
assert(gpp.name is None)
|
||||
assert(value_eq(gpp.rcut,1.7053,tol=1e-3))
|
||||
|
||||
assert(len(gpp.basis)==20)
|
||||
|
||||
nterms_ref = [9,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
|
||||
nterms = []
|
||||
for n in range(len(gpp.basis)):
|
||||
nterms.append(len(gpp.basis[n].terms))
|
||||
#end for
|
||||
assert(nterms==nterms_ref)
|
||||
|
||||
assert(value_eq(gpp.basis[5].terms[4].coeff,0.289868))
|
||||
|
||||
assert(len(gpp.components.s)==1)
|
||||
assert(len(gpp.components.p)==3)
|
||||
|
||||
assert(value_eq(gpp.components.p[1].expon,4.48361888))
|
||||
|
||||
# check cross-format write/read
|
||||
gamess_file = os.path.join(tpath,'C.BFD.gamess')
|
||||
gpp.write(gamess_file,format='gamess')
|
||||
|
||||
gaussian_file = os.path.join(tpath,'C.BFD.gaussian')
|
||||
gpp.write(gaussian_file,format='gaussian')
|
||||
|
||||
qmcpack_file = os.path.join(tpath,'C.BFD.qmcpack')
|
||||
gpp.write(qmcpack_file,format='qmcpack')
|
||||
|
||||
casino_file = os.path.join(tpath,'C.BFD.casino')
|
||||
gpp.write(casino_file,format='casino')
|
||||
|
||||
|
||||
gpp_gamess = GaussianPP(gamess_file,format='gamess')
|
||||
assert(object_eq(gpp_gamess,gpp))
|
||||
|
||||
gpp_gaussian = GaussianPP(gaussian_file,format='gaussian')
|
||||
assert(object_eq(gpp_gaussian,gpp))
|
||||
|
||||
qpp_qmcpack = QmcpackPP(qmcpack_file)
|
||||
assert(object_eq(qpp_qmcpack,qpp,int_as_float=True))
|
||||
|
||||
|
||||
# tests for CasinoPP
|
||||
cpp = CasinoPP(casino_file)
|
||||
|
||||
qo = qpp.to_obj()
|
||||
co = cpp.to_obj()
|
||||
del qo.rmin
|
||||
del qo.rmax
|
||||
assert(object_eq(co,qo))
|
||||
|
||||
qmcpack_from_casino_file = os.path.join(tpath,'C.BFD.qmcpack_from_casino')
|
||||
cpp.write_qmcpack(qmcpack_from_casino_file)
|
||||
|
||||
qpp_casino = QmcpackPP(qmcpack_from_casino_file)
|
||||
assert(object_eq(qpp_casino,qpp,int_as_float=True))
|
||||
|
||||
#end def test_pseudopotential_classes
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
C 6 0. 0. 0.
|
||||
s 9 1.00
|
||||
1 0.051344 0.013991
|
||||
2 0.102619 0.169852
|
||||
3 0.205100 0.397529
|
||||
4 0.409924 0.380369
|
||||
5 0.819297 0.180113
|
||||
6 1.637494 -0.033512
|
||||
7 3.272791 -0.121499
|
||||
8 6.541187 0.015176
|
||||
9 13.073594 -0.000705
|
||||
s 1 1.00
|
||||
1 0.098302 1.000000
|
||||
s 1 1.00
|
||||
1 0.232034 1.000000
|
||||
s 1 1.00
|
||||
1 0.744448 1.000000
|
||||
s 1 1.00
|
||||
1 1.009914 1.000000
|
||||
p 9 1.00
|
||||
1 0.029281 0.001787
|
||||
2 0.058547 0.050426
|
||||
3 0.117063 0.191634
|
||||
4 0.234064 0.302667
|
||||
5 0.468003 0.289868
|
||||
6 0.935757 0.210979
|
||||
7 1.871016 0.112024
|
||||
8 3.741035 0.054425
|
||||
9 7.480076 0.021931
|
||||
p 1 1.00
|
||||
1 0.084047 1.000000
|
||||
p 1 1.00
|
||||
1 0.216618 1.000000
|
||||
p 1 1.00
|
||||
1 0.576869 1.000000
|
||||
p 1 1.00
|
||||
1 1.006252 1.000000
|
||||
d 1 1.00
|
||||
1 0.206619 1.000000
|
||||
d 1 1.00
|
||||
1 0.606933 1.000000
|
||||
d 1 1.00
|
||||
1 1.001526 1.000000
|
||||
d 1 1.00
|
||||
1 1.504882 1.000000
|
||||
f 1 1.00
|
||||
1 0.400573 1.000000
|
||||
f 1 1.00
|
||||
1 1.099564 1.000000
|
||||
f 1 1.00
|
||||
1 1.501091 1.000000
|
||||
g 1 1.00
|
||||
1 0.797648 1.000000
|
||||
g 1 1.00
|
||||
1 1.401343 1.000000
|
||||
h 1 1.00
|
||||
1 1.001703 1.000000
|
||||
|
||||
|
||||
C-QMC GEN 2 1
|
||||
3
|
||||
4.00000000 1 8.35973821
|
||||
33.43895285 3 4.48361888
|
||||
-19.17537323 2 3.93831258
|
||||
1
|
||||
22.55164191 2 5.02991637
|
|
@ -0,0 +1 @@
|
|||
../../../examples/qmcpack/pseudopotentials/C.BFD.upf
|
|
@ -0,0 +1 @@
|
|||
../../../examples/qmcpack/pseudopotentials/C.BFD.xml
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
|||
|
||||
#(C) 2019 by FIZ Karlsruhe - Leibniz Institute for Information Infrastructure. All rights reserved.
|
||||
data_69312-ICSD
|
||||
_database_code_ICSD 69312
|
||||
_audit_creation_date 1992-08-20
|
||||
_audit_update_record 2006-04-01
|
||||
_chemical_name_systematic 'Dilanthanum cuprate'
|
||||
_chemical_formula_structural 'La2 (Cu O4)'
|
||||
_chemical_formula_sum 'Cu1 La2 O4'
|
||||
_chemical_name_structure_type La2CuO4
|
||||
_exptl_crystal_density_diffrn 7.12
|
||||
_cell_measurement_temperature 10.
|
||||
_publ_section_title
|
||||
'Neutron and synchrotron X-ray powder diffraction study of La2 Cu O4+d'
|
||||
loop_
|
||||
_citation_id
|
||||
_citation_journal_full
|
||||
_citation_year
|
||||
_citation_journal_volume
|
||||
_citation_page_first
|
||||
_citation_page_last
|
||||
_citation_journal_id_ASTM
|
||||
primary 'Physical Review B: Condensed Matter and Materials Physics' 1990 42 6332
|
||||
6341 PRBMDO
|
||||
loop_
|
||||
_publ_author_name
|
||||
'Zolliker, P.'
|
||||
'Cox, D.E.'
|
||||
'Parise, J.B.'
|
||||
'McCarron, E.M.'
|
||||
'Farneth, W.E.'
|
||||
_cell_length_a 5.3300(6)
|
||||
_cell_length_b 5.4126(6)
|
||||
_cell_length_c 13.105(2)
|
||||
_cell_angle_alpha 90.
|
||||
_cell_angle_beta 90.
|
||||
_cell_angle_gamma 90.
|
||||
_cell_volume 378.07
|
||||
_cell_formula_units_Z 4
|
||||
_symmetry_space_group_name_H-M 'B m a b'
|
||||
_symmetry_Int_Tables_number 64
|
||||
_refine_ls_R_factor_all 0.097
|
||||
loop_
|
||||
_symmetry_equiv_pos_site_id
|
||||
_symmetry_equiv_pos_as_xyz
|
||||
1 '-x, y+1/2, -z+1/2'
|
||||
2 '-x, -y+1/2, z+1/2'
|
||||
3 '-x, y, z'
|
||||
4 '-x, -y, -z'
|
||||
5 'x, -y+1/2, z+1/2'
|
||||
6 'x, y+1/2, -z+1/2'
|
||||
7 'x, -y, -z'
|
||||
8 'x, y, z'
|
||||
9 '-x+1/2, y+1/2, -z'
|
||||
10 '-x+1/2, -y+1/2, z'
|
||||
11 '-x+1/2, y, z+1/2'
|
||||
12 '-x+1/2, -y, -z+1/2'
|
||||
13 'x+1/2, -y+1/2, z'
|
||||
14 'x+1/2, y+1/2, -z'
|
||||
15 'x+1/2, -y, -z+1/2'
|
||||
16 'x+1/2, y, z+1/2'
|
||||
loop_
|
||||
_atom_type_symbol
|
||||
_atom_type_oxidation_number
|
||||
La3+ 3
|
||||
Cu2+ 2
|
||||
O2- -2
|
||||
loop_
|
||||
_atom_site_label
|
||||
_atom_site_type_symbol
|
||||
_atom_site_symmetry_multiplicity
|
||||
_atom_site_Wyckoff_symbol
|
||||
_atom_site_fract_x
|
||||
_atom_site_fract_y
|
||||
_atom_site_fract_z
|
||||
_atom_site_B_iso_or_equiv
|
||||
_atom_site_occupancy
|
||||
_atom_site_attached_hydrogens
|
||||
La1 La3+ 8 f 0 -.0078(7) 0.3621(5) -.2(1) 1. 0
|
||||
Cu1 Cu2+ 4 a 0 0 0 -.2(1) 1. 0
|
||||
O1 O2- 8 e 0.25 0.25 -.0098(5) 0.1(1) 1. 0
|
||||
O2 O2- 8 f 0 0.0434(9) 0.1841(6) -.2(2) 1. 0
|
||||
#End of TTdata_69312-ICSD
|
|
@ -0,0 +1,38 @@
|
|||
36
|
||||
|
||||
C 5.5321 -0.5000 0.0000
|
||||
C 4.6660 -1.0000 0.0000
|
||||
C 5.5321 0.5000 0.0000
|
||||
C 3.8000 -0.5000 0.0000
|
||||
C 4.6660 1.0000 0.0000
|
||||
C 3.8000 0.5000 0.0000
|
||||
C 6.4260 -1.0347 0.0000
|
||||
C 4.6821 -2.0415 0.0000
|
||||
C 6.4421 1.0068 0.0000
|
||||
C 2.9061 -1.0347 0.0000
|
||||
C 4.6821 2.0415 0.0000
|
||||
C 2.9061 1.0347 0.0000
|
||||
C 7.3321 -0.5208 0.0000
|
||||
C 5.5480 -2.5693 0.0000
|
||||
C 6.4501 -2.0484 0.0000
|
||||
C 2.0000 -0.5208 0.0000
|
||||
C 3.7841 2.5693 0.0000
|
||||
C 6.4501 2.0484 0.0000
|
||||
C 2.0000 0.5208 0.0000
|
||||
C 5.5480 2.5693 0.0000
|
||||
C 7.3321 0.5208 0.0000
|
||||
C 2.8820 2.0484 0.0000
|
||||
C 3.7841 -2.5693 0.0000
|
||||
C 2.8820 -2.0484 0.0000
|
||||
H 7.8678 -0.8329 0.0000
|
||||
H 5.5406 -3.1892 0.0000
|
||||
H 6.9907 -2.3521 0.0000
|
||||
H 1.4643 0.8329 0.0000
|
||||
H 3.7864 3.1893 0.0000
|
||||
H 7.8653 0.8372 0.0000
|
||||
H 5.5406 3.1892 0.0000
|
||||
H 1.4643 -0.8329 0.0000
|
||||
H 3.7864 -3.1893 0.0000
|
||||
H 6.9882 2.3564 0.0000
|
||||
H 2.3414 2.3521 0.0000
|
||||
H 2.3414 -2.3521 0.0000
|
|
@ -0,0 +1,260 @@
|
|||
|
||||
import testing
|
||||
from testing import value_eq,object_eq
|
||||
|
||||
|
||||
associated_files = dict()
|
||||
|
||||
def get_files():
|
||||
return testing.collect_unit_test_file_paths('xmlreader',associated_files)
|
||||
#end def get_files
|
||||
|
||||
|
||||
|
||||
def test_files():
|
||||
filenames = [
|
||||
'vmc.in.xml',
|
||||
]
|
||||
files = get_files()
|
||||
assert(set(files.keys())==set(filenames))
|
||||
#end def test_files
|
||||
|
||||
|
||||
|
||||
def test_import():
|
||||
import xmlreader
|
||||
from xmlreader import XMLreader,readxml
|
||||
#end def test_import
|
||||
|
||||
|
||||
|
||||
def test_read():
|
||||
from generic import obj
|
||||
from xmlreader import readxml,XMLelement
|
||||
|
||||
ref = obj(
|
||||
simulation = obj(
|
||||
project = obj(
|
||||
id = 'vmc',
|
||||
series = '0',
|
||||
application = obj(
|
||||
class_ = 'serial',
|
||||
name = 'qmcpack',
|
||||
role = 'molecu',
|
||||
version = '1.0',
|
||||
)
|
||||
),
|
||||
qmc = obj(
|
||||
method = 'vmc',
|
||||
move = 'pbyp',
|
||||
parameter1 = obj(
|
||||
name = 'walkers',
|
||||
text = '1',
|
||||
),
|
||||
parameter2 = obj(
|
||||
name = 'warmupSteps',
|
||||
text = '20',
|
||||
),
|
||||
parameter3 = obj(
|
||||
name = 'blocks',
|
||||
text = '200',
|
||||
),
|
||||
parameter4 = obj(
|
||||
name = 'steps',
|
||||
text = '10',
|
||||
),
|
||||
parameter5 = obj(
|
||||
name = 'subSteps',
|
||||
text = '2',
|
||||
),
|
||||
parameter6 = obj(
|
||||
name = 'timestep',
|
||||
text = '0.4',
|
||||
),
|
||||
),
|
||||
qmcsystem = obj(
|
||||
hamiltonian = obj(
|
||||
name = 'h0',
|
||||
target = 'e',
|
||||
type = 'generic',
|
||||
estimator = obj(
|
||||
name = 'KEcorr',
|
||||
psi = 'psi0',
|
||||
source = 'e',
|
||||
type = 'chiesa',
|
||||
),
|
||||
pairpot1 = obj(
|
||||
name = 'ElecElec',
|
||||
source = 'e',
|
||||
target = 'e',
|
||||
type = 'coulomb',
|
||||
),
|
||||
pairpot2 = obj(
|
||||
name = 'IonIon',
|
||||
source = 'ion0',
|
||||
target = 'ion0',
|
||||
type = 'coulomb',
|
||||
),
|
||||
pairpot3 = obj(
|
||||
format = 'xml',
|
||||
name = 'PseudoPot',
|
||||
source = 'ion0',
|
||||
type = 'pseudo',
|
||||
wavefunction = 'psi0',
|
||||
pseudo = obj(
|
||||
elementType = 'C',
|
||||
href = 'C.BFD.xml',
|
||||
),
|
||||
),
|
||||
pairpot4 = obj(
|
||||
ecut = '60.0',
|
||||
name = 'MPC',
|
||||
physical = 'no',
|
||||
source = 'e',
|
||||
target = 'e',
|
||||
type = 'MPC',
|
||||
),
|
||||
),
|
||||
particleset1 = obj(
|
||||
name = 'e',
|
||||
random = 'yes',
|
||||
group1 = obj(
|
||||
mass = '1.0',
|
||||
name = 'u',
|
||||
size = '32',
|
||||
parameter1 = obj(
|
||||
name = 'charge',
|
||||
text = '-1',
|
||||
),
|
||||
parameter2 = obj(
|
||||
name = 'mass',
|
||||
text = '1.0',
|
||||
),
|
||||
),
|
||||
group2 = obj(
|
||||
mass = '1.0',
|
||||
name = 'd',
|
||||
size = '32',
|
||||
parameter1 = obj(
|
||||
name = 'charge',
|
||||
text = '-1',
|
||||
),
|
||||
parameter2 = obj(
|
||||
name = 'mass',
|
||||
text = '1.0',
|
||||
),
|
||||
),
|
||||
),
|
||||
particleset2 = obj(
|
||||
name = 'ion0',
|
||||
group = obj(
|
||||
mass = '21894.7135906',
|
||||
name = 'C',
|
||||
size = '16',
|
||||
attrib = obj(
|
||||
condition = '0',
|
||||
datatype = 'posArray',
|
||||
name = 'position',
|
||||
text = \
|
||||
'''6.74632230 6.74632230 0.00000000
|
||||
1.68658057 1.68658057 1.68658058
|
||||
3.37316115 3.37316115 0.00000000
|
||||
5.05974173 5.05974172 1.68658058
|
||||
0.00000000 3.37316115 3.37316115
|
||||
1.68658058 5.05974172 5.05974173
|
||||
3.37316115 6.74632230 3.37316115
|
||||
5.05974173 8.43290287 5.05974173
|
||||
3.37316115 0.00000000 3.37316115
|
||||
5.05974172 1.68658057 5.05974173
|
||||
6.74632230 3.37316115 3.37316115
|
||||
8.43290287 5.05974172 5.05974173
|
||||
10.11948345 10.11948345 6.74632230
|
||||
5.05974173 5.05974172 8.43290287
|
||||
6.74632230 6.74632230 6.74632230
|
||||
8.43290287 8.43290287 8.43290287''',
|
||||
),
|
||||
parameter1 = obj(
|
||||
name = 'charge',
|
||||
text = '4',
|
||||
),
|
||||
parameter2 = obj(
|
||||
name = 'valence',
|
||||
text = '4',
|
||||
),
|
||||
parameter3 = obj(
|
||||
name = 'atomicnumber',
|
||||
text = '6',
|
||||
),
|
||||
parameter4 = obj(
|
||||
name = 'mass',
|
||||
text = '21894.7135906',
|
||||
),
|
||||
),
|
||||
),
|
||||
simulationcell = obj(
|
||||
parameter1 = obj(
|
||||
name = 'lattice',
|
||||
text = \
|
||||
'''6.74632230 6.74632230 0.00000000
|
||||
0.00000000 6.74632230 6.74632230
|
||||
6.74632230 0.00000000 6.74632230''',
|
||||
units = 'bohr',
|
||||
),
|
||||
parameter2 = obj(
|
||||
name = 'bconds',
|
||||
text = 'p p p',
|
||||
),
|
||||
parameter3 = obj(
|
||||
name = 'LR_dim_cutoff',
|
||||
text = '15',
|
||||
),
|
||||
),
|
||||
wavefunction = obj(
|
||||
name = 'psi0',
|
||||
target = 'e',
|
||||
determinantset = obj(
|
||||
slaterdeterminant = obj(
|
||||
determinant1 = obj(
|
||||
group = 'u',
|
||||
id = 'updet',
|
||||
size = '32',
|
||||
sposet = 'spo_ud',
|
||||
),
|
||||
determinant2 = obj(
|
||||
group = 'd',
|
||||
id = 'downdet',
|
||||
size = '32',
|
||||
sposet = 'spo_ud',
|
||||
),
|
||||
),
|
||||
),
|
||||
sposet_builder = obj(
|
||||
href = 'MISSING.h5',
|
||||
meshfactor = '1.0',
|
||||
precision = 'float',
|
||||
source = 'ion0',
|
||||
tilematrix = '2 0 0 0 2 0 0 0 2',
|
||||
truncate = 'no',
|
||||
twistnum = '0',
|
||||
type = 'bspline',
|
||||
version = '0.10',
|
||||
sposet = obj(
|
||||
name = 'spo_ud',
|
||||
size = '32',
|
||||
spindataset = '0',
|
||||
type = 'bspline',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
files = get_files()
|
||||
x = readxml(files['vmc.in.xml'])
|
||||
assert(isinstance(x,XMLelement))
|
||||
x.remove_hidden()
|
||||
o = x.to_obj()
|
||||
|
||||
assert(object_eq(o,ref))
|
||||
#end def test_read
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0"?>
|
||||
<simulation>
|
||||
<project id="vmc" series="0">
|
||||
<application name="qmcpack" role="molecu" class="serial" version="1.0"/>
|
||||
</project>
|
||||
<qmcsystem>
|
||||
<simulationcell>
|
||||
<parameter name="lattice" units="bohr">
|
||||
6.74632230 6.74632230 0.00000000
|
||||
0.00000000 6.74632230 6.74632230
|
||||
6.74632230 0.00000000 6.74632230
|
||||
</parameter>
|
||||
<parameter name="bconds">
|
||||
p p p
|
||||
</parameter>
|
||||
<parameter name="LR_dim_cutoff" > 15 </parameter>
|
||||
</simulationcell>
|
||||
<particleset name="e" random="yes">
|
||||
<group name="u" size="32" mass="1.0">
|
||||
<parameter name="charge" > -1 </parameter>
|
||||
<parameter name="mass" > 1.0 </parameter>
|
||||
</group>
|
||||
<group name="d" size="32" mass="1.0">
|
||||
<parameter name="charge" > -1 </parameter>
|
||||
<parameter name="mass" > 1.0 </parameter>
|
||||
</group>
|
||||
</particleset>
|
||||
<particleset name="ion0">
|
||||
<group name="C" size="16" mass="21894.7135906">
|
||||
<parameter name="charge" > 4 </parameter>
|
||||
<parameter name="valence" > 4 </parameter>
|
||||
<parameter name="atomicnumber" > 6 </parameter>
|
||||
<parameter name="mass" > 21894.7135906 </parameter>
|
||||
<attrib name="position" datatype="posArray" condition="0">
|
||||
6.74632230 6.74632230 0.00000000
|
||||
1.68658057 1.68658057 1.68658058
|
||||
3.37316115 3.37316115 0.00000000
|
||||
5.05974173 5.05974172 1.68658058
|
||||
0.00000000 3.37316115 3.37316115
|
||||
1.68658058 5.05974172 5.05974173
|
||||
3.37316115 6.74632230 3.37316115
|
||||
5.05974173 8.43290287 5.05974173
|
||||
3.37316115 0.00000000 3.37316115
|
||||
5.05974172 1.68658057 5.05974173
|
||||
6.74632230 3.37316115 3.37316115
|
||||
8.43290287 5.05974172 5.05974173
|
||||
10.11948345 10.11948345 6.74632230
|
||||
5.05974173 5.05974172 8.43290287
|
||||
6.74632230 6.74632230 6.74632230
|
||||
8.43290287 8.43290287 8.43290287
|
||||
</attrib>
|
||||
</group>
|
||||
</particleset>
|
||||
<wavefunction name="psi0" target="e">
|
||||
<sposet_builder type="bspline" href="MISSING.h5" tilematrix="2 0 0 0 2 0 0 0 2" twistnum="0" source="ion0" version="0.10" meshfactor="1.0" precision="float" truncate="no">
|
||||
<sposet type="bspline" name="spo_ud" size="32" spindataset="0"/>
|
||||
</sposet_builder>
|
||||
<determinantset>
|
||||
<slaterdeterminant>
|
||||
<determinant id="updet" group="u" sposet="spo_ud" size="32"/>
|
||||
<determinant id="downdet" group="d" sposet="spo_ud" size="32"/>
|
||||
</slaterdeterminant>
|
||||
</determinantset>
|
||||
</wavefunction>
|
||||
<hamiltonian name="h0" type="generic" target="e">
|
||||
<pairpot type="coulomb" name="ElecElec" source="e" target="e"/>
|
||||
<pairpot type="coulomb" name="IonIon" source="ion0" target="ion0"/>
|
||||
<pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml">
|
||||
<pseudo elementType="C" href="C.BFD.xml"/>
|
||||
</pairpot>
|
||||
<pairpot type="MPC" name="MPC" source="e" target="e" ecut="60.0" physical="no"/>
|
||||
<estimator name="KEcorr" type="chiesa" source="e" psi="psi0"/>
|
||||
</hamiltonian>
|
||||
</qmcsystem>
|
||||
<qmc method="vmc" move="pbyp">
|
||||
<parameter name="walkers" > 1 </parameter>
|
||||
<parameter name="warmupSteps" > 20 </parameter>
|
||||
<parameter name="blocks" > 200 </parameter>
|
||||
<parameter name="steps" > 10 </parameter>
|
||||
<parameter name="subSteps" > 2 </parameter>
|
||||
<parameter name="timestep" > 0.4 </parameter>
|
||||
</qmc>
|
||||
</simulation>
|
|
@ -110,6 +110,8 @@ public:
|
|||
ParticlePos_t R;
|
||||
///SoA copy of R
|
||||
VectorSoaContainer<RealType, DIM> RSoA;
|
||||
///internal spin variables for dynamical spin calculations
|
||||
ParticleScalar_t spins;
|
||||
///gradients of the particles
|
||||
ParticleGradient_t G;
|
||||
///laplacians of the particles
|
||||
|
@ -516,6 +518,7 @@ public:
|
|||
TotalNum = numPtcl;
|
||||
|
||||
R.resize(numPtcl);
|
||||
spins.resize(numPtcl);
|
||||
ID.resize(numPtcl);
|
||||
PCID.resize(numPtcl);
|
||||
GroupID.resize(numPtcl);
|
||||
|
@ -535,6 +538,7 @@ public:
|
|||
TotalNum = 0;
|
||||
|
||||
R.clear();
|
||||
spins.clear();
|
||||
ID.clear();
|
||||
PCID.clear();
|
||||
GroupID.clear();
|
||||
|
@ -582,12 +586,15 @@ public:
|
|||
{
|
||||
R.setTypeName(ParticleTags::postype_tag);
|
||||
R.setObjName(ParticleTags::position_tag);
|
||||
spins.setTypeName(ParticleTags::scalartype_tag);
|
||||
spins.setObjName(ParticleTags::spins_tag);
|
||||
ID.setTypeName(ParticleTags::indextype_tag);
|
||||
ID.setObjName(ParticleTags::id_tag);
|
||||
GroupID.setTypeName(ParticleTags::indextype_tag);
|
||||
GroupID.setObjName(ParticleTags::ionid_tag);
|
||||
//add basic attributes
|
||||
AttribList.add(R);
|
||||
AttribList.add(spins);
|
||||
AttribList.add(ID);
|
||||
AttribList.add(GroupID);
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ struct Walker
|
|||
#endif
|
||||
/** array of particles */
|
||||
typedef typename p_traits::ParticlePos_t ParticlePos_t;
|
||||
/** array of scalars */
|
||||
typedef typename p_traits::ParticleScalar_t ParticleScalar_t;
|
||||
/** array of gradients */
|
||||
typedef typename p_traits::ParticleGradient_t ParticleGradient_t;
|
||||
/** array of laplacians */
|
||||
|
@ -126,6 +128,9 @@ struct Walker
|
|||
/** The configuration vector (3N-dimensional vector to store
|
||||
the positions of all the particles for a single walker)*/
|
||||
ParticlePos_t R;
|
||||
|
||||
//Dynamical spin variable.
|
||||
ParticleScalar_t spins;
|
||||
#if !defined(SOA_MEMORY_OPTIMIZED)
|
||||
/** \f$ \nabla_i d\log \Psi for the i-th particle */
|
||||
ParticleGradient_t G;
|
||||
|
@ -263,6 +268,7 @@ struct Walker
|
|||
inline void resize(int nptcl)
|
||||
{
|
||||
R.resize(nptcl);
|
||||
spins.resize(nptcl);
|
||||
G.resize(nptcl);
|
||||
L.resize(nptcl);
|
||||
#ifdef QMC_CUDA
|
||||
|
@ -287,6 +293,7 @@ struct Walker
|
|||
if (R.size() != a.R.size())
|
||||
resize(a.R.size());
|
||||
R = a.R;
|
||||
spins = a.spins;
|
||||
#if !defined(SOA_MEMORY_OPTIMIZED)
|
||||
G = a.G;
|
||||
L = a.L;
|
||||
|
|
|
@ -92,4 +92,66 @@ TEST_CASE("read_particleset_xml", "[particle_io][xml]")
|
|||
REQUIRE(electrons.R[1][2] == Approx(-0.0128914));
|
||||
REQUIRE(electrons.getName() == "e");
|
||||
}
|
||||
TEST_CASE("read_dynamic_spin_eset_xml", "[particle_io][xml]")
|
||||
{
|
||||
OHMMS::Controller->initialize(0, NULL);
|
||||
|
||||
const char* particles = "<tmp> \
|
||||
<particleset name=\"e\"> \
|
||||
<group name=\"e\" size=\"3\"> \
|
||||
<parameter name=\"charge\">-1</parameter> \
|
||||
<attrib name=\"position\" datatype=\"posArray\"> \
|
||||
-0.28 0.0225 -2.709 \
|
||||
-1.28 1.0225 -1.709 \
|
||||
-2.28 2.0225 -0.709 \
|
||||
</attrib> \
|
||||
<attrib name=\"spins\" datatype=\"scalarArray\"> \
|
||||
1.0 \
|
||||
0.2 \
|
||||
3.0 \
|
||||
</attrib> \
|
||||
</group> \
|
||||
</particleset> \
|
||||
</tmp> \
|
||||
";
|
||||
Libxml2Document doc;
|
||||
bool okay = doc.parseFromString(particles);
|
||||
REQUIRE(okay);
|
||||
|
||||
xmlNodePtr root = doc.getRoot();
|
||||
|
||||
xmlNodePtr part1 = xmlFirstElementChild(root);
|
||||
|
||||
Tensor<int, 3> tmat; // assuming OHMMSDIM==3
|
||||
tmat(0, 0) = 1;
|
||||
tmat(1, 1) = 1;
|
||||
tmat(2, 2) = 1;
|
||||
|
||||
ParticleSet electrons;
|
||||
|
||||
XMLParticleParser parse_electrons(electrons, tmat);
|
||||
parse_electrons.put(part1);
|
||||
|
||||
REQUIRE(electrons.groups() == 1);
|
||||
|
||||
REQUIRE(electrons.R.size() == 3);
|
||||
|
||||
REQUIRE(electrons.R[0][0] == Approx(-0.28));
|
||||
REQUIRE(electrons.R[0][1] == Approx(0.0225));
|
||||
REQUIRE(electrons.R[0][2] == Approx(-2.709));
|
||||
|
||||
REQUIRE(electrons.R[1][0] == Approx(-1.28));
|
||||
REQUIRE(electrons.R[1][1] == Approx(1.0225));
|
||||
REQUIRE(electrons.R[1][2] == Approx(-1.709));
|
||||
|
||||
REQUIRE(electrons.R[2][0] == Approx(-2.28));
|
||||
REQUIRE(electrons.R[2][1] == Approx(2.0225));
|
||||
REQUIRE(electrons.R[2][2] == Approx(-0.709));
|
||||
|
||||
REQUIRE(electrons.spins[0] == Approx(1.0));
|
||||
REQUIRE(electrons.spins[1] == Approx(0.2));
|
||||
REQUIRE(electrons.spins[2] == Approx(3.0));
|
||||
|
||||
REQUIRE(electrons.getName() == "e");
|
||||
}
|
||||
} // namespace qmcplusplus
|
||||
|
|
|
@ -45,6 +45,7 @@ std::string ParticleTags::tensortype_tag = "tensorArray";
|
|||
std::string ParticleTags::xmoltype_tag = "xmolArray";
|
||||
|
||||
std::string ParticleTags::position_tag = "position";
|
||||
std::string ParticleTags::spins_tag = "spins";
|
||||
std::string ParticleTags::id_tag = "id";
|
||||
std::string ParticleTags::ionid_tag = "ionid";
|
||||
std::string ParticleTags::trajectory_tag = "trajectory";
|
||||
|
|
|
@ -83,6 +83,9 @@ struct ParticleTags
|
|||
*/
|
||||
///the name for position attribute
|
||||
static std::string position_tag;
|
||||
|
||||
///the name for spins attribute
|
||||
static std::string spins_tag;
|
||||
|
||||
///the name for id attribute
|
||||
static std::string id_tag;
|
||||
|
|
|
@ -76,10 +76,13 @@ TEST_CASE("QMCDriverFactory create VMC_CUDA Driver", "[qmcapp]")
|
|||
std::string target("e");
|
||||
MCWalkerConfiguration* qmc_system = particle_pool.getWalkerSet(target);
|
||||
|
||||
MCPopulation population(comm->size(), particle_pool.getParticleSet("e"), wavefunction_pool.getPrimary(),
|
||||
hamiltonian_pool.getPrimary());
|
||||
|
||||
std::unique_ptr<QMCDriverInterface> last_driver;
|
||||
std::unique_ptr<QMCDriverInterface> qmc_driver;
|
||||
qmc_driver = driver_factory.newQMCDriver(std::move(last_driver), 0, node, das, *qmc_system, particle_pool,
|
||||
wavefunction_pool, hamiltonian_pool, comm);
|
||||
wavefunction_pool, hamiltonian_pool, population, comm);
|
||||
REQUIRE(qmc_driver != nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,12 +106,11 @@ LatticeDeviationEstimator::Return_t LatticeDeviationEstimator::evaluate(Particle
|
|||
const auto& d_table = P.getDistTable(myTableID_);
|
||||
|
||||
// temp variables
|
||||
RealType r2;
|
||||
RealType r, r2;
|
||||
PosType dr;
|
||||
|
||||
int nsite(0); // site index
|
||||
int cur_jat(-1); // target particle index
|
||||
#ifndef ENABLE_SOA
|
||||
for (int iat = 0; iat < spset.getTotalNum(); iat++)
|
||||
{ // for each desired source particle
|
||||
if (sspecies.speciesName[spset.GroupID[iat]] == sgroup)
|
||||
|
@ -121,8 +120,14 @@ LatticeDeviationEstimator::Return_t LatticeDeviationEstimator::evaluate(Particle
|
|||
if (tspecies.speciesName[tpset.GroupID[jat]] == tgroup)
|
||||
{
|
||||
// distance between particle iat in source pset, and jat in target pset
|
||||
#ifdef ENABLE_SOA
|
||||
r = d_table.Distances[jat][iat];
|
||||
#else
|
||||
int nn = d_table.loc(iat, jat); // location where distance is stored
|
||||
r2 = std::pow(d_table.r(nn), 2);
|
||||
r = d_table.r(nn);
|
||||
#endif
|
||||
|
||||
r2 = r*r;
|
||||
Value += r2;
|
||||
|
||||
if (hdf5_out & !per_xyz)
|
||||
|
@ -132,7 +137,11 @@ LatticeDeviationEstimator::Return_t LatticeDeviationEstimator::evaluate(Particle
|
|||
|
||||
if (per_xyz)
|
||||
{
|
||||
#ifdef ENABLE_SOA
|
||||
dr = d_table.Displacements[jat][iat];
|
||||
#else
|
||||
dr = d_table.dr(nn);
|
||||
#endif
|
||||
for (int idir = 0; idir < OHMMS_DIM; idir++)
|
||||
{
|
||||
RealType dir2 = dr[idir] * dr[idir];
|
||||
|
@ -151,7 +160,6 @@ LatticeDeviationEstimator::Return_t LatticeDeviationEstimator::evaluate(Particle
|
|||
nsite += 1; // count the number of sites, for checking only
|
||||
} // found desired species (source particle)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (nsite != num_sites)
|
||||
{
|
||||
|
|
|
@ -54,8 +54,8 @@ SET(JASTROW_SRCS
|
|||
Jastrow/RadialJastrowBuilder.cpp
|
||||
Jastrow/CountingJastrowBuilder.cpp
|
||||
Jastrow/RPAJastrow.cpp
|
||||
IonOrbital.cpp
|
||||
IonOrbitalBuilder.cpp
|
||||
LatticeGaussianProduct.cpp
|
||||
LatticeGaussianProductBuilder.cpp
|
||||
OptimizableSPOBuilder.cpp
|
||||
Fermion/SPOSetProxy.cpp
|
||||
Fermion/SPOSetProxyForMSD.cpp
|
||||
|
|
|
@ -13,20 +13,24 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "QMCWaveFunctions/IonOrbital.h"
|
||||
#include "QMCWaveFunctions/LatticeGaussianProduct.h"
|
||||
|
||||
namespace qmcplusplus
|
||||
{
|
||||
typedef IonOrbital::ValueType ValueType;
|
||||
typedef IonOrbital::GradType GradType;
|
||||
typedef LatticeGaussianProduct::ValueType ValueType;
|
||||
typedef LatticeGaussianProduct::GradType GradType;
|
||||
|
||||
IonOrbital::IonOrbital(ParticleSet& centers, ParticleSet& ptcls) : CenterRef(centers)
|
||||
LatticeGaussianProduct::LatticeGaussianProduct(ParticleSet& centers, ParticleSet& ptcls) : CenterRef(centers)
|
||||
{
|
||||
Optimizable = false;
|
||||
ClassName = "IonOrbital";
|
||||
ClassName = "LatticeGaussianProduct";
|
||||
NumTargetPtcls = ptcls.getTotalNum();
|
||||
NumCenters = centers.getTotalNum();
|
||||
#ifdef ENABLE_SOA
|
||||
myTableID = ptcls.addTable(CenterRef, DT_SOA);
|
||||
#else
|
||||
myTableID = ptcls.addTable(CenterRef, DT_AOS);
|
||||
#endif
|
||||
U.resize(NumTargetPtcls);
|
||||
dU.resize(NumTargetPtcls);
|
||||
d2U.resize(NumTargetPtcls);
|
||||
|
@ -34,14 +38,14 @@ IonOrbital::IonOrbital(ParticleSet& centers, ParticleSet& ptcls) : CenterRef(cen
|
|||
LastAddressOfdU = FirstAddressOfdU + dU.size() * OHMMS_DIM;
|
||||
}
|
||||
|
||||
IonOrbital::~IonOrbital() {}
|
||||
LatticeGaussianProduct::~LatticeGaussianProduct() {}
|
||||
|
||||
//evaluate the distance table with P
|
||||
void IonOrbital::resetTargetParticleSet(ParticleSet& P) {}
|
||||
void IonOrbital::checkInVariables(opt_variables_type& active) {}
|
||||
void IonOrbital::checkOutVariables(const opt_variables_type& active) {}
|
||||
void IonOrbital::resetParameters(const opt_variables_type& active) {}
|
||||
void IonOrbital::reportStatus(std::ostream& os) {}
|
||||
void LatticeGaussianProduct::resetTargetParticleSet(ParticleSet& P) {}
|
||||
void LatticeGaussianProduct::checkInVariables(opt_variables_type& active) {}
|
||||
void LatticeGaussianProduct::checkOutVariables(const opt_variables_type& active) {}
|
||||
void LatticeGaussianProduct::resetParameters(const opt_variables_type& active) {}
|
||||
void LatticeGaussianProduct::reportStatus(std::ostream& os) {}
|
||||
|
||||
/**
|
||||
*@param P input configuration containing N particles
|
||||
|
@ -57,13 +61,15 @@ void IonOrbital::reportStatus(std::ostream& os) {}
|
|||
*such that \f[ G[i]+={\bf \nabla}_i J({\bf R}) \f]
|
||||
*and \f[ L[i]+=\nabla^2_i J({\bf R}). \f]
|
||||
*/
|
||||
IonOrbital::RealType IonOrbital::evaluateLog(ParticleSet& P,
|
||||
LatticeGaussianProduct::RealType LatticeGaussianProduct::evaluateLog(ParticleSet& P,
|
||||
ParticleSet::ParticleGradient_t& G,
|
||||
ParticleSet::ParticleLaplacian_t& L)
|
||||
{
|
||||
const auto& d_table = P.getDistTable(myTableID);
|
||||
int icent = 0;
|
||||
LogValue = 0.0;
|
||||
RealType dist = 0.0;
|
||||
PosType disp = 0.0;
|
||||
for (int iat = 0; iat < NumTargetPtcls; iat++)
|
||||
{
|
||||
U[iat] = 0.0;
|
||||
|
@ -72,15 +78,18 @@ IonOrbital::RealType IonOrbital::evaluateLog(ParticleSet& P,
|
|||
RealType a = ParticleAlpha[iat];
|
||||
if (a > 0.0)
|
||||
{
|
||||
#ifndef ENABLE_SOA
|
||||
#ifdef ENABLE_SOA
|
||||
dist = d_table.Distances[iat][icent];
|
||||
disp = -1.0*d_table.Displacements[iat][icent];
|
||||
#else
|
||||
int index = d_table.M[icent] + iat;
|
||||
RealType dist = d_table.r(index);
|
||||
PosType disp = d_table.dr(index);
|
||||
dist = d_table.r(index);
|
||||
disp = d_table.dr(index);
|
||||
#endif
|
||||
LogValue -= a * dist * dist;
|
||||
U[iat] += a * dist * dist;
|
||||
G[iat] -= 2.0 * a * disp;
|
||||
L[iat] -= 6.0 * a;
|
||||
#endif
|
||||
icent++;
|
||||
}
|
||||
}
|
||||
|
@ -91,71 +100,83 @@ IonOrbital::RealType IonOrbital::evaluateLog(ParticleSet& P,
|
|||
* @param P active particle set
|
||||
* @param iat particle that has been moved.
|
||||
*/
|
||||
ValueType IonOrbital::ratio(ParticleSet& P, int iat)
|
||||
ValueType LatticeGaussianProduct::ratio(ParticleSet& P, int iat)
|
||||
{
|
||||
const auto& d_table = P.getDistTable(myTableID);
|
||||
int icent = ParticleCenter[iat];
|
||||
if (icent == -1)
|
||||
return 1.0;
|
||||
#ifndef ENABLE_SOA
|
||||
int index = d_table.M[icent] + iat;
|
||||
#ifdef ENABLE_SOA
|
||||
RealType newdist = d_table.Temp_r[icent];
|
||||
#else
|
||||
RealType newdist = d_table.Temp[icent].r1;
|
||||
curVal = ParticleAlpha[iat] * (newdist * newdist);
|
||||
#endif
|
||||
curVal = ParticleAlpha[iat] * (newdist * newdist);
|
||||
return std::exp(U[iat] - curVal);
|
||||
}
|
||||
|
||||
|
||||
GradType IonOrbital::evalGrad(ParticleSet& P, int iat)
|
||||
GradType LatticeGaussianProduct::evalGrad(ParticleSet& P, int iat)
|
||||
{
|
||||
const auto& d_table = P.getDistTable(myTableID);
|
||||
int icent = ParticleCenter[iat];
|
||||
if (icent == -1)
|
||||
return GradType();
|
||||
RealType a = ParticleAlpha[iat];
|
||||
#ifdef ENABLE_SOA
|
||||
PosType newdisp = -1.0*d_table.Temp_dr[icent];
|
||||
#else
|
||||
PosType newdisp = d_table.Temp[icent].dr1;
|
||||
#endif
|
||||
curGrad = -2.0 * a * newdisp;
|
||||
return curGrad;
|
||||
}
|
||||
|
||||
|
||||
// GradType
|
||||
// IonOrbital::evalGradSource
|
||||
// LatticeGaussianProduct::evalGradSource
|
||||
// (ParticleSet& P, ParticleSet& source, int isrc,
|
||||
// TinyVector<ParticleSet::ParticleGradient_t, OHMMS_DIM> &grad_grad,
|
||||
// TinyVector<ParticleSet::ParticleLaplacian_t,OHMMS_DIM> &lapl_grad)
|
||||
// {
|
||||
// }
|
||||
|
||||
ValueType IonOrbital::ratioGrad(ParticleSet& P, int iat, GradType& grad_iat)
|
||||
ValueType LatticeGaussianProduct::ratioGrad(ParticleSet& P, int iat, GradType& grad_iat)
|
||||
{
|
||||
const auto& d_table = P.getDistTable(myTableID);
|
||||
int icent = ParticleCenter[iat];
|
||||
if (icent == -1)
|
||||
return 1.0;
|
||||
RealType a = ParticleAlpha[iat];
|
||||
#ifdef ENABLE_SOA
|
||||
RealType newdist = d_table.Temp_r[icent];
|
||||
PosType newdisp = -1.0*d_table.Temp_dr[icent];
|
||||
#else
|
||||
RealType newdist = d_table.Temp[icent].r1;
|
||||
PosType newdisp = d_table.Temp[icent].dr1;
|
||||
#endif
|
||||
curVal = a * newdist * newdist;
|
||||
curGrad = -2.0 * a * newdisp;
|
||||
grad_iat += curGrad;
|
||||
return std::exp(U[iat] - curVal);
|
||||
}
|
||||
|
||||
void IonOrbital::restore(int iat) {}
|
||||
void LatticeGaussianProduct::restore(int iat) {}
|
||||
|
||||
void IonOrbital::acceptMove(ParticleSet& P, int iat)
|
||||
void LatticeGaussianProduct::acceptMove(ParticleSet& P, int iat)
|
||||
{
|
||||
U[iat] = curVal;
|
||||
dU[iat] = curGrad;
|
||||
d2U[iat] = curLap;
|
||||
}
|
||||
|
||||
void IonOrbital::evaluateLogAndStore(ParticleSet& P,
|
||||
void LatticeGaussianProduct::evaluateLogAndStore(ParticleSet& P,
|
||||
ParticleSet::ParticleGradient_t& dG,
|
||||
ParticleSet::ParticleLaplacian_t& dL)
|
||||
{
|
||||
const auto& d_table = P.getDistTable(myTableID);
|
||||
RealType dist = 0.0;
|
||||
PosType disp = 0.0;
|
||||
int icent = 0;
|
||||
LogValue = 0.0;
|
||||
U = 0.0;
|
||||
|
@ -166,24 +187,27 @@ void IonOrbital::evaluateLogAndStore(ParticleSet& P,
|
|||
RealType a = ParticleAlpha[iat];
|
||||
if (a > 0.0)
|
||||
{
|
||||
#ifndef ENABLE_SOA
|
||||
#ifdef ENABLE_SOA
|
||||
dist = d_table.Distances[iat][icent];
|
||||
disp = -1.0*d_table.Displacements[iat][icent];
|
||||
#else
|
||||
int index = d_table.M[icent] + iat;
|
||||
RealType dist = d_table.r(index);
|
||||
PosType disp = d_table.dr(index);
|
||||
dist = d_table.r(index);
|
||||
disp = d_table.dr(index);
|
||||
#endif
|
||||
LogValue -= a * dist * dist;
|
||||
U[iat] += a * dist * dist;
|
||||
dU[iat] -= 2.0 * a * disp;
|
||||
d2U[iat] -= 6.0 * a;
|
||||
dG[iat] -= 2.0 * a * disp;
|
||||
dL[iat] -= 6.0 * a;
|
||||
#endif
|
||||
icent++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** equivalent to evalaute with additional data management */
|
||||
void IonOrbital::registerData(ParticleSet& P, WFBufferType& buf)
|
||||
void LatticeGaussianProduct::registerData(ParticleSet& P, WFBufferType& buf)
|
||||
{
|
||||
evaluateLogAndStore(P, P.G, P.L);
|
||||
// Add U, d2U and dU. Keep the order!!!
|
||||
|
@ -192,7 +216,7 @@ void IonOrbital::registerData(ParticleSet& P, WFBufferType& buf)
|
|||
buf.add(FirstAddressOfdU, LastAddressOfdU);
|
||||
}
|
||||
|
||||
IonOrbital::RealType IonOrbital::updateBuffer(ParticleSet& P, WFBufferType& buf, bool fromscratch = false)
|
||||
LatticeGaussianProduct::RealType LatticeGaussianProduct::updateBuffer(ParticleSet& P, WFBufferType& buf, bool fromscratch = false)
|
||||
{
|
||||
evaluateLogAndStore(P, P.G, P.L);
|
||||
buf.put(U.first_address(), U.last_address());
|
||||
|
@ -207,16 +231,16 @@ IonOrbital::RealType IonOrbital::updateBuffer(ParticleSet& P, WFBufferType& buf,
|
|||
*
|
||||
*copyFromBuffer uses the data stored by registerData
|
||||
*/
|
||||
void IonOrbital::copyFromBuffer(ParticleSet& P, WFBufferType& buf)
|
||||
void LatticeGaussianProduct::copyFromBuffer(ParticleSet& P, WFBufferType& buf)
|
||||
{
|
||||
buf.get(U.first_address(), U.last_address());
|
||||
buf.get(d2U.first_address(), d2U.last_address());
|
||||
buf.get(FirstAddressOfdU, LastAddressOfdU);
|
||||
}
|
||||
|
||||
WaveFunctionComponentPtr IonOrbital::makeClone(ParticleSet& tqp) const
|
||||
WaveFunctionComponentPtr LatticeGaussianProduct::makeClone(ParticleSet& tqp) const
|
||||
{
|
||||
IonOrbital* j1copy = new IonOrbital(CenterRef, tqp);
|
||||
LatticeGaussianProduct* j1copy = new LatticeGaussianProduct(CenterRef, tqp);
|
||||
j1copy->ParticleAlpha = ParticleAlpha;
|
||||
j1copy->ParticleCenter = ParticleCenter;
|
||||
return j1copy;
|
|
@ -12,11 +12,11 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/** @file IonOrbital.h
|
||||
/** @file LatticeGaussianProduct.h
|
||||
* @brief Simple gaussian functions used for orbitals for ions
|
||||
*/
|
||||
#ifndef QMCPLUSPLUS_ION_ORBITAL
|
||||
#define QMCPLUSPLUS_ION_ORBITAL
|
||||
#ifndef QMCPLUSPLUS_LATTICE_GAUSSIAN_PRODUCT
|
||||
#define QMCPLUSPLUS_LATTICE_GAUSSIAN_PRODUCT
|
||||
#include "QMCWaveFunctions/WaveFunctionComponent.h"
|
||||
#include "Particle/DistanceTableData.h"
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace qmcplusplus
|
|||
{
|
||||
/** A composite Orbital
|
||||
*/
|
||||
struct IonOrbital : public WaveFunctionComponent
|
||||
struct LatticeGaussianProduct : public WaveFunctionComponent
|
||||
{
|
||||
private:
|
||||
ParticleAttrib<RealType> U, d2U;
|
||||
|
@ -42,9 +42,9 @@ public:
|
|||
std::vector<RealType> ParticleAlpha;
|
||||
std::vector<int> ParticleCenter;
|
||||
|
||||
IonOrbital(ParticleSet& centers, ParticleSet& ptcls);
|
||||
LatticeGaussianProduct(ParticleSet& centers, ParticleSet& ptcls);
|
||||
|
||||
~IonOrbital();
|
||||
~LatticeGaussianProduct();
|
||||
|
||||
/** check out optimizable variables
|
||||
*/
|
|
@ -12,17 +12,17 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "QMCWaveFunctions/IonOrbitalBuilder.h"
|
||||
#include "QMCWaveFunctions/IonOrbital.h"
|
||||
#include "QMCWaveFunctions/LatticeGaussianProductBuilder.h"
|
||||
#include "QMCWaveFunctions/LatticeGaussianProduct.h"
|
||||
#include "OhmmsData/AttributeSet.h"
|
||||
|
||||
namespace qmcplusplus
|
||||
{
|
||||
IonOrbitalBuilder::IonOrbitalBuilder(ParticleSet& p, TrialWaveFunction& psi, PtclPoolType& psets)
|
||||
LatticeGaussianProductBuilder::LatticeGaussianProductBuilder(ParticleSet& p, TrialWaveFunction& psi, PtclPoolType& psets)
|
||||
: WaveFunctionComponentBuilder(p, psi), ptclPool(psets)
|
||||
{}
|
||||
|
||||
bool IonOrbitalBuilder::put(xmlNodePtr cur)
|
||||
bool LatticeGaussianProductBuilder::put(xmlNodePtr cur)
|
||||
{
|
||||
ParticleSet& p = targetPtcl;
|
||||
// initialize widths to zero; if no user input, then abort
|
||||
|
@ -34,7 +34,7 @@ bool IonOrbitalBuilder::put(xmlNodePtr cur)
|
|||
oAttrib.put(cur);
|
||||
if (nameOpt == "")
|
||||
{
|
||||
app_warning() << " IonOrbitalBuilder::put does not have name " << std::endl;
|
||||
app_warning() << " LatticeGaussianProductBuilder::put does not have name " << std::endl;
|
||||
}
|
||||
std::map<std::string, ParticleSet*>::iterator pa_it(ptclPool.find(sourceOpt));
|
||||
if (pa_it == ptclPool.end())
|
||||
|
@ -42,7 +42,7 @@ bool IonOrbitalBuilder::put(xmlNodePtr cur)
|
|||
app_error() << "Could not file source ParticleSet " << sourceOpt << " for ion wave function.\n";
|
||||
}
|
||||
ParticleSet* sourcePtcl = (*pa_it).second;
|
||||
IonOrbital* orb = new IonOrbital(*sourcePtcl, targetPtcl);
|
||||
LatticeGaussianProduct* orb = new LatticeGaussianProduct(*sourcePtcl, targetPtcl);
|
||||
orb->ParticleAlpha.resize(targetPtcl.getTotalNum());
|
||||
orb->ParticleCenter.resize(targetPtcl.getTotalNum());
|
||||
int num_nonzero = 0;
|
|
@ -12,20 +12,20 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef QMCPLUSPLUS_ION_ORBITAL_BUILDER_H
|
||||
#define QMCPLUSPLUS_ION_ORBITAL_BUILDER_H
|
||||
#ifndef QMCPLUSPLUS_LATTICE_GAUSSIAN_BUILDER_H
|
||||
#define QMCPLUSPLUS_LATTICE_GAUSSIAN_BUILDER_H
|
||||
#include "QMCWaveFunctions/WaveFunctionComponentBuilder.h"
|
||||
|
||||
namespace qmcplusplus
|
||||
{
|
||||
class OrbitalConstraintsBase;
|
||||
|
||||
/** IonOrbital IonOrbital Builder with constraints
|
||||
/** LatticeGaussianProduct LatticeGaussianProduct Builder with constraints
|
||||
*/
|
||||
class IonOrbitalBuilder : public WaveFunctionComponentBuilder
|
||||
class LatticeGaussianProductBuilder : public WaveFunctionComponentBuilder
|
||||
{
|
||||
public:
|
||||
IonOrbitalBuilder(ParticleSet& p, TrialWaveFunction& psi, PtclPoolType& psets);
|
||||
LatticeGaussianProductBuilder(ParticleSet& p, TrialWaveFunction& psi, PtclPoolType& psets);
|
||||
|
||||
bool put(xmlNodePtr cur);
|
||||
|
||||
|
@ -33,7 +33,7 @@ private:
|
|||
///particleset pool to get ParticleSet other than the target
|
||||
PtclPoolType& ptclPool;
|
||||
///index for the jastrow type: 1, 2, 3
|
||||
int IonOrbitalType;
|
||||
int LatticeGaussianProductType;
|
||||
///name
|
||||
std::string nameOpt;
|
||||
///type
|
|
@ -22,7 +22,7 @@
|
|||
#include "QMCWaveFunctions/WaveFunctionFactory.h"
|
||||
#include "QMCWaveFunctions/Jastrow/JastrowBuilder.h"
|
||||
#include "QMCWaveFunctions/Fermion/SlaterDetBuilder.h"
|
||||
#include "QMCWaveFunctions/IonOrbitalBuilder.h"
|
||||
#include "QMCWaveFunctions/LatticeGaussianProductBuilder.h"
|
||||
#include "QMCWaveFunctions/ExampleHeBuilder.h"
|
||||
|
||||
#if !defined(QMC_COMPLEX)
|
||||
|
@ -137,7 +137,7 @@ bool WaveFunctionFactory::build(xmlNodePtr cur, bool buildtree)
|
|||
}
|
||||
else if (cname == WaveFunctionComponentBuilder::ionorb_tag)
|
||||
{
|
||||
IonOrbitalBuilder* builder = new IonOrbitalBuilder(*targetPtcl, *targetPsi, ptclPool);
|
||||
LatticeGaussianProductBuilder* builder = new LatticeGaussianProductBuilder(*targetPtcl, *targetPsi, ptclPool);
|
||||
success = builder->put(cur);
|
||||
addNode(builder, cur);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,18 @@ if (add_test)
|
|||
)
|
||||
endif()
|
||||
|
||||
set(latdev_free_python_reqs numpy;h5py)
|
||||
CHECK_PYTHON_REQS(latdev_python_reqs estimator-latdev-free add_test)
|
||||
|
||||
if (add_test)
|
||||
SIMPLE_RUN_AND_CHECK(estimator-latdev-free
|
||||
"${CMAKE_SOURCE_DIR}/tests/estimator/latdev/free"
|
||||
two.xml
|
||||
1 16
|
||||
flatdev.py
|
||||
)
|
||||
endif()
|
||||
|
||||
set(sofk_python_reqs numpy;pandas;h5py)
|
||||
CHECK_PYTHON_REQS(sofk_python_reqs estimator-sofk add_test)
|
||||
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env python
|
||||
import h5py
|
||||
import numpy as np
|
||||
|
||||
def corr(trace):
|
||||
""" calculate the autocorrelation of a trace of scalar data
|
||||
|
||||
correlation time is defined as the integral of the auto-correlation
|
||||
function from t=0 to when the function first reaches 0.
|
||||
|
||||
Args:
|
||||
trace (list): should be a 1D iterable array of floating point numbers
|
||||
Return:
|
||||
float: correlation_time, the autocorrelation time of this trace of scalars
|
||||
"""
|
||||
mu = np.mean(trace)
|
||||
stddev = np.std(trace, ddof=1)
|
||||
if np.isclose(stddev, 0): # easy case
|
||||
return np.inf # infinite correlation for constant trace
|
||||
correlation_time = 0.
|
||||
for k in range(1, len(trace)):
|
||||
# calculate auto_correlation
|
||||
auto_correlation = 0.0
|
||||
num = len(trace)-k
|
||||
auto_correlation = np.dot(trace[:num]-mu, trace[k:]-mu)
|
||||
auto_correlation *= 1.0/(num*stddev**2)
|
||||
if auto_correlation > 0:
|
||||
correlation_time += auto_correlation
|
||||
else:
|
||||
break
|
||||
correlation_time = 1.0 + 2.0*correlation_time
|
||||
return correlation_time
|
||||
|
||||
def get_latdev_me(fh5, nequil):
|
||||
# get raw data
|
||||
fp = h5py.File(fh5, 'r')
|
||||
data = fp['latdev/value'][()]
|
||||
fp.close()
|
||||
|
||||
nb, ncol = data.shape
|
||||
npt = nb-nequil
|
||||
# calculate mean
|
||||
ym = data[nequil:, :].mean(axis=0)
|
||||
# calculate standard error
|
||||
yc = np.array([corr(data[nequil:, icol]) for icol in range(ncol)])
|
||||
neff = npt/yc
|
||||
ye = data[nequil:, :].std(ddof=1, axis=0)/neff**0.5
|
||||
return ym, ye
|
||||
|
||||
def check_latdev(w1, w2, ym, ye, ndim=3):
|
||||
expect = np.array([w1**2/2.]*ndim + [w2**2/2.]*ndim)
|
||||
zscore = abs(ym-expect)/ye
|
||||
fail = np.any(zscore > 3.)
|
||||
success = ~fail
|
||||
return success, zscore
|
||||
|
||||
if __name__ == '__main__':
|
||||
# calculate <x^2> <y^2> <z^2>
|
||||
nequil = 6
|
||||
fh5 = 'mt.s000.stat.h5'
|
||||
ym, ye = get_latdev_me(fh5, nequil)
|
||||
|
||||
# check answers
|
||||
w1 = 0.3
|
||||
w2 = 0.5
|
||||
success, zscore = check_latdev(w1, w2, ym, ye)
|
||||
if not success:
|
||||
print(zscore)
|
||||
|
||||
if success:
|
||||
exit(0)
|
||||
else:
|
||||
exit(1)
|
||||
# end __main__
|
|
@ -0,0 +1,61 @@
|
|||
<simulation>
|
||||
<project id="mt" series="0"/>
|
||||
|
||||
<qmcsystem>
|
||||
<simulationcell>
|
||||
<parameter name="lattice" units="bohr">
|
||||
10 0 0
|
||||
0 10 0
|
||||
0 0 10
|
||||
</parameter>
|
||||
<parameter name="bconds">
|
||||
p p p
|
||||
</parameter>
|
||||
</simulationcell>
|
||||
|
||||
<particleset name="e">
|
||||
<group name="m5" size="2">
|
||||
<parameter name="mass"> 5.0 </parameter>
|
||||
<attrib name="position" datatype="posArray" condition="0">
|
||||
1.0001 1.0001 1.0002
|
||||
6.0001 6.0001 6.0002
|
||||
</attrib>
|
||||
</group>
|
||||
</particleset>
|
||||
<particleset name="trap_center">
|
||||
<group name="center" size="2">
|
||||
<attrib name="position" datatype="posArray" condition="0">
|
||||
1 1 1
|
||||
6 6 6
|
||||
</attrib>
|
||||
</group>
|
||||
</particleset>
|
||||
<particleset name="measure_center">
|
||||
<group name="origin" size="2">
|
||||
<attrib name="position" datatype="posArray" condition="0">
|
||||
1 1 1
|
||||
6 6 6
|
||||
</attrib>
|
||||
</group>
|
||||
</particleset>
|
||||
|
||||
<wavefunction target="e" id="psi0">
|
||||
<ionwf name="ionwf" source="trap_center" width="0.3 0.5"/>
|
||||
</wavefunction>
|
||||
|
||||
<hamiltonian name="h0" type="generic" target="e">
|
||||
<estimator name="skinetic" type="specieskinetic"/>
|
||||
<estimator type="latticedeviation" name="latdev" hdf5="yes" per_xyz="yes" target="e" tgroup="m5" source="measure_center" sgroup="origin"/>
|
||||
<!--
|
||||
<estimator name="dens" type="density" delta="0.04 0.04 0.04" x_min="0" x_max="10" y_min="0" ymax="10" z_min="0" z_max="10"/>
|
||||
-->
|
||||
</hamiltonian>
|
||||
</qmcsystem>
|
||||
|
||||
<qmc method="vmc" move="whatever">
|
||||
<parameter name="blocks"> 16 </parameter>
|
||||
<parameter name="steps"> 1024 </parameter>
|
||||
<parameter name="substeps"> 8 </parameter>
|
||||
<parameter name="timestep"> 0.3 </parameter>
|
||||
</qmc>
|
||||
</simulation>
|
|
@ -21,8 +21,8 @@
|
|||
</attrib>
|
||||
</group>
|
||||
</particleset>
|
||||
<particleset name="trap_center" size="1">
|
||||
<group name="center">
|
||||
<particleset name="trap_center">
|
||||
<group name="center" size="1">
|
||||
<attrib name="position" datatype="posArray" condition="0">
|
||||
0 0 0
|
||||
</attrib>
|
||||
|
|
|
@ -19,3 +19,4 @@ SUBDIRS("FeCO6_b3lyp_gms")
|
|||
SUBDIRS("FeCO6_b3lyp_pyscf")
|
||||
SUBDIRS("CHN_ae")
|
||||
SUBDIRS("LiH_ae_MSD")
|
||||
SUBDIRS("He_ae")
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# Deterministic test for QMC optimizer
|
||||
|
||||
IF (NOT MIXED_PRECISION)
|
||||
SIMPLE_RUN_AND_CHECK(
|
||||
deterministic-He_ae-opt
|
||||
"${CMAKE_SOURCE_DIR}/tests/molecules/He_ae"
|
||||
det_He_opt.xml
|
||||
1 1
|
||||
check_opt.py -s 1 -p det_He_opt -r qmc-ref/det_He_opt.s001.opt.xml
|
||||
)
|
||||
|
||||
LIST(APPEND He_VMC_SCALARS "totenergy" "-3.25291030 0.000001")
|
||||
|
||||
QMC_RUN_AND_CHECK(deterministic-He_ae-opt_vmc
|
||||
"${CMAKE_SOURCE_DIR}/tests/molecules/He_ae"
|
||||
det_He_opt
|
||||
det_He_opt.xml
|
||||
1 1
|
||||
TRUE
|
||||
2 He_VMC_SCALARS # VMC
|
||||
)
|
||||
ELSE()
|
||||
MESSAGE_VERBOSE("Skipping optimizer deterministic tests in mixed precision (QMC_MIXED_PRECISION=1)")
|
||||
ENDIF()
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from optparse import OptionParser
|
||||
import xml.etree.ElementTree as ET
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def exit_fail(msg=None):
|
||||
if msg!=None:
|
||||
print(msg)
|
||||
#end if
|
||||
print('Test status: fail')
|
||||
exit(1)
|
||||
#end def exit_fail
|
||||
|
||||
|
||||
def exit_pass(msg=None):
|
||||
if msg!=None:
|
||||
print(msg)
|
||||
#end if
|
||||
print('Test status: pass')
|
||||
exit(0)
|
||||
#end def exit_pass
|
||||
|
||||
|
||||
# Open the XML file and return the jud_b value
|
||||
def get_jud_b(file):
|
||||
tree = ET.parse(file)
|
||||
root = tree.getroot()
|
||||
for elem in root.iterfind('wavefunction/jastrow/correlation/'):
|
||||
return [float(i) for i in elem.text.split()]
|
||||
#end def get_jud_b
|
||||
|
||||
|
||||
passfail = {True:'pass',False:'fail'}
|
||||
def run_opt_test(options):
|
||||
|
||||
|
||||
prefix_file = options.prefix+'.s'+str(options.series).zfill(3)+'.opt.xml'
|
||||
|
||||
# Set default for the reference
|
||||
ref_file = './qmc-ref/{0}'.format(prefix_file) if options.ref is None else options.ref
|
||||
|
||||
if not os.path.exists(prefix_file):
|
||||
exit_fail("Test not found:" + prefix_file)
|
||||
|
||||
if not os.path.exists(ref_file):
|
||||
exit_fail("Reference not found:" + ref_file)
|
||||
|
||||
output = get_jud_b(prefix_file)
|
||||
reference = get_jud_b(ref_file)
|
||||
|
||||
if len(output) != len(reference):
|
||||
exit_fail('Number of coefficient in test({0}) does not match with the reference({1})'.format(len(output),len(reference)))
|
||||
|
||||
success = True
|
||||
tolerance = 1e-06
|
||||
deviation = []
|
||||
|
||||
for i in range(len(output)):
|
||||
deviation.append(abs(float(output[i])-float(reference[i])))
|
||||
quant_success = deviation[i] <= tolerance
|
||||
if quant_success is False:
|
||||
success &= quant_success
|
||||
#end if
|
||||
#end for
|
||||
|
||||
msg='\n Testing Series: {0}\n'.format(options.series)
|
||||
msg+=' reference coefficients : {0}\n'.format(reference)
|
||||
msg+=' computed coefficients : {0}\n'.format(output)
|
||||
msg+=' pass tolerance : {0: 12.6f}\n'.format(tolerance)
|
||||
msg+=' deviation from reference : {0}\n'.format(deviation)
|
||||
msg+=' status of this test : {0}\n'.format(passfail[success])
|
||||
|
||||
return success, msg
|
||||
|
||||
#end def run_opt_test
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
parser = OptionParser(
|
||||
usage='usage: %prog [options]',
|
||||
add_help_option=False,
|
||||
)
|
||||
parser.add_option('-h','--help',dest='help',
|
||||
action='store_true',default=False,
|
||||
help='Print help information and exit (default=%default).'
|
||||
)
|
||||
parser.add_option('-p','--prefix',dest='prefix',
|
||||
default='qmc',
|
||||
help='Prefix for output files (default=%default).'
|
||||
)
|
||||
parser.add_option('-s','--series',dest='series',
|
||||
default='0',
|
||||
help='Output series to analyze (default=%default).'
|
||||
)
|
||||
parser.add_option('-r','--ref',dest='ref',
|
||||
help='Reference to check output files (default=./qmc-ref/$PREFIX).'
|
||||
)
|
||||
|
||||
|
||||
options,files_in = parser.parse_args()
|
||||
|
||||
if options.help:
|
||||
print('\n'+parser.format_help().strip())
|
||||
exit()
|
||||
#end if
|
||||
|
||||
success,msg = run_opt_test(options)
|
||||
|
||||
if success:
|
||||
exit_pass(msg)
|
||||
else:
|
||||
exit_fail(msg)
|
||||
|
||||
#end if
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0"?>
|
||||
<simulation>
|
||||
<project id="det_He_opt" series="0"/>
|
||||
<random seed="509"/>
|
||||
|
||||
<!-- Location of atoms -->
|
||||
|
||||
<particleset name="ion0" size="1">
|
||||
<group name="He">
|
||||
<parameter name="charge">2</parameter>
|
||||
</group>
|
||||
<attrib name="position" datatype="posArray">
|
||||
0.0 0.0 0.0
|
||||
</attrib>
|
||||
</particleset>
|
||||
|
||||
<!-- Randomly create electrons around the atomic position -->
|
||||
|
||||
<particleset name="e" random="yes" randomsrc="ion0">
|
||||
<group name="u" size="1">
|
||||
<parameter name="charge">-1</parameter>
|
||||
</group>
|
||||
<group name="d" size="1">
|
||||
<parameter name="charge">-1</parameter>
|
||||
</group>
|
||||
</particleset>
|
||||
|
||||
<!-- Trial wavefunction - use Slater determinant multiplied by a Jastrow factor -->
|
||||
|
||||
<wavefunction name="psi0" target="e">
|
||||
|
||||
<!-- Electron-electron Jastrow of Pade form -->
|
||||
<!-- For two electron system, only have up-down interaction -->
|
||||
|
||||
<jastrow name="Jee" type="Two-Body" function="pade">
|
||||
<correlation speciesA="u" speciesB="d">
|
||||
<var id="jud_b" name="B">0.821683</var>
|
||||
</correlation>
|
||||
</jastrow>
|
||||
|
||||
<determinantset type="MO" key="STO" transform="no" source="ion0">
|
||||
<!-- Use a single Slater Type Orbital (STO) for the basis. Cusp condition is correct. -->
|
||||
<basisset>
|
||||
<atomicBasisSet type="STO" elementType="He">
|
||||
<basisGroup rid="R0" n="1" l="0" m="0" type="Slater">
|
||||
<radfunc exponent="2.0"/>
|
||||
</basisGroup>
|
||||
</atomicBasisSet>
|
||||
</basisset>
|
||||
<slaterdeterminant>
|
||||
<determinant id="updet" spin="1" size="1"/>
|
||||
<determinant id="downdet" spin="-1" size="1"/>
|
||||
</slaterdeterminant>
|
||||
</determinantset>
|
||||
</wavefunction>
|
||||
|
||||
|
||||
<!-- Hamiltonian - the energy of interactions between particles -->
|
||||
|
||||
<hamiltonian name="h0" type="generic" target="e">
|
||||
<!-- Electon-electron -->
|
||||
<pairpot name="ElecElec" type="coulomb" source="e" target="e"/>
|
||||
<!-- Electon-ion -->
|
||||
<pairpot name="Coulomb" type="coulomb" source="ion0" target="e"/>
|
||||
<!-- Ion-ion (not needed for a single atom) -->
|
||||
<!--<constant name="IonIon" type="coulomb" source="ion0" target="ion0"/>-->
|
||||
</hamiltonian>
|
||||
|
||||
<!-- QMC method(s) to run -->
|
||||
|
||||
<!-- Optimize parameters - in this case only the B value on the Jastrow is adjustable -->
|
||||
|
||||
<loop max="2">
|
||||
<qmc method="linear" move="pbyp" checkpoint="-1" gpu="yes">
|
||||
<parameter name="blocks"> 5 </parameter>
|
||||
<parameter name="warmupsteps"> 1 </parameter>
|
||||
<parameter name="stepsbetweensamples"> 1 </parameter>
|
||||
<parameter name="substeps"> 2 </parameter>
|
||||
<parameter name="timestep"> 1.0 </parameter>
|
||||
<parameter name="walkers"> 1 </parameter>
|
||||
<parameter name="samples"> 5 </parameter>
|
||||
<parameter name="minwalkers"> 1e-3 </parameter>
|
||||
<parameter name="useDrift"> no </parameter>
|
||||
<estimator name="LocalEnergy" hdf5="no"/>
|
||||
<parameter name="MinMethod">OneShiftOnly</parameter>
|
||||
</qmc>
|
||||
</loop>
|
||||
<qmc method="vmc" move="pbyp">
|
||||
<estimator name="LocalEnergy" hdf5="no"/>
|
||||
<parameter name="walkers" > 1 </parameter>
|
||||
<parameter name="blocks" > 3 </parameter>
|
||||
<parameter name="steps" > 3 </parameter>
|
||||
<parameter name="subSteps" > 2 </parameter>
|
||||
<parameter name="timestep" > 0.3 </parameter>
|
||||
<parameter name="warmupSteps" > 3 </parameter>
|
||||
</qmc>
|
||||
|
||||
</simulation>
|
|
@ -0,0 +1,460 @@
|
|||
Input file(s): det_He_opt.xml
|
||||
|
||||
=====================================================
|
||||
QMCPACK 3.6.0
|
||||
|
||||
(c) Copyright 2003- QMCPACK developers
|
||||
|
||||
Please cite:
|
||||
J. Kim et al. J. Phys. Cond. Mat. 30 195901 (2018)
|
||||
https://doi.org/10.1088/1361-648X/aab9c3
|
||||
=====================================================
|
||||
Global options
|
||||
|
||||
MPI Nodes = 1
|
||||
MPI Nodes per group = 1
|
||||
MPI Group ID = 0
|
||||
OMP 1st level threads = 1
|
||||
OMP nested threading disabled or only 1 thread on the 2nd level
|
||||
|
||||
Precision used in this calculation, see definitions in the manual:
|
||||
Base precision = double
|
||||
Full precision = double
|
||||
|
||||
Input XML = det_He_opt.xml
|
||||
|
||||
Project = det_He_opt
|
||||
date = 2019-09-26 12:54:24 CDT
|
||||
host = hshin
|
||||
|
||||
Random Number
|
||||
-------------
|
||||
Offset for the random number seeds from input file (mod 1024): 509
|
||||
|
||||
Range of prime numbers to use as seeds over processors and threads = 3659-3671
|
||||
|
||||
|
||||
Particle Set
|
||||
------------
|
||||
Name: ion0
|
||||
All the species have the same mass 1
|
||||
Particle set size: 1
|
||||
|
||||
Particle Set
|
||||
------------
|
||||
Name: e
|
||||
All the species have the same mass 1
|
||||
Particle set size: 2
|
||||
|
||||
Wavefunction setup:
|
||||
-------------------
|
||||
Name: psi0
|
||||
|
||||
Distance table for similar particles (A-A):
|
||||
source/target: e
|
||||
Using array-of-structure (AoS) data layout (less efficient than SoA)
|
||||
Distance computations use open boundary conditions in 3D.
|
||||
|
||||
RadialJastrowBuilder adds a functor with cusp = -0.5
|
||||
Created SPOSet builder named 'MO' of type mo
|
||||
|
||||
Distance table for dissimilar particles (A-B):
|
||||
source: ion0 target: e
|
||||
Using array-of-structure (AoS) data layout (less efficient than SoA)
|
||||
Distance computations use open boundary conditions in 3D.
|
||||
|
||||
AO BasisSet for He
|
||||
Spherical Harmonics DO NOT contain (-1)^m factor
|
||||
Angular momentum m expanded according to Gaussian
|
||||
R(n,l,m,s) 1 0 0 0
|
||||
Expanding Ylm according to Gaussian98
|
||||
Slater Component (n,zeta,c)= 0 2 1
|
||||
Adding 1 spherical orbitals for l= 0
|
||||
Maximu Angular Momentum = 0
|
||||
Number of Radial functors = 1
|
||||
Basis size = 1
|
||||
|
||||
Reuse SPOSetBuilder "MO" type MO
|
||||
Building SPOSet '' with '' basis set.
|
||||
Creating LCOrbitalSet with the Identity coefficient
|
||||
Using Identity for the LCOrbitalSet
|
||||
Reuse SPOSetBuilder "MO" type MO
|
||||
Building SPOSet '' with '' basis set.
|
||||
Creating LCOrbitalSet with the Identity coefficient
|
||||
Using Identity for the LCOrbitalSet
|
||||
Creating a determinant updet group=0 sposet=updet
|
||||
Reusing a SPO set updet
|
||||
Using DiracDeterminant
|
||||
Using rank-1 Sherman-Morrison Fahy update
|
||||
|
||||
Creating a determinant downdet group=1 sposet=downdet
|
||||
Reusing a SPO set downdet
|
||||
Using DiracDeterminant
|
||||
Using rank-1 Sherman-Morrison Fahy update
|
||||
|
||||
FermionWF = SlaterDet
|
||||
QMCHamiltonian::addOperator Kinetic to H, physical Hamiltonian
|
||||
QMCHamiltonian::addOperator ElecElec to H, physical Hamiltonian
|
||||
QMCHamiltonian::addOperatorType added type coulomb named ElecElec
|
||||
QMCHamiltonian::addOperator Coulomb to H, physical Hamiltonian
|
||||
QMCHamiltonian::addOperatorType added type coulomb named Coulomb
|
||||
|
||||
QMCHamiltonian::add2WalkerProperty added
|
||||
3 to P::PropertyList
|
||||
0 to P::Collectables
|
||||
starting Index of the observables in P::PropertyList = 9
|
||||
ParticleSetPool::randomize
|
||||
<init source="ion0" target="e">
|
||||
</init>
|
||||
Initialization Execution time = 0.005507 secs
|
||||
=========================================================
|
||||
Summary of QMC systems
|
||||
=========================================================
|
||||
ParticleSetPool has:
|
||||
|
||||
ParticleSet e : 0 1 2
|
||||
|
||||
2
|
||||
|
||||
u 4.6333976634e-01 3.0608863347e-01 4.9310967804e-01
|
||||
d -6.7785341780e-01 5.0185440135e-01 2.4719705737e-01
|
||||
|
||||
ParticleSet ion0 : 0 1
|
||||
|
||||
1
|
||||
|
||||
He 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
|
||||
|
||||
Hamiltonian h0
|
||||
Kinetic Kinetic energy
|
||||
ElecElec CoulombAA source/target e
|
||||
|
||||
Coulomb CoulombAB source=ion0
|
||||
|
||||
Loop execution max-interations = 2
|
||||
|
||||
=========================================================
|
||||
Start QMCFixedSampleLinearOptimize
|
||||
File Root det_He_opt.s000 append = no
|
||||
=========================================================
|
||||
Skip QMCDriver::putQMCInfo
|
||||
Resetting Properties of the walkers 1 x 12
|
||||
Adding 1 walkers to 0 existing sets
|
||||
Total number of walkers: 1.0000000000e+00
|
||||
Total weight: 1.0000000000e+00
|
||||
|
||||
=========================================================
|
||||
Start VMC
|
||||
File Root det_He_opt.s000 append = no
|
||||
=========================================================
|
||||
Using the current 1 walkers.
|
||||
Total number of walkers: 1.0000000000e+00
|
||||
Total weight: 1.0000000000e+00
|
||||
Resetting Properties of the walkers 1 x 12
|
||||
|
||||
<vmc function="put">
|
||||
qmc_counter=0 my_counter=0
|
||||
time step = 1.0000000000e+00
|
||||
blocks = 5
|
||||
steps = 1
|
||||
substeps = 2
|
||||
current = 0
|
||||
target samples = 5.0000000000e+00
|
||||
walkers/mpi = 1
|
||||
|
||||
stepsbetweensamples = 1
|
||||
<parameter name="blocks" condition="int">5</parameter>
|
||||
<parameter name="blocks_between_recompute" condition="int">0</parameter>
|
||||
<parameter name="check_properties" condition="int">100</parameter>
|
||||
<parameter name="checkproperties" condition="int">100</parameter>
|
||||
<parameter name="current" condition="int">0</parameter>
|
||||
<parameter name="dmcwalkersperthread" condition="real">5.0000000000e+00</parameter>
|
||||
<parameter name="maxcpusecs" condition="real">3.6000000000e+05</parameter>
|
||||
<parameter name="record_configs" condition="int">0</parameter>
|
||||
<parameter name="record_walkers" condition="int">1</parameter>
|
||||
<parameter name="recordconfigs" condition="int">0</parameter>
|
||||
<parameter name="recordwalkers" condition="int">1</parameter>
|
||||
<parameter name="rewind" condition="int">0</parameter>
|
||||
<parameter name="samples" condition="real">5.0000000000e+00</parameter>
|
||||
<parameter name="samplesperthread" condition="real">5.0000000000e+00</parameter>
|
||||
<parameter name="steps" condition="int">1</parameter>
|
||||
<parameter name="stepsbetweensamples" condition="int">1</parameter>
|
||||
<parameter name="store_configs" condition="int">0</parameter>
|
||||
<parameter name="storeconfigs" condition="int">0</parameter>
|
||||
<parameter name="sub_steps" condition="int">2</parameter>
|
||||
<parameter name="substeps" condition="int">2</parameter>
|
||||
<parameter name="tau" condition="au">1.0000000000e+00</parameter>
|
||||
<parameter name="time_step" condition="au">1.0000000000e+00</parameter>
|
||||
<parameter name="timestep" condition="au">1.0000000000e+00</parameter>
|
||||
<parameter name="use_drift" condition="string">no</parameter>
|
||||
<parameter name="usedrift" condition="string">no</parameter>
|
||||
<parameter name="walkers" condition="int">1</parameter>
|
||||
<parameter name="warmup_steps" condition="int">1</parameter>
|
||||
<parameter name="warmupsteps" condition="int">1</parameter>
|
||||
DumpConfig==false Nothing (configurations, state) will be saved.
|
||||
Walker Samples are dumped every 1 steps.
|
||||
</vmc>
|
||||
Using QMCCostFunction::QMCCostFunction
|
||||
Using Default Cost Function: Cost = <|E-E_ff|^2>
|
||||
<optimization-report>
|
||||
<vmc stage="main" blocks="5">
|
||||
Initial partition of walkers 0 1
|
||||
|
||||
Using Particle by Particle moves
|
||||
Walker moves without drift
|
||||
Total Sample Size =5
|
||||
Walker distribution on root = 0 1
|
||||
===== Memory Usage after the buffer registration =====
|
||||
Available memory on node 0, free + buffers : 26914 MB
|
||||
Memory footprint by rank 0 on node 0 : 14 MB
|
||||
==================================================
|
||||
Anonymous Buffer size per walker : 736 Bytes.
|
||||
MEMORY increase 0 MB VMC::resetRun
|
||||
====================================================
|
||||
SimpleFixedNodeBranch::finalize after a VMC block
|
||||
QMC counter = 0
|
||||
time step = 1
|
||||
reference energy = -3.15245
|
||||
reference variance = 4.3192e-16
|
||||
====================================================
|
||||
Execution time = 1.4246e-02
|
||||
</vmc>
|
||||
<opt stage="setup">
|
||||
<log>
|
||||
Reading configurations from h5FileRoot det_He_opt.s000
|
||||
QMCCostFunction is created with 1 threads.
|
||||
Using Nonlocal PP in Opt: no
|
||||
Number of samples loaded to each thread : 5
|
||||
VMC Eavg = -3.0577e+00
|
||||
VMC Evar = 2.3921e-02
|
||||
Total weights = 5.0000e+00
|
||||
Execution time = 1.7555e-04
|
||||
</log>
|
||||
</opt>
|
||||
<opt stage="main" walkers="5">
|
||||
<log>
|
||||
|
||||
*****************************************
|
||||
Building overlap and Hamiltonian matrices
|
||||
*****************************************
|
||||
|
||||
Among totally 1 optimized parameters, largest LM parameter change : 4.0057e-01 at parameter 0
|
||||
|
||||
******************************************************************************
|
||||
Init Cost = -2.7495e+00 New Cost = -2.6597e+00 Delta Cost = 8.9775e-02
|
||||
******************************************************************************
|
||||
|
||||
The new set of parameters is valid. Updating the trial wave function!
|
||||
|
||||
*****************************************************************************
|
||||
Applying the update for shift_i = 1.0000e-02 and shift_s = 2.5000e-01
|
||||
*****************************************************************************
|
||||
Execution time = 1.5065e-02
|
||||
</log>
|
||||
<optVariables href="det_He_opt.s000.opt.xml">
|
||||
jud_b 4.2112e-01 0 1 ON 0
|
||||
</optVariables>
|
||||
Restore the number of walkers to 1, removing 0 walkers.
|
||||
</opt>
|
||||
</optimization-report>
|
||||
QMC Execution time = 1.7985e-02 secs
|
||||
Reusing QMCFixedSampleLinearOptimize
|
||||
Using QMCCostFunction::QMCCostFunction
|
||||
Using Default Cost Function: Cost = <|E-E_ff|^2>
|
||||
|
||||
=========================================================
|
||||
Start QMCFixedSampleLinearOptimize
|
||||
File Root det_He_opt.s001 append = no
|
||||
=========================================================
|
||||
Skip QMCDriver::putQMCInfo
|
||||
Resetting Properties of the walkers 1 x 12
|
||||
|
||||
=========================================================
|
||||
Start VMC
|
||||
File Root det_He_opt.s001 append = no
|
||||
=========================================================
|
||||
Using existing walkers
|
||||
Resetting Properties of the walkers 1 x 12
|
||||
|
||||
<vmc function="put">
|
||||
qmc_counter=1 my_counter=1
|
||||
time step = 1.0000e+00
|
||||
blocks = 5
|
||||
steps = 1
|
||||
substeps = 2
|
||||
current = 0
|
||||
target samples = 5.0000e+00
|
||||
walkers/mpi = 1
|
||||
|
||||
stepsbetweensamples = 1
|
||||
<parameter name="blocks" condition="int">5</parameter>
|
||||
<parameter name="blocks_between_recompute" condition="int">0</parameter>
|
||||
<parameter name="check_properties" condition="int">100</parameter>
|
||||
<parameter name="checkproperties" condition="int">100</parameter>
|
||||
<parameter name="current" condition="int">0</parameter>
|
||||
<parameter name="dmcwalkersperthread" condition="real">5.0000e+00</parameter>
|
||||
<parameter name="maxcpusecs" condition="real">3.6000e+05</parameter>
|
||||
<parameter name="record_configs" condition="int">0</parameter>
|
||||
<parameter name="record_walkers" condition="int">1</parameter>
|
||||
<parameter name="recordconfigs" condition="int">0</parameter>
|
||||
<parameter name="recordwalkers" condition="int">1</parameter>
|
||||
<parameter name="rewind" condition="int">0</parameter>
|
||||
<parameter name="samples" condition="real">5.0000e+00</parameter>
|
||||
<parameter name="samplesperthread" condition="real">5.0000e+00</parameter>
|
||||
<parameter name="steps" condition="int">1</parameter>
|
||||
<parameter name="stepsbetweensamples" condition="int">1</parameter>
|
||||
<parameter name="store_configs" condition="int">0</parameter>
|
||||
<parameter name="storeconfigs" condition="int">0</parameter>
|
||||
<parameter name="sub_steps" condition="int">2</parameter>
|
||||
<parameter name="substeps" condition="int">2</parameter>
|
||||
<parameter name="tau" condition="au">1.0000e+00</parameter>
|
||||
<parameter name="time_step" condition="au">1.0000e+00</parameter>
|
||||
<parameter name="timestep" condition="au">1.0000e+00</parameter>
|
||||
<parameter name="use_drift" condition="string">no</parameter>
|
||||
<parameter name="usedrift" condition="string">no</parameter>
|
||||
<parameter name="walkers" condition="int">1</parameter>
|
||||
<parameter name="warmup_steps" condition="int">1</parameter>
|
||||
<parameter name="warmupsteps" condition="int">1</parameter>
|
||||
DumpConfig==false Nothing (configurations, state) will be saved.
|
||||
Walker Samples are dumped every 1 steps.
|
||||
</vmc>
|
||||
EstimatorManagerBase::add replace LocalEnergy estimator.
|
||||
EstimatorManagerBase::add replace LocalEnergy estimator.
|
||||
<optimization-report>
|
||||
<vmc stage="main" blocks="5">
|
||||
Cannot make clones again. Use existing 1 clones
|
||||
Initial partition of walkers 0 1
|
||||
Using Particle by Particle moves
|
||||
Walker moves without drift
|
||||
Total Sample Size =5
|
||||
Walker distribution on root = 0 1
|
||||
===== Memory Usage after the buffer registration =====
|
||||
Available memory on node 0, free + buffers : 26913 MB
|
||||
Memory footprint by rank 0 on node 0 : 15 MB
|
||||
==================================================
|
||||
====================================================
|
||||
SimpleFixedNodeBranch::finalize after a VMC block
|
||||
QMC counter = 1
|
||||
time step = 1
|
||||
reference energy = -3.16985
|
||||
reference variance = 5.45454e-16
|
||||
====================================================
|
||||
Execution time = 1.6388e-02
|
||||
</vmc>
|
||||
<opt stage="setup">
|
||||
<log>
|
||||
Reading configurations from h5FileRoot det_He_opt.s001
|
||||
QMCCostFunction is created with 1 threads.
|
||||
Using Nonlocal PP in Opt: no
|
||||
Number of samples loaded to each thread : 5
|
||||
VMC Eavg = -3.0508e+00
|
||||
VMC Evar = 9.4500e-03
|
||||
Total weights = 5.0000e+00
|
||||
Execution time = 1.2194e-04
|
||||
</log>
|
||||
</opt>
|
||||
<opt stage="main" walkers="5">
|
||||
<log>
|
||||
|
||||
*****************************************
|
||||
Building overlap and Hamiltonian matrices
|
||||
*****************************************
|
||||
|
||||
Among totally 1 optimized parameters, largest LM parameter change : 5.0577e-01 at parameter 0
|
||||
|
||||
******************************************************************************
|
||||
Init Cost = -2.7448e+00 New Cost = -2.3147e+00 Delta Cost = 4.3005e-01
|
||||
******************************************************************************
|
||||
|
||||
The new set of parameters is valid. Updating the trial wave function!
|
||||
|
||||
*****************************************************************************
|
||||
Applying the update for shift_i = 1.0000e-02 and shift_s = 6.2500e-02
|
||||
*****************************************************************************
|
||||
Execution time = 1.6797e-02
|
||||
</log>
|
||||
<optVariables href="det_He_opt.s001.opt.xml">
|
||||
jud_b -8.4651e-02 0 1 ON 0
|
||||
</optVariables>
|
||||
Restore the number of walkers to 1, removing 0 walkers.
|
||||
</opt>
|
||||
</optimization-report>
|
||||
QMC Execution time = 1.9497e-02 secs
|
||||
|
||||
=========================================================
|
||||
Start VMC
|
||||
File Root det_He_opt.s002 append = no
|
||||
=========================================================
|
||||
Using the current 1 walkers.
|
||||
Total number of walkers: 1.0000e+00
|
||||
Total weight: 1.0000e+00
|
||||
Resetting Properties of the walkers 1 x 12
|
||||
|
||||
<vmc function="put">
|
||||
qmc_counter=0 my_counter=0
|
||||
time step = 3.0000e-01
|
||||
blocks = 3
|
||||
steps = 3
|
||||
substeps = 2
|
||||
current = 0
|
||||
target samples = 0.0000e+00
|
||||
walkers/mpi = 1
|
||||
|
||||
stepsbetweensamples = 12
|
||||
<parameter name="blocks" condition="int">3</parameter>
|
||||
<parameter name="blocks_between_recompute" condition="int">0</parameter>
|
||||
<parameter name="check_properties" condition="int">100</parameter>
|
||||
<parameter name="checkproperties" condition="int">100</parameter>
|
||||
<parameter name="current" condition="int">0</parameter>
|
||||
<parameter name="dmcwalkersperthread" condition="real">0.0000e+00</parameter>
|
||||
<parameter name="maxcpusecs" condition="real">3.6000e+05</parameter>
|
||||
<parameter name="record_configs" condition="int">0</parameter>
|
||||
<parameter name="record_walkers" condition="int">12</parameter>
|
||||
<parameter name="recordconfigs" condition="int">0</parameter>
|
||||
<parameter name="recordwalkers" condition="int">12</parameter>
|
||||
<parameter name="rewind" condition="int">0</parameter>
|
||||
<parameter name="samples" condition="real">0.0000e+00</parameter>
|
||||
<parameter name="samplesperthread" condition="real">0.0000e+00</parameter>
|
||||
<parameter name="steps" condition="int">3</parameter>
|
||||
<parameter name="stepsbetweensamples" condition="int">12</parameter>
|
||||
<parameter name="store_configs" condition="int">0</parameter>
|
||||
<parameter name="storeconfigs" condition="int">0</parameter>
|
||||
<parameter name="sub_steps" condition="int">2</parameter>
|
||||
<parameter name="substeps" condition="int">2</parameter>
|
||||
<parameter name="tau" condition="au">3.0000e-01</parameter>
|
||||
<parameter name="time_step" condition="au">3.0000e-01</parameter>
|
||||
<parameter name="timestep" condition="au">3.0000e-01</parameter>
|
||||
<parameter name="use_drift" condition="string">yes</parameter>
|
||||
<parameter name="usedrift" condition="string">yes</parameter>
|
||||
<parameter name="walkers" condition="int">1</parameter>
|
||||
<parameter name="warmup_steps" condition="int">3</parameter>
|
||||
<parameter name="warmupsteps" condition="int">3</parameter>
|
||||
DumpConfig==false Nothing (configurations, state) will be saved.
|
||||
Walker Samples are dumped every 12 steps.
|
||||
</vmc>
|
||||
EstimatorManagerBase::add replace LocalEnergy estimator.
|
||||
Cannot make clones again. Use existing 1 clones
|
||||
Initial partition of walkers 0 1
|
||||
|
||||
Using Particle by Particle moves
|
||||
Walker moves with drift
|
||||
Total Sample Size =0
|
||||
Walker distribution on root = 0 1
|
||||
===== Memory Usage after the buffer registration =====
|
||||
Available memory on node 0, free + buffers : 26913 MB
|
||||
Memory footprint by rank 0 on node 0 : 16 MB
|
||||
==================================================
|
||||
Anonymous Buffer size per walker : 736 Bytes.
|
||||
MEMORY increase 0 MB VMC::resetRun
|
||||
====================================================
|
||||
SimpleFixedNodeBranch::finalize after a VMC block
|
||||
QMC counter = 2
|
||||
time step = 0.3
|
||||
reference energy = -2.99109
|
||||
reference variance = 7.11317e-16
|
||||
====================================================
|
||||
QMC Execution time = 1.0857e-02 secs
|
||||
Total Execution time = 7.6159e-02 secs
|
||||
|
||||
=========================================================
|
||||
A new xml input file : det_He_opt.s002.cont.xml
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0"?>
|
||||
<qmcsystem>
|
||||
<wavefunction name="psi0" target="e">
|
||||
|
||||
<!-- Electron-electron Jastrow of Pade form -->
|
||||
<!-- For two electron system, only have up-down interaction -->
|
||||
|
||||
<jastrow name="Jee" type="Two-Body" function="pade">
|
||||
<correlation speciesA="u" speciesB="d">
|
||||
<var id="jud_b" name="B">4.2111744884e-01</var>
|
||||
</correlation>
|
||||
</jastrow>
|
||||
|
||||
<determinantset type="MO" key="STO" transform="no" source="ion0">
|
||||
<!-- Use a single Slater Type Orbital (STO) for the basis. Cusp condition is correct. -->
|
||||
<basisset>
|
||||
<atomicBasisSet type="STO" elementType="He">
|
||||
<basisGroup rid="R0" n="1" l="0" m="0" type="Slater">
|
||||
<radfunc exponent="2.0"/>
|
||||
</basisGroup>
|
||||
</atomicBasisSet>
|
||||
</basisset>
|
||||
<slaterdeterminant>
|
||||
<determinant id="updet" spin="1" size="1"/>
|
||||
<determinant id="downdet" spin="-1" size="1"/>
|
||||
</slaterdeterminant>
|
||||
</determinantset>
|
||||
</wavefunction>
|
||||
</qmcsystem>
|
|
@ -0,0 +1,6 @@
|
|||
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec Coulomb BlockWeight BlockCPU AcceptRatio
|
||||
0 -2.8693692504e+00 8.2332798953e+00 -4.1807725966e+00 1.3114033461e+00 1.0080398665e+00 -5.1888124630e+00 1.0000000000e+00 3.4207012504e-05 0.0000000000e+00
|
||||
1 -2.8693692504e+00 8.2332798953e+00 -4.1807725966e+00 1.3114033461e+00 1.0080398665e+00 -5.1888124630e+00 1.0000000000e+00 2.8225127608e-05 0.0000000000e+00
|
||||
2 -3.1985684964e+00 1.0230840426e+01 -4.1513564400e+00 9.5278794362e-01 5.6852958937e-01 -4.7198860294e+00 1.0000000000e+00 1.9866041839e-05 2.5000000000e-01
|
||||
3 -3.1985684964e+00 1.0230840426e+01 -4.1513564400e+00 9.5278794362e-01 5.6852958937e-01 -4.7198860294e+00 1.0000000000e+00 1.0584015399e-05 0.0000000000e+00
|
||||
4 -3.1524513516e+00 9.9379495240e+00 -4.3231470478e+00 1.1706956962e+00 5.8159544275e-01 -4.9047424905e+00 1.0000000000e+00 1.1848052964e-05 2.5000000000e-01
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0"?>
|
||||
<qmcsystem>
|
||||
<wavefunction name="psi0" target="e">
|
||||
|
||||
<!-- Electron-electron Jastrow of Pade form -->
|
||||
<!-- For two electron system, only have up-down interaction -->
|
||||
|
||||
<jastrow name="Jee" type="Two-Body" function="pade">
|
||||
<correlation speciesA="u" speciesB="d">
|
||||
<var id="jud_b" name="B">-8.4650968808e-02</var>
|
||||
</correlation>
|
||||
</jastrow>
|
||||
|
||||
<determinantset type="MO" key="STO" transform="no" source="ion0">
|
||||
<!-- Use a single Slater Type Orbital (STO) for the basis. Cusp condition is correct. -->
|
||||
<basisset>
|
||||
<atomicBasisSet type="STO" elementType="He">
|
||||
<basisGroup rid="R0" n="1" l="0" m="0" type="Slater">
|
||||
<radfunc exponent="2.0"/>
|
||||
</basisGroup>
|
||||
</atomicBasisSet>
|
||||
</basisset>
|
||||
<slaterdeterminant>
|
||||
<determinant id="updet" spin="1" size="1"/>
|
||||
<determinant id="downdet" spin="-1" size="1"/>
|
||||
</slaterdeterminant>
|
||||
</determinantset>
|
||||
</wavefunction>
|
||||
</qmcsystem>
|
|
@ -0,0 +1,6 @@
|
|||
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec Coulomb BlockWeight BlockCPU AcceptRatio
|
||||
0 -2.9714189034e+00 8.8293302995e+00 -4.2003228042e+00 1.2289039007e+00 6.4666378233e-01 -4.8469865865e+00 1.0000000000e+00 2.6641180739e-05 0.0000000000e+00
|
||||
1 -2.9714189034e+00 8.8293302995e+00 -4.2003228042e+00 1.2289039007e+00 6.4666378233e-01 -4.8469865865e+00 1.0000000000e+00 2.7853995562e-05 0.0000000000e+00
|
||||
2 -2.9714189034e+00 8.8293302995e+00 -4.2003228042e+00 1.2289039007e+00 6.4666378233e-01 -4.8469865865e+00 1.0000000000e+00 1.1723954231e-05 0.0000000000e+00
|
||||
3 -3.1698500253e+00 1.0047949183e+01 -3.1885487562e+00 1.8698730834e-02 4.5885480920e-01 -3.6474035654e+00 1.0000000000e+00 1.8547056243e-05 5.0000000000e-01
|
||||
4 -3.1698500253e+00 1.0047949183e+01 -3.1885487562e+00 1.8698730834e-02 4.5885480920e-01 -3.6474035654e+00 1.0000000000e+00 9.1879628599e-06 0.0000000000e+00
|
|
@ -0,0 +1,4 @@
|
|||
# index LocalEnergy LocalEnergy_sq LocalPotential Kinetic ElecElec Coulomb BlockWeight BlockCPU AcceptRatio
|
||||
0 -2.7703289496e+00 7.7103975692e+00 -4.3416072316e+00 1.5712782820e+00 5.6775267621e-01 -4.9093599078e+00 3.0000000000e+00 5.6974822655e-05 5.8333333333e-01
|
||||
1 -2.8507266854e+00 8.3076044433e+00 -6.2424199435e+00 3.3916932580e+00 1.0075119406e+00 -7.2499318840e+00 3.0000000000e+00 5.7344790548e-05 7.5000000000e-01
|
||||
2 -3.2529102977e+00 1.1144096729e+01 -5.7307184049e+00 2.4778081071e+00 1.5127657526e+00 -7.2434841574e+00 3.0000000000e+00 3.6464072764e-05 5.8333333333e-01
|
Loading…
Reference in New Issue