mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Merge tag 'fix_new_module_tag_error' into develop
Clean before unistall
This commit is contained in:
commit
a427f27f3a
1
plugins/Hartree_Fock/.gitignore
vendored
1
plugins/Hartree_Fock/.gitignore
vendored
@ -21,4 +21,5 @@ MOGuess
|
||||
Nuclei
|
||||
Utils
|
||||
Huckel_guess
|
||||
test
|
||||
SCF
|
@ -29,7 +29,17 @@ Documentation
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
||||
`create_guess <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L8>`_
|
||||
`big <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/test.irp.f#L1>`_
|
||||
Produce `Huckel` MO orbital
|
||||
output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
|
||||
Produce `Hartree_Fock` MO orbital
|
||||
output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
|
||||
output: hartree_fock.energy
|
||||
input: mo_basis.mo_coef
|
||||
Run SCF calculation
|
||||
|
||||
|
||||
`create_guess <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L13>`_
|
||||
Create an MO guess if no MOs are present in the EZFIO directory
|
||||
|
||||
|
||||
@ -139,12 +149,15 @@ Documentation
|
||||
Maximum number of SCF iterations
|
||||
|
||||
|
||||
`run <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L33>`_
|
||||
`run <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L38>`_
|
||||
Run SCF calculation
|
||||
|
||||
|
||||
`scf <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L2>`_
|
||||
Undocumented
|
||||
`scf <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/SCF.irp.f#L1>`_
|
||||
Produce `Hartree_Fock` MO orbital
|
||||
output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
|
||||
output: hartree_fock.energy
|
||||
optional: mo_basis.mo_coef
|
||||
|
||||
|
||||
`thresh_scf <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock/ezfio_interface.irp.f#L46>`_
|
||||
|
@ -26,7 +26,7 @@ except ImportError:
|
||||
print """
|
||||
Error:
|
||||
source %s
|
||||
"""%f
|
||||
""" % f
|
||||
sys.exit(1)
|
||||
|
||||
header = r"""#
|
||||
@ -313,8 +313,11 @@ def ninja_symlink_build(path_module, l_symlink):
|
||||
if not l_symlink:
|
||||
return []
|
||||
|
||||
l_string = ["build l_symlink_{0} : phony {1}".format(
|
||||
path_module.rel, " ".join([s.destination for s in l_symlink])), ""]
|
||||
l_folder = [s.destination for s in l_symlink]
|
||||
|
||||
l_string = ["build l_symlink_{0} : phony {1}".format(path_module.rel,
|
||||
" ".join(l_folder)),
|
||||
""]
|
||||
|
||||
for symlink in l_symlink:
|
||||
l_string += ["build {0}: build_symlink {1}".format(symlink.destination,
|
||||
@ -336,20 +339,22 @@ def ninja_gitignore_rule():
|
||||
" description = Create gitignore for $module_rel", ""]
|
||||
|
||||
|
||||
def ninja_gitignore_build(path_module, d_binaries):
|
||||
def ninja_gitignore_build(path_module, d_binaries, l_symlink):
|
||||
"""
|
||||
"""
|
||||
|
||||
path_gitignore = join(path_module.abs, ".gitignore")
|
||||
|
||||
l_b = [i.abs for i in d_binaries[path_module]]
|
||||
l_sym = [i.destination for i in l_symlink]
|
||||
|
||||
l_string = ["build {0}: build_gitignore {1} || l_symlink_{2}".format(path_gitignore,
|
||||
" ".join(l_b),
|
||||
path_module.rel),
|
||||
" module_rel = {0}".format(path_module.rel),
|
||||
""]
|
||||
root = "build {0}: build_gitignore {1}".format(path_gitignore,
|
||||
" ".join(l_b))
|
||||
if l_symlink:
|
||||
l_string = ["{0} || l_symlink_{1}".format(root, path_module.rel)]
|
||||
else:
|
||||
l_string = ["{0}".format(root)]
|
||||
|
||||
l_string.extend((" module_rel = {0}".format(path_module.rel), ""))
|
||||
|
||||
return l_string
|
||||
|
||||
@ -911,7 +916,8 @@ if __name__ == "__main__":
|
||||
l_string += ninja_binaries_build(module_to_compile, l_children,
|
||||
d_binaries)
|
||||
|
||||
l_string += ninja_gitignore_build(module_to_compile, d_binaries)
|
||||
l_string += ninja_gitignore_build(module_to_compile, d_binaries,
|
||||
l_symlink)
|
||||
|
||||
with open(join(QP_ROOT, "config", "build.ninja"), "w+") as f:
|
||||
f.write(header)
|
||||
|
@ -16,6 +16,7 @@ Options:
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
from docopt import docopt
|
||||
@ -152,6 +153,11 @@ if __name__ == '__main__':
|
||||
except OSError:
|
||||
print "Your src directory is broken. Please remove %s" % des
|
||||
raise
|
||||
try:
|
||||
import subprocess
|
||||
subprocess.check_call(["qp_create_ninja.py", "update"])
|
||||
except:
|
||||
raise
|
||||
print "Done"
|
||||
print "You can now compile as usual"
|
||||
|
||||
@ -164,24 +170,29 @@ if __name__ == '__main__':
|
||||
l_name = arguments["<name>"]
|
||||
|
||||
l_failed = [name for name in l_name if name not in d_local]
|
||||
|
||||
if l_failed:
|
||||
print "Modules not installed:"
|
||||
for name in sorted(l_failed):
|
||||
print "* %s" % name
|
||||
sys.exit(1)
|
||||
|
||||
if arguments["--and_ancestor"]:
|
||||
|
||||
l_name_to_remove = l_name + [module for module in m_instance.l_module for name in l_name if name in d_descendant[module]]
|
||||
print "You will remove all of:"
|
||||
print l_name_to_remove
|
||||
else:
|
||||
if arguments["--and_ancestor"]:
|
||||
l_name_to_remove = l_name
|
||||
|
||||
l_name_to_remove = l_name + [module for module in m_instance.l_module for name in l_name if name in d_descendant[module]]
|
||||
print "You will remove all of:"
|
||||
print l_name_to_remove
|
||||
for module in l_name_to_remove:
|
||||
|
||||
else:
|
||||
l_name_to_remove = l_name
|
||||
try:
|
||||
subprocess.check_call(["module_handler.py", "clean", module])
|
||||
except:
|
||||
raise
|
||||
|
||||
def unlink(x):
|
||||
try:
|
||||
os.unlink(os.path.join(QP_SRC, x))
|
||||
except OSError:
|
||||
print "%s is a core module which can not be renmoved" % x
|
||||
map(unlink, l_name_to_remove)
|
||||
try:
|
||||
os.unlink(os.path.join(QP_SRC, module))
|
||||
except OSError:
|
||||
print "%s is a core module which can not be renmoved" % x
|
||||
|
@ -37,3 +37,7 @@ Documentation
|
||||
Produce `H_core` MO orbital
|
||||
output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
|
||||
|
||||
|
||||
`hcore_guess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess/h_core_guess_routine.irp.f#L1>`_
|
||||
Produce `H_core` MO orbital
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user