10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-03 18:05:59 +02:00
This commit is contained in:
Anthony Scemama 2018-05-02 19:52:23 +02:00
parent 600c82c021
commit db72510ce4
18 changed files with 19 additions and 26 deletions

View File

@ -242,7 +242,7 @@ def checking(d_dependency):
version = check_output("irpf90 -v".split()).strip() version = check_output("irpf90 -v".split()).strip()
from distutils.version import LooseVersion from distutils.version import LooseVersion
if LooseVersion(version) < LooseVersion("1.6.7"): if LooseVersion(version) < LooseVersion("1.7.2"):
return 0 return 0
else: else:
return a return a

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
s = H_apply("just_1h_1p") s = H_apply("just_1h_1p")

View File

@ -1,7 +1,7 @@
! Generates subroutine H_apply_cid ! Generates subroutine H_apply_cid
! ---------------------------------- ! ----------------------------------
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import H_apply from generate_h_apply import H_apply
H = H_apply("cid",do_double_exc=True,do_mono_exc=False) H = H_apply("cid",do_double_exc=True,do_mono_exc=False)
print H print H

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
from perturbation import perturbations from perturbation import perturbations
@ -16,7 +16,7 @@ subroutine H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st
integer, intent(in) :: N_st integer, intent(in) :: N_st
double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st) double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st)
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from perturbation import perturbations from perturbation import perturbations
for perturbation in perturbations: for perturbation in perturbations:

View File

@ -1,7 +1,7 @@
! Generates subroutine H_apply_cisd ! Generates subroutine H_apply_cisd
! ---------------------------------- ! ----------------------------------
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import H_apply from generate_h_apply import H_apply
H = H_apply("cis",do_double_exc=False) H = H_apply("cis",do_double_exc=False)
print H print H

View File

@ -1,7 +1,7 @@
! Generates subroutine H_apply_cisd ! Generates subroutine H_apply_cisd
! ---------------------------------- ! ----------------------------------
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import H_apply from generate_h_apply import H_apply
H = H_apply("cisd") H = H_apply("cisd")
print H print H

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
from perturbation import perturbations from perturbation import perturbations

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
from perturbation import perturbations from perturbation import perturbations
@ -16,7 +16,7 @@ subroutine H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st
integer, intent(in) :: N_st integer, intent(in) :: N_st
double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st) double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st)
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from perturbation import perturbations from perturbation import perturbations
for perturbation in perturbations: for perturbation in perturbations:

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
s = H_apply("just_1h_1p") s = H_apply("just_1h_1p")

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
s = H_apply("FCI") s = H_apply("FCI")

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
from perturbation import perturbations from perturbation import perturbations

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
s = H_apply("mrcc") s = H_apply("mrcc")

View File

@ -1,5 +1,5 @@
use bitmasks use bitmasks
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from generate_h_apply import * from generate_h_apply import *
s = H_apply("mrpt") s = H_apply("mrpt")

View File

@ -1,4 +1,4 @@
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
from perturbation import perturbations from perturbation import perturbations
import os import os

View File

@ -1,4 +1,4 @@
BEGIN_SHELL [ /usr/bin/env python ] BEGIN_SHELL [ /usr/bin/env python2 ]
import perturbation import perturbation
END_SHELL END_SHELL

View File

@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python2
print "#QP -> QMCPACK" print "#QP -> QMCPACK"

View File

@ -25,7 +25,6 @@ except ImportError:
"quantum_package.rc")) "quantum_package.rc"))
print "\n".join(["", "Error:", "source %s" % f, ""]) print "\n".join(["", "Error:", "source %s" % f, ""])
raise
sys.exit(1) sys.exit(1)
@ -820,13 +819,8 @@ if __name__ == "__main__":
pickle_path = os.path.join(QP_ROOT, "config", "qp_create_ninja.pickle") pickle_path = os.path.join(QP_ROOT, "config", "qp_create_ninja.pickle")
if arguments["update"]: if arguments["update"]:
try:
with open(pickle_path, 'rb') as handle: with open(pickle_path, 'rb') as handle:
arguments = pickle.load(handle) arguments = pickle.load(handle)
except IOError:
print "You need to create first my friend"
raise
sys.exit(1)
elif arguments["create"]: elif arguments["create"]:
@ -928,7 +922,6 @@ if __name__ == "__main__":
"- Or install a module that needs {0} with a main "] "- Or install a module that needs {0} with a main "]
print "\n".join(l_msg).format(module.rel) print "\n".join(l_msg).format(module.rel)
raise
sys.exit(1) sys.exit(1)
# ~#~#~#~#~#~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~#~#~#~#~#~ #

View File

@ -72,7 +72,7 @@ program first_guess
call write_int(6,psi_det_size,'psi_det_size') call write_int(6,psi_det_size,'psi_det_size')
TOUCH psi_det_size TOUCH psi_det_size
BEGIN_SHELL [ /usr/bin/python ] BEGIN_SHELL [ /usr/bin/env python2 ]
template_alpha_ext = """ template_alpha_ext = """
do %(i2)s = %(i1)s-1,1,-1 do %(i2)s = %(i1)s-1,1,-1