mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
H with pseudo doesnt segfault
This commit is contained in:
parent
078ee95e12
commit
330de7b32f
@ -22,6 +22,7 @@ BEGIN_PROVIDER [ %(type)s, %(name)s %(size)s ]
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
%(test_null_size)s
|
||||
call ezfio_has_%(ezfio_dir)s_%(ezfio_name)s(has)
|
||||
if (has) then
|
||||
call ezfio_get_%(ezfio_dir)s_%(ezfio_name)s(%(name)s)
|
||||
@ -44,6 +45,7 @@ END_PROVIDER
|
||||
|
||||
def __repr__(self):
|
||||
self.set_write()
|
||||
self.set_test_null_size()
|
||||
for v in self.values:
|
||||
if not v:
|
||||
msg = "Error : %s is not set in EZFIO.cfg" % (v)
|
||||
@ -54,22 +56,31 @@ END_PROVIDER
|
||||
|
||||
return self.data % self.__dict__
|
||||
|
||||
def set_test_null_size(self):
|
||||
if "size" not in self.__dict__:
|
||||
self.__dict__["size"] = ""
|
||||
if self.size != "":
|
||||
self.test_null_size = "if (size(%s) == 0) return\n" % ( self.name )
|
||||
else:
|
||||
self.test_null_size = ""
|
||||
|
||||
def set_write(self):
|
||||
self.write = ""
|
||||
if "size" in self.__dict__:
|
||||
return
|
||||
if self.type in self.write_correspondance:
|
||||
write = self.write_correspondance[self.type]
|
||||
output = self.output
|
||||
name = self.name
|
||||
else:
|
||||
if self.type in self.write_correspondance:
|
||||
write = self.write_correspondance[self.type]
|
||||
output = self.output
|
||||
name = self.name
|
||||
|
||||
l_write = ["",
|
||||
" call write_time(%(output)s)",
|
||||
" call %(write)s(%(output)s, %(name)s, &",
|
||||
" '%(name)s')",
|
||||
""]
|
||||
l_write = ["",
|
||||
" call write_time(%(output)s)",
|
||||
" call %(write)s(%(output)s, %(name)s, &",
|
||||
" '%(name)s')",
|
||||
""]
|
||||
|
||||
self.write = "\n".join(l_write) % locals()
|
||||
self.write = "\n".join(l_write) % locals()
|
||||
|
||||
def set_type(self, t):
|
||||
self.type = t.lower()
|
||||
|
@ -3,10 +3,14 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num_align,ao_num)]
|
||||
BEGIN_DOC
|
||||
! Pseudo-potential
|
||||
END_DOC
|
||||
ao_pseudo_integral = 0.d0
|
||||
if (do_pseudo) then
|
||||
ao_pseudo_integral = ao_pseudo_integral_local + ao_pseudo_integral_non_local
|
||||
else
|
||||
ao_pseudo_integral = 0.d0
|
||||
if (pseudo_klocmax > 0) then
|
||||
ao_pseudo_integral += ao_pseudo_integral_local
|
||||
endif
|
||||
if (pseudo_kmax > 0) then
|
||||
ao_pseudo_integral += ao_pseudo_integral_non_local
|
||||
endif
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user