Fix README and graphiz
10
configure
vendored
@ -61,7 +61,8 @@ d_dependency = {
|
|||||||
"gcc": [],
|
"gcc": [],
|
||||||
"python": [],
|
"python": [],
|
||||||
"ninja": ["gcc", "python"],
|
"ninja": ["gcc", "python"],
|
||||||
"make": []
|
"make": [],
|
||||||
|
"p_graphviz": ["python"]
|
||||||
}
|
}
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
@ -126,10 +127,15 @@ ezfio = Info(
|
|||||||
description=' EZFIO',
|
description=' EZFIO',
|
||||||
default_path=join(QP_ROOT_INSTALL, "EZFIO"))
|
default_path=join(QP_ROOT_INSTALL, "EZFIO"))
|
||||||
|
|
||||||
|
p_graphviz = Info(
|
||||||
|
url='https://github.com/xflr6/graphviz/archive/master.zip',
|
||||||
|
description=' Python library for graphviz',
|
||||||
|
default_path=join(QP_ROOT_INSTALL, "p_graphviz"))
|
||||||
|
|
||||||
d_info = dict()
|
d_info = dict()
|
||||||
|
|
||||||
for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt",
|
for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt",
|
||||||
"resultsFile", "ninja", "emsl", "ezfio"]:
|
"resultsFile", "ninja", "emsl", "ezfio", "p_graphviz"]:
|
||||||
exec ("d_info['{0}']={0}".format(m))
|
exec ("d_info['{0}']={0}".format(m))
|
||||||
|
|
||||||
|
|
||||||
|
10
install/scripts/install_p_graphviz.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
TARGET=p_graphviz
|
||||||
|
|
||||||
|
function _install()
|
||||||
|
{
|
||||||
|
cp -R ${BUILD} . || exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
source scripts/build.sh
|
23
plugins/Alavi/.gitignore
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
|
||||||
|
IRPF90_temp
|
||||||
|
IRPF90_man
|
||||||
|
irpf90_entities
|
||||||
|
tags
|
||||||
|
irpf90.make
|
||||||
|
Makefile
|
||||||
|
Makefile.depend
|
||||||
|
.ninja_log
|
||||||
|
.ninja_deps
|
||||||
|
ezfio_interface.irp.f
|
||||||
|
Ezfio_files
|
||||||
|
Determinants
|
||||||
|
Integrals_Monoelec
|
||||||
|
MO_Basis
|
||||||
|
Utils
|
||||||
|
Pseudo
|
||||||
|
Bitmask
|
||||||
|
AO_Basis
|
||||||
|
Electrons
|
||||||
|
Nuclei
|
||||||
|
Integrals_Bielec
|
||||||
|
alavi_graph
|
1
plugins/Alavi/NEEDED_CHILDREN_MODULES
Normal file
@ -0,0 +1 @@
|
|||||||
|
Determinants
|
23
plugins/Alavi/README.rst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
=====
|
||||||
|
alavi
|
||||||
|
=====
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. Do not edit this section. It was auto-generated from the
|
||||||
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
|
`alavi_graph <http://github.com/LCPQ/quantum_package/tree/master/src/Alavi/alavi_graph.irp.f#L1>`_
|
||||||
|
Undocumented
|
||||||
|
|
||||||
|
Needed Modules
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. Do not edit this section. It was auto-generated from the
|
||||||
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
|
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
||||||
|
|
28
plugins/Alavi/alavi_graph.irp.f
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
program alavi_graph
|
||||||
|
implicit none
|
||||||
|
integer :: exc(0:2,2,2),h1,p1,h2,p2,s1,s2
|
||||||
|
double precision :: phase
|
||||||
|
|
||||||
|
read_wf = .True.
|
||||||
|
touch read_wf
|
||||||
|
|
||||||
|
integer :: k,degree
|
||||||
|
double precision :: hii
|
||||||
|
|
||||||
|
do k=1,N_det
|
||||||
|
call get_excitation_degree(psi_det(1,1,1),psi_det(1,1,k),degree,N_int)
|
||||||
|
call i_H_j(psi_det(1,1,k),psi_det(1,1,k),N_int,hii)
|
||||||
|
print*, k,abs(psi_coef(k,1)), hii,degree
|
||||||
|
|
||||||
|
! if (degree == 2) then
|
||||||
|
! call get_excitation(psi_det(1,1,1),psi_det(1,1,k),exc,degree,phase,N_int)
|
||||||
|
! call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||||
|
! print*, h1,h2,hii, abs(psi_coef(k,1))
|
||||||
|
! endif
|
||||||
|
!
|
||||||
|
|
||||||
|
|
||||||
|
enddo
|
||||||
|
end
|
||||||
|
|
||||||
|
!plot "test.dat" u (abs($2)):(abs($3)):4 w p palette
|
@ -1,4 +0,0 @@
|
|||||||
==================
|
|
||||||
All_singles Module
|
|
||||||
==================
|
|
||||||
|
|
2
plugins/CAS_SD/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# Automatically created by /home/scemama/quantum_package/scripts/module/module_handler.py
|
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
|
||||||
IRPF90_temp
|
IRPF90_temp
|
||||||
IRPF90_man
|
IRPF90_man
|
||||||
irpf90_entities
|
irpf90_entities
|
||||||
|
Before Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 91 KiB |
1
plugins/CID_SC2_selected/.gitignore
vendored
@ -6,7 +6,6 @@ tags
|
|||||||
irpf90.make
|
irpf90.make
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.depend
|
Makefile.depend
|
||||||
build.ninja
|
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
ezfio_interface.irp.f
|
ezfio_interface.irp.f
|
||||||
|
Before Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 109 KiB |
1
plugins/CIS/.gitignore
vendored
@ -6,7 +6,6 @@ tags
|
|||||||
irpf90.make
|
irpf90.make
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.depend
|
Makefile.depend
|
||||||
build.ninja
|
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
ezfio_interface.irp.f
|
ezfio_interface.irp.f
|
||||||
|
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 92 KiB |
50
plugins/CISD_SC2_selected/.gitignore
vendored
@ -1,33 +1,31 @@
|
|||||||
#
|
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
|
||||||
# Do not modify this file. Add your ignored files to the gitignore
|
|
||||||
# (without the dot at the beginning) file.
|
|
||||||
#
|
|
||||||
IRPF90_temp
|
IRPF90_temp
|
||||||
IRPF90_man
|
IRPF90_man
|
||||||
irpf90.make
|
|
||||||
tags
|
|
||||||
Makefile.depend
|
|
||||||
irpf90_entities
|
irpf90_entities
|
||||||
build.ninja
|
tags
|
||||||
|
irpf90.make
|
||||||
|
Makefile
|
||||||
|
Makefile.depend
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
Pseudo
|
ezfio_interface.irp.f
|
||||||
Integrals_Monoelec
|
|
||||||
Bitmask
|
|
||||||
Integrals_Bielec
|
|
||||||
CISD_selected
|
|
||||||
AOs
|
|
||||||
Selectors_full
|
|
||||||
MOs
|
|
||||||
Hartree_Fock
|
|
||||||
Perturbation
|
|
||||||
CISD
|
|
||||||
Determinants
|
|
||||||
Electrons
|
|
||||||
Utils
|
|
||||||
Properties
|
|
||||||
Nuclei
|
|
||||||
MOGuess
|
|
||||||
SingleRefMethod
|
|
||||||
Ezfio_files
|
Ezfio_files
|
||||||
|
Perturbation
|
||||||
|
Determinants
|
||||||
|
Integrals_Monoelec
|
||||||
|
MO_Basis
|
||||||
|
Selectors_full
|
||||||
|
SingleRefMethod
|
||||||
|
Utils
|
||||||
|
Pseudo
|
||||||
|
Properties
|
||||||
|
Bitmask
|
||||||
|
AO_Basis
|
||||||
|
Electrons
|
||||||
|
CISD_selected
|
||||||
|
MOGuess
|
||||||
|
CISD
|
||||||
|
Nuclei
|
||||||
|
Hartree_Fock
|
||||||
|
Integrals_Bielec
|
||||||
cisd_sc2_selection
|
cisd_sc2_selection
|
Before Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 106 KiB |
@ -21,7 +21,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
||||||
|
|
||||||
|
BIN
plugins/Casino/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 64 KiB |
1
plugins/DDCI_selected/.gitignore
vendored
@ -6,7 +6,6 @@ tags
|
|||||||
irpf90.make
|
irpf90.make
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.depend
|
Makefile.depend
|
||||||
build.ninja
|
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
ezfio_interface.irp.f
|
ezfio_interface.irp.f
|
||||||
|
Before Width: | Height: | Size: 105 KiB |
1
plugins/DensityMatrix/NEEDED_CHILDREN_MODULES
Normal file
@ -0,0 +1 @@
|
|||||||
|
Bitmask
|
1
plugins/FCIdump/.gitignore
vendored
@ -6,7 +6,6 @@ tags
|
|||||||
irpf90.make
|
irpf90.make
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.depend
|
Makefile.depend
|
||||||
build.ninja
|
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
ezfio_interface.irp.f
|
ezfio_interface.irp.f
|
||||||
|
Before Width: | Height: | Size: 64 KiB |
@ -159,7 +159,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
|
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
|
||||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
||||||
|
BIN
plugins/Full_CI/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 65 KiB |
@ -43,7 +43,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
||||||
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
||||||
|
BIN
plugins/Generators_full/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 60 KiB |
@ -10,7 +10,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Integrals_Bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Bielec>`_
|
* `Integrals_Bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Bielec>`_
|
||||||
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
|
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
|
||||||
@ -29,16 +29,6 @@ Documentation
|
|||||||
Alpha Fock matrix in AO basis set
|
Alpha Fock matrix in AO basis set
|
||||||
|
|
||||||
|
|
||||||
`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_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
|
Create an MO guess if no MOs are present in the EZFIO directory
|
||||||
|
|
||||||
|
BIN
plugins/Hartree_Fock/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 63 KiB |
1
plugins/MP2/.gitignore
vendored
@ -6,7 +6,6 @@ tags
|
|||||||
irpf90.make
|
irpf90.make
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.depend
|
Makefile.depend
|
||||||
build.ninja
|
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
ezfio_interface.irp.f
|
ezfio_interface.irp.f
|
||||||
|
Before Width: | Height: | Size: 106 KiB |
2
plugins/MRCC/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# Automatically created by /home/scemama/quantum_package/scripts/module/module_handler.py
|
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
|
||||||
IRPF90_temp
|
IRPF90_temp
|
||||||
IRPF90_man
|
IRPF90_man
|
||||||
irpf90_entities
|
irpf90_entities
|
||||||
|
@ -17,7 +17,6 @@ do i=1,N_det_non_cas
|
|||||||
lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k)
|
lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k)
|
||||||
if (dabs(ihpsi(k)).le.1.d-3) then
|
if (dabs(ihpsi(k)).le.1.d-3) then
|
||||||
lambda_mrcc(k,i) = 1.d0 / (psi_cas_energy_diagonalized(k)-hii)
|
lambda_mrcc(k,i) = 1.d0 / (psi_cas_energy_diagonalized(k)-hii)
|
||||||
icount_manu = icount_manu+1
|
|
||||||
cycle
|
cycle
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
Before Width: | Height: | Size: 104 KiB |
@ -33,7 +33,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
||||||
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
|
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
|
||||||
|
BIN
plugins/Molden/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 34 KiB |
@ -356,7 +356,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
|
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
|
||||||
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
||||||
|
BIN
plugins/Perturbation/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 80 KiB |
@ -148,7 +148,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
||||||
|
|
||||||
|
BIN
plugins/Properties/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 64 KiB |
2
plugins/QmcChem/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# Automatically created by /home/scemama/quantum_package/scripts/module/module_handler.py
|
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
|
||||||
IRPF90_temp
|
IRPF90_temp
|
||||||
IRPF90_man
|
IRPF90_man
|
||||||
irpf90_entities
|
irpf90_entities
|
||||||
|
Before Width: | Height: | Size: 73 KiB |
@ -181,7 +181,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
|
||||||
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
|
||||||
|
BIN
plugins/Selectors_full/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 36 KiB |
@ -16,7 +16,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
||||||
|
|
||||||
|
BIN
plugins/loc_cele/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 30 KiB |
@ -530,7 +530,7 @@ def ninja_readme_build(path_module, d_irp, dict_root_path):
|
|||||||
tags = join(root_module.abs, "tags")
|
tags = join(root_module.abs, "tags")
|
||||||
str_depend = " ".join(d_irp[path_module]["l_depend"])
|
str_depend = " ".join(d_irp[path_module]["l_depend"])
|
||||||
|
|
||||||
tree = join(root_module.abs, "tree_dependency.png")
|
tree = join(root_module.abs, "tree_dependency.pdf")
|
||||||
|
|
||||||
l_string = ["build {0}: build_readme {1} {2} {3}".format(path_readme,
|
l_string = ["build {0}: build_readme {1} {2} {3}".format(path_readme,
|
||||||
tags,
|
tags,
|
||||||
@ -714,7 +714,7 @@ def ninja_dot_tree_rule():
|
|||||||
|
|
||||||
def ninja_dot_tree_build(path_module, l_module):
|
def ninja_dot_tree_build(path_module, l_module):
|
||||||
|
|
||||||
path_tree = join(path_module.abs, "tree_dependency.png")
|
path_tree = join(path_module.abs, "tree_dependency.pdf")
|
||||||
l_dep = [join(path.abs, "NEEDED_CHILDREN_MODULES") for path in l_module]
|
l_dep = [join(path.abs, "NEEDED_CHILDREN_MODULES") for path in l_module]
|
||||||
l_string = ["build {0}: build_dot_tree {1}".format(path_tree, " ".join(l_dep)),
|
l_string = ["build {0}: build_dot_tree {1}".format(path_tree, " ".join(l_dep)),
|
||||||
" module_abs = {0}".format(path_module.abs),
|
" module_abs = {0}".format(path_module.abs),
|
||||||
@ -869,14 +869,7 @@ if __name__ == "__main__":
|
|||||||
dict_root = module_instance.dict_root
|
dict_root = module_instance.dict_root
|
||||||
dict_root_path = dict_module_genelogy_path(dict_root)
|
dict_root_path = dict_module_genelogy_path(dict_root)
|
||||||
|
|
||||||
l_module = d_genealogy_path.keys()
|
l_all_module = d_genealogy_path.keys()
|
||||||
|
|
||||||
for module in l_module:
|
|
||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
|
||||||
# d o t _ t r e e & r e a d m e #
|
|
||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
|
||||||
l_string += ninja_dot_tree_build(module, l_module)
|
|
||||||
l_string += ninja_readme_build(module, d_irp, dict_root_path)
|
|
||||||
|
|
||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
||||||
# M o d u l e _ t o _ i r p #
|
# M o d u l e _ t o _ i r p #
|
||||||
@ -884,14 +877,21 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if arguments["--production"]:
|
if arguments["--production"]:
|
||||||
|
|
||||||
d_binaries = get_dict_binaries(l_module, mode="production")
|
d_binaries = get_dict_binaries(l_all_module, mode="production")
|
||||||
l_module = d_binaries.keys()
|
l_module = d_binaries.keys()
|
||||||
|
|
||||||
elif arguments["--development"]:
|
elif arguments["--development"]:
|
||||||
|
|
||||||
d_binaries = get_dict_binaries(l_module, mode="development")
|
d_binaries = get_dict_binaries(l_all_module, mode="development")
|
||||||
l_module = d_binaries.keys()
|
l_module = d_binaries.keys()
|
||||||
|
|
||||||
|
for module in l_module:
|
||||||
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
||||||
|
# d o t _ t r e e & r e a d m e #
|
||||||
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
||||||
|
l_string += ninja_dot_tree_build(module, l_all_module)
|
||||||
|
l_string += ninja_readme_build(module, d_irp, dict_root_path)
|
||||||
|
|
||||||
create_build_ninja_global(l_module)
|
create_build_ninja_global(l_module)
|
||||||
|
|
||||||
for module_to_compile in l_module:
|
for module_to_compile in l_module:
|
||||||
|
@ -177,7 +177,7 @@ class ModuleHandler():
|
|||||||
|
|
||||||
# Init
|
# Init
|
||||||
try:
|
try:
|
||||||
import pydot
|
from graphviz import Digraph
|
||||||
except:
|
except:
|
||||||
with open(path, 'a'):
|
with open(path, 'a'):
|
||||||
os.utime(path, None)
|
os.utime(path, None)
|
||||||
@ -191,23 +191,20 @@ class ModuleHandler():
|
|||||||
if module not in all_ready_done:
|
if module not in all_ready_done:
|
||||||
for children in l_children:
|
for children in l_children:
|
||||||
# Add Edge
|
# Add Edge
|
||||||
edge = pydot.Edge(module, children)
|
graph.edge(module, children)
|
||||||
graph.add_edge(edge)
|
|
||||||
# Recurs
|
# Recurs
|
||||||
draw_module_edge(children, d_ref[children])
|
draw_module_edge(children, d_ref[children])
|
||||||
all_ready_done.append(module)
|
all_ready_done.append(module)
|
||||||
|
|
||||||
graph = pydot.Dot(graph_type='digraph')
|
graph = Digraph(comment=l_module)
|
||||||
d_ref = self.dict_child
|
d_ref = self.dict_child
|
||||||
|
|
||||||
# Create all the edge
|
# Create all the edge
|
||||||
for module in l_module:
|
for module in l_module:
|
||||||
node_a = pydot.Node(module, fontcolor="red")
|
graph.node(module, fontcolor="red")
|
||||||
graph.add_node(node_a)
|
|
||||||
draw_module_edge(module, d_ref[module])
|
draw_module_edge(module, d_ref[module])
|
||||||
|
|
||||||
# Save
|
graph.render('tree_dependency')
|
||||||
graph.write_png(path)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -66,7 +66,7 @@ def update_needed(data):
|
|||||||
with open('NEEDED_CHILDREN_MODULES', 'r') as f:
|
with open('NEEDED_CHILDREN_MODULES', 'r') as f:
|
||||||
modules = f.read()
|
modules = f.read()
|
||||||
|
|
||||||
header_image = ".. image:: tree_dependency.png\n\n"
|
header_image = ".. image:: tree_dependency.pdf\n\n"
|
||||||
|
|
||||||
if modules.strip():
|
if modules.strip():
|
||||||
modules = ['* `{0} <{1}>`_'.format(name, os.path.join(URL, name))
|
modules = ['* `{0} <{1}>`_'.format(name, os.path.join(URL, name))
|
||||||
|
@ -1,536 +0,0 @@
|
|||||||
# -*- coding: Latin-1 -*-
|
|
||||||
"""Graphviz's dot language parser.
|
|
||||||
|
|
||||||
The dotparser parses graphviz files in dot and dot files and transforms them
|
|
||||||
into a class representation defined by pydot.
|
|
||||||
|
|
||||||
The module needs pyparsing (tested with version 1.2.2) and pydot
|
|
||||||
|
|
||||||
Author: Michael Krause <michael@krause-software.de>
|
|
||||||
Fixes by: Ero Carrera <ero@dkbza.org>
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = ['Michael Krause', 'Ero Carrera']
|
|
||||||
__license__ = 'MIT'
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import glob
|
|
||||||
import pydot
|
|
||||||
import re
|
|
||||||
import codecs
|
|
||||||
|
|
||||||
from pyparsing import __version__ as pyparsing_version
|
|
||||||
|
|
||||||
from pyparsing import (
|
|
||||||
nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
|
|
||||||
Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas,
|
|
||||||
nums, restOfLine, cStyleComment, nums, alphanums, printables, empty,
|
|
||||||
quotedString, ParseException, ParseResults, CharsNotIn, _noncomma,
|
|
||||||
dblQuotedString, QuotedString, ParserElement)
|
|
||||||
|
|
||||||
|
|
||||||
class P_AttrList:
|
|
||||||
def __init__(self, toks):
|
|
||||||
|
|
||||||
self.attrs = {}
|
|
||||||
i = 0
|
|
||||||
|
|
||||||
while i < len(toks):
|
|
||||||
attrname = toks[i]
|
|
||||||
if i + 2 < len(toks) and toks[i + 1] == '=':
|
|
||||||
attrvalue = toks[i + 2]
|
|
||||||
i += 3
|
|
||||||
else:
|
|
||||||
attrvalue = None
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
self.attrs[attrname] = attrvalue
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
|
|
||||||
return "%s(%r)" % (self.__class__.__name__, self.attrs)
|
|
||||||
|
|
||||||
|
|
||||||
class DefaultStatement(P_AttrList):
|
|
||||||
def __init__(self, default_type, attrs):
|
|
||||||
|
|
||||||
self.default_type = default_type
|
|
||||||
self.attrs = attrs
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
|
|
||||||
return "%s(%s, %r)" % (self.__class__.__name__, self.default_type,
|
|
||||||
self.attrs)
|
|
||||||
|
|
||||||
|
|
||||||
top_graphs = list()
|
|
||||||
|
|
||||||
|
|
||||||
def push_top_graph_stmt(str, loc, toks):
|
|
||||||
|
|
||||||
attrs = {}
|
|
||||||
g = None
|
|
||||||
|
|
||||||
for element in toks:
|
|
||||||
|
|
||||||
if (isinstance(element, (ParseResults, tuple, list)) and
|
|
||||||
len(element) == 1 and isinstance(element[0], basestring)):
|
|
||||||
|
|
||||||
element = element[0]
|
|
||||||
|
|
||||||
if element == 'strict':
|
|
||||||
attrs['strict'] = True
|
|
||||||
|
|
||||||
elif element in ['graph', 'digraph']:
|
|
||||||
|
|
||||||
attrs = {}
|
|
||||||
|
|
||||||
g = pydot.Dot(graph_type=element, **attrs)
|
|
||||||
attrs['type'] = element
|
|
||||||
|
|
||||||
top_graphs.append(g)
|
|
||||||
|
|
||||||
elif isinstance(element, basestring):
|
|
||||||
g.set_name(element)
|
|
||||||
|
|
||||||
elif isinstance(element, pydot.Subgraph):
|
|
||||||
|
|
||||||
g.obj_dict['attributes'].update(element.obj_dict['attributes'])
|
|
||||||
g.obj_dict['edges'].update(element.obj_dict['edges'])
|
|
||||||
g.obj_dict['nodes'].update(element.obj_dict['nodes'])
|
|
||||||
g.obj_dict['subgraphs'].update(element.obj_dict['subgraphs'])
|
|
||||||
|
|
||||||
g.set_parent_graph(g)
|
|
||||||
|
|
||||||
elif isinstance(element, P_AttrList):
|
|
||||||
attrs.update(element.attrs)
|
|
||||||
|
|
||||||
elif isinstance(element, (ParseResults, list)):
|
|
||||||
add_elements(g, element)
|
|
||||||
|
|
||||||
else:
|
|
||||||
raise ValueError, "Unknown element statement: %r " % element
|
|
||||||
|
|
||||||
for g in top_graphs:
|
|
||||||
update_parent_graph_hierarchy(g)
|
|
||||||
|
|
||||||
if len(top_graphs) == 1:
|
|
||||||
return top_graphs[0]
|
|
||||||
|
|
||||||
return top_graphs
|
|
||||||
|
|
||||||
|
|
||||||
def update_parent_graph_hierarchy(g, parent_graph=None, level=0):
|
|
||||||
|
|
||||||
if parent_graph is None:
|
|
||||||
parent_graph = g
|
|
||||||
|
|
||||||
for key_name in ('edges', ):
|
|
||||||
|
|
||||||
if isinstance(g, pydot.frozendict):
|
|
||||||
item_dict = g
|
|
||||||
else:
|
|
||||||
item_dict = g.obj_dict
|
|
||||||
|
|
||||||
if not item_dict.has_key(key_name):
|
|
||||||
continue
|
|
||||||
|
|
||||||
for key, objs in item_dict[key_name].items():
|
|
||||||
for obj in objs:
|
|
||||||
if 'parent_graph' in obj and obj['parent_graph'].get_parent_graph(
|
|
||||||
) == g:
|
|
||||||
if obj['parent_graph'] is g:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
obj['parent_graph'].set_parent_graph(parent_graph)
|
|
||||||
|
|
||||||
if key_name == 'edges' and len(key) == 2:
|
|
||||||
for idx, vertex in enumerate(obj['points']):
|
|
||||||
if isinstance(vertex, (pydot.Graph, pydot.Subgraph,
|
|
||||||
pydot.Cluster)):
|
|
||||||
vertex.set_parent_graph(parent_graph)
|
|
||||||
if isinstance(vertex, pydot.frozendict):
|
|
||||||
if vertex['parent_graph'] is g:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
vertex['parent_graph'].set_parent_graph(
|
|
||||||
parent_graph)
|
|
||||||
|
|
||||||
|
|
||||||
def add_defaults(element, defaults):
|
|
||||||
|
|
||||||
d = element.__dict__
|
|
||||||
for key, value in defaults.items():
|
|
||||||
if not d.get(key):
|
|
||||||
d[key] = value
|
|
||||||
|
|
||||||
|
|
||||||
def add_elements(g, toks,
|
|
||||||
defaults_graph=None,
|
|
||||||
defaults_node=None,
|
|
||||||
defaults_edge=None):
|
|
||||||
|
|
||||||
if defaults_graph is None:
|
|
||||||
defaults_graph = {}
|
|
||||||
if defaults_node is None:
|
|
||||||
defaults_node = {}
|
|
||||||
if defaults_edge is None:
|
|
||||||
defaults_edge = {}
|
|
||||||
|
|
||||||
for elm_idx, element in enumerate(toks):
|
|
||||||
|
|
||||||
if isinstance(element, (pydot.Subgraph, pydot.Cluster)):
|
|
||||||
|
|
||||||
add_defaults(element, defaults_graph)
|
|
||||||
g.add_subgraph(element)
|
|
||||||
|
|
||||||
elif isinstance(element, pydot.Node):
|
|
||||||
|
|
||||||
add_defaults(element, defaults_node)
|
|
||||||
g.add_node(element)
|
|
||||||
|
|
||||||
elif isinstance(element, pydot.Edge):
|
|
||||||
|
|
||||||
add_defaults(element, defaults_edge)
|
|
||||||
g.add_edge(element)
|
|
||||||
|
|
||||||
elif isinstance(element, ParseResults):
|
|
||||||
|
|
||||||
for e in element:
|
|
||||||
add_elements(g, [e], defaults_graph, defaults_node,
|
|
||||||
defaults_edge)
|
|
||||||
|
|
||||||
elif isinstance(element, DefaultStatement):
|
|
||||||
|
|
||||||
if element.default_type == 'graph':
|
|
||||||
|
|
||||||
default_graph_attrs = pydot.Node('graph', **element.attrs)
|
|
||||||
g.add_node(default_graph_attrs)
|
|
||||||
|
|
||||||
elif element.default_type == 'node':
|
|
||||||
|
|
||||||
default_node_attrs = pydot.Node('node', **element.attrs)
|
|
||||||
g.add_node(default_node_attrs)
|
|
||||||
|
|
||||||
elif element.default_type == 'edge':
|
|
||||||
|
|
||||||
default_edge_attrs = pydot.Node('edge', **element.attrs)
|
|
||||||
g.add_node(default_edge_attrs)
|
|
||||||
defaults_edge.update(element.attrs)
|
|
||||||
|
|
||||||
else:
|
|
||||||
raise ValueError, "Unknown DefaultStatement: %s " % element.default_type
|
|
||||||
|
|
||||||
elif isinstance(element, P_AttrList):
|
|
||||||
|
|
||||||
g.obj_dict['attributes'].update(element.attrs)
|
|
||||||
|
|
||||||
else:
|
|
||||||
raise ValueError, "Unknown element statement: %r" % element
|
|
||||||
|
|
||||||
|
|
||||||
def push_graph_stmt(str, loc, toks):
|
|
||||||
|
|
||||||
g = pydot.Subgraph('')
|
|
||||||
add_elements(g, toks)
|
|
||||||
return g
|
|
||||||
|
|
||||||
|
|
||||||
def push_subgraph_stmt(str, loc, toks):
|
|
||||||
|
|
||||||
g = pydot.Subgraph('')
|
|
||||||
for e in toks:
|
|
||||||
if len(e) == 3:
|
|
||||||
e[2].set_name(e[1])
|
|
||||||
if e[0] == 'subgraph':
|
|
||||||
e[2].obj_dict['show_keyword'] = True
|
|
||||||
return e[2]
|
|
||||||
else:
|
|
||||||
if e[0] == 'subgraph':
|
|
||||||
e[1].obj_dict['show_keyword'] = True
|
|
||||||
return e[1]
|
|
||||||
|
|
||||||
return g
|
|
||||||
|
|
||||||
|
|
||||||
def push_default_stmt(str, loc, toks):
|
|
||||||
|
|
||||||
# The pydot class instances should be marked as
|
|
||||||
# default statements to be inherited by actual
|
|
||||||
# graphs, nodes and edges.
|
|
||||||
#
|
|
||||||
default_type = toks[0][0]
|
|
||||||
if len(toks) > 1:
|
|
||||||
attrs = toks[1].attrs
|
|
||||||
else:
|
|
||||||
attrs = {}
|
|
||||||
|
|
||||||
if default_type in ['graph', 'node', 'edge']:
|
|
||||||
return DefaultStatement(default_type, attrs)
|
|
||||||
else:
|
|
||||||
raise ValueError, "Unknown default statement: %r " % toks
|
|
||||||
|
|
||||||
|
|
||||||
def push_attr_list(str, loc, toks):
|
|
||||||
|
|
||||||
p = P_AttrList(toks)
|
|
||||||
return p
|
|
||||||
|
|
||||||
|
|
||||||
def get_port(node):
|
|
||||||
|
|
||||||
if len(node) > 1:
|
|
||||||
if isinstance(node[1], ParseResults):
|
|
||||||
if len(node[1][0]) == 2:
|
|
||||||
if node[1][0][0] == ':':
|
|
||||||
return node[1][0][1]
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def do_node_ports(node):
|
|
||||||
|
|
||||||
node_port = ''
|
|
||||||
if len(node) > 1:
|
|
||||||
node_port = ''.join([str(a) + str(b) for a, b in node[1]])
|
|
||||||
|
|
||||||
return node_port
|
|
||||||
|
|
||||||
|
|
||||||
def push_edge_stmt(str, loc, toks):
|
|
||||||
|
|
||||||
tok_attrs = [a for a in toks if isinstance(a, P_AttrList)]
|
|
||||||
attrs = {}
|
|
||||||
for a in tok_attrs:
|
|
||||||
attrs.update(a.attrs)
|
|
||||||
|
|
||||||
e = []
|
|
||||||
|
|
||||||
if isinstance(toks[0][0], pydot.Graph):
|
|
||||||
|
|
||||||
n_prev = pydot.frozendict(toks[0][0].obj_dict)
|
|
||||||
else:
|
|
||||||
n_prev = toks[0][0] + do_node_ports(toks[0])
|
|
||||||
|
|
||||||
if isinstance(toks[2][0], ParseResults):
|
|
||||||
|
|
||||||
n_next_list = [[n.get_name(), ] for n in toks[2][0]]
|
|
||||||
for n_next in [n for n in n_next_list]:
|
|
||||||
n_next_port = do_node_ports(n_next)
|
|
||||||
e.append(pydot.Edge(n_prev, n_next[0] + n_next_port, **attrs))
|
|
||||||
|
|
||||||
elif isinstance(toks[2][0], pydot.Graph):
|
|
||||||
|
|
||||||
e.append(pydot.Edge(n_prev, pydot.frozendict(toks[2][0].obj_dict), **
|
|
||||||
attrs))
|
|
||||||
|
|
||||||
elif isinstance(toks[2][0], pydot.Node):
|
|
||||||
|
|
||||||
node = toks[2][0]
|
|
||||||
|
|
||||||
if node.get_port() is not None:
|
|
||||||
name_port = node.get_name() + ":" + node.get_port()
|
|
||||||
else:
|
|
||||||
name_port = node.get_name()
|
|
||||||
|
|
||||||
e.append(pydot.Edge(n_prev, name_port, **attrs))
|
|
||||||
|
|
||||||
elif isinstance(toks[2][0], type('')):
|
|
||||||
|
|
||||||
for n_next in [n for n in tuple(toks)[2::2]]:
|
|
||||||
|
|
||||||
if isinstance(n_next, P_AttrList) or not isinstance(n_next[0],
|
|
||||||
type('')):
|
|
||||||
continue
|
|
||||||
|
|
||||||
n_next_port = do_node_ports(n_next)
|
|
||||||
e.append(pydot.Edge(n_prev, n_next[0] + n_next_port, **attrs))
|
|
||||||
|
|
||||||
n_prev = n_next[0] + n_next_port
|
|
||||||
|
|
||||||
else:
|
|
||||||
# UNEXPECTED EDGE TYPE
|
|
||||||
pass
|
|
||||||
|
|
||||||
return e
|
|
||||||
|
|
||||||
|
|
||||||
def push_node_stmt(s, loc, toks):
|
|
||||||
|
|
||||||
if len(toks) == 2:
|
|
||||||
attrs = toks[1].attrs
|
|
||||||
else:
|
|
||||||
attrs = {}
|
|
||||||
|
|
||||||
node_name = toks[0]
|
|
||||||
if isinstance(node_name, list) or isinstance(node_name, tuple):
|
|
||||||
if len(node_name) > 0:
|
|
||||||
node_name = node_name[0]
|
|
||||||
|
|
||||||
n = pydot.Node(str(node_name), **attrs)
|
|
||||||
return n
|
|
||||||
|
|
||||||
|
|
||||||
graphparser = None
|
|
||||||
|
|
||||||
|
|
||||||
def graph_definition():
|
|
||||||
|
|
||||||
global graphparser
|
|
||||||
|
|
||||||
if not graphparser:
|
|
||||||
|
|
||||||
# punctuation
|
|
||||||
colon = Literal(":")
|
|
||||||
lbrace = Literal("{")
|
|
||||||
rbrace = Literal("}")
|
|
||||||
lbrack = Literal("[")
|
|
||||||
rbrack = Literal("]")
|
|
||||||
lparen = Literal("(")
|
|
||||||
rparen = Literal(")")
|
|
||||||
equals = Literal("=")
|
|
||||||
comma = Literal(",")
|
|
||||||
dot = Literal(".")
|
|
||||||
slash = Literal("/")
|
|
||||||
bslash = Literal("\\")
|
|
||||||
star = Literal("*")
|
|
||||||
semi = Literal(";")
|
|
||||||
at = Literal("@")
|
|
||||||
minus = Literal("-")
|
|
||||||
|
|
||||||
# keywords
|
|
||||||
strict_ = CaselessLiteral("strict")
|
|
||||||
graph_ = CaselessLiteral("graph")
|
|
||||||
digraph_ = CaselessLiteral("digraph")
|
|
||||||
subgraph_ = CaselessLiteral("subgraph")
|
|
||||||
node_ = CaselessLiteral("node")
|
|
||||||
edge_ = CaselessLiteral("edge")
|
|
||||||
|
|
||||||
# token definitions
|
|
||||||
|
|
||||||
identifier = Word(alphanums + "_.").setName("identifier")
|
|
||||||
|
|
||||||
double_quoted_string = QuotedString('"',
|
|
||||||
multiline=True,
|
|
||||||
unquoteResults=False
|
|
||||||
) # dblQuotedString
|
|
||||||
|
|
||||||
alphastring_ = OneOrMore(CharsNotIn(_noncomma + ' '))
|
|
||||||
|
|
||||||
def parse_html(s, loc, toks):
|
|
||||||
return '<%s>' % ''.join(toks[0])
|
|
||||||
|
|
||||||
opener = '<'
|
|
||||||
closer = '>'
|
|
||||||
html_text = nestedExpr(opener, closer, (CharsNotIn(opener + closer)
|
|
||||||
)).setParseAction(parse_html).leaveWhitespace()
|
|
||||||
|
|
||||||
ID = (identifier | html_text | double_quoted_string |
|
|
||||||
#.setParseAction(strip_quotes) |
|
|
||||||
alphastring_).setName("ID")
|
|
||||||
|
|
||||||
float_number = Combine(
|
|
||||||
Optional(minus) + OneOrMore(Word(nums + "."))).setName(
|
|
||||||
"float_number")
|
|
||||||
|
|
||||||
righthand_id = (float_number | ID).setName("righthand_id")
|
|
||||||
|
|
||||||
port_angle = (at + ID).setName("port_angle")
|
|
||||||
|
|
||||||
port_location = (OneOrMore(Group(colon + ID)) |
|
|
||||||
Group(colon + lparen + ID + comma + ID + rparen)
|
|
||||||
).setName("port_location")
|
|
||||||
|
|
||||||
port = (Group(port_location + Optional(port_angle)) |
|
|
||||||
Group(port_angle + Optional(port_location))).setName("port")
|
|
||||||
|
|
||||||
node_id = (ID + Optional(port))
|
|
||||||
a_list = OneOrMore(ID + Optional(equals + righthand_id) +
|
|
||||||
Optional(comma.suppress())).setName("a_list")
|
|
||||||
|
|
||||||
attr_list = OneOrMore(
|
|
||||||
lbrack.suppress() + Optional(a_list) + rbrack.suppress()).setName(
|
|
||||||
"attr_list")
|
|
||||||
|
|
||||||
attr_stmt = (Group(graph_ | node_ | edge_) + attr_list).setName(
|
|
||||||
"attr_stmt")
|
|
||||||
|
|
||||||
edgeop = (Literal("--") | Literal("->")).setName("edgeop")
|
|
||||||
|
|
||||||
stmt_list = Forward()
|
|
||||||
graph_stmt = Group(
|
|
||||||
lbrace.suppress() + Optional(stmt_list) + rbrace.suppress() +
|
|
||||||
Optional(semi.suppress())).setName("graph_stmt")
|
|
||||||
|
|
||||||
edge_point = Forward()
|
|
||||||
|
|
||||||
edgeRHS = OneOrMore(edgeop + edge_point)
|
|
||||||
edge_stmt = edge_point + edgeRHS + Optional(attr_list)
|
|
||||||
|
|
||||||
subgraph = Group(subgraph_ + Optional(ID) + graph_stmt).setName(
|
|
||||||
"subgraph")
|
|
||||||
|
|
||||||
edge_point << Group(subgraph | graph_stmt |
|
|
||||||
node_id).setName('edge_point')
|
|
||||||
|
|
||||||
node_stmt = (node_id + Optional(attr_list) + Optional(semi.suppress())
|
|
||||||
).setName("node_stmt")
|
|
||||||
|
|
||||||
assignment = (ID + equals + righthand_id).setName("assignment")
|
|
||||||
stmt = (assignment | edge_stmt | attr_stmt | subgraph | graph_stmt |
|
|
||||||
node_stmt).setName("stmt")
|
|
||||||
stmt_list << OneOrMore(stmt + Optional(semi.suppress()))
|
|
||||||
|
|
||||||
graphparser = OneOrMore((Optional(strict_) + Group(
|
|
||||||
(graph_ | digraph_)) + Optional(ID) + graph_stmt
|
|
||||||
).setResultsName("graph"))
|
|
||||||
|
|
||||||
singleLineComment = Group("//" + restOfLine) | Group("#" + restOfLine)
|
|
||||||
|
|
||||||
# actions
|
|
||||||
|
|
||||||
graphparser.ignore(singleLineComment)
|
|
||||||
graphparser.ignore(cStyleComment)
|
|
||||||
|
|
||||||
assignment.setParseAction(push_attr_list)
|
|
||||||
a_list.setParseAction(push_attr_list)
|
|
||||||
edge_stmt.setParseAction(push_edge_stmt)
|
|
||||||
node_stmt.setParseAction(push_node_stmt)
|
|
||||||
attr_stmt.setParseAction(push_default_stmt)
|
|
||||||
|
|
||||||
subgraph.setParseAction(push_subgraph_stmt)
|
|
||||||
graph_stmt.setParseAction(push_graph_stmt)
|
|
||||||
graphparser.setParseAction(push_top_graph_stmt)
|
|
||||||
|
|
||||||
return graphparser
|
|
||||||
|
|
||||||
|
|
||||||
def parse_dot_data(data):
|
|
||||||
|
|
||||||
global top_graphs
|
|
||||||
|
|
||||||
top_graphs = list()
|
|
||||||
|
|
||||||
if data.startswith(codecs.BOM_UTF8):
|
|
||||||
data = data.decode('utf-8')
|
|
||||||
|
|
||||||
try:
|
|
||||||
|
|
||||||
graphparser = graph_definition()
|
|
||||||
|
|
||||||
if pyparsing_version >= '1.2':
|
|
||||||
graphparser.parseWithTabs()
|
|
||||||
|
|
||||||
tokens = graphparser.parseString(data)
|
|
||||||
|
|
||||||
if len(tokens) == 1:
|
|
||||||
return tokens[0]
|
|
||||||
else:
|
|
||||||
return [g for g in tokens]
|
|
||||||
|
|
||||||
except ParseException, err:
|
|
||||||
|
|
||||||
print err.line
|
|
||||||
print " " * (err.column - 1) + "^"
|
|
||||||
print err
|
|
||||||
return None
|
|
@ -36,7 +36,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
|
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
|
||||||
|
|
||||||
|
BIN
src/AO_Basis/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 16 KiB |
@ -40,7 +40,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
||||||
|
|
||||||
|
BIN
src/Bitmask/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 30 KiB |
@ -32,7 +32,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Integrals_Monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec>`_
|
* `Integrals_Monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec>`_
|
||||||
* `Integrals_Bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Bielec>`_
|
* `Integrals_Bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Bielec>`_
|
||||||
|
BIN
src/Determinants/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 59 KiB |
@ -24,7 +24,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
|
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
|
||||||
|
|
||||||
|
BIN
src/Electrons/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 7.7 KiB |
@ -30,15 +30,19 @@ Documentation
|
|||||||
.br
|
.br
|
||||||
|
|
||||||
|
|
||||||
`output_ao_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L1>`_
|
`output_alavi <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L1>`_
|
||||||
|
Output file for Alavi
|
||||||
|
|
||||||
|
|
||||||
|
`output_ao_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L21>`_
|
||||||
Output file for AO_Basis
|
Output file for AO_Basis
|
||||||
|
|
||||||
|
|
||||||
`output_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L21>`_
|
`output_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L41>`_
|
||||||
Output file for Bitmask
|
Output file for Bitmask
|
||||||
|
|
||||||
|
|
||||||
`output_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L41>`_
|
`output_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
|
||||||
Output file for Casino
|
Output file for Casino
|
||||||
|
|
||||||
|
|
||||||
@ -46,75 +50,75 @@ Documentation
|
|||||||
Initial CPU and wall times when printing in the output files
|
Initial CPU and wall times when printing in the output files
|
||||||
|
|
||||||
|
|
||||||
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
|
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
|
||||||
Output file for Determinants
|
Output file for Determinants
|
||||||
|
|
||||||
|
|
||||||
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
|
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L101>`_
|
||||||
Output file for Electrons
|
Output file for Electrons
|
||||||
|
|
||||||
|
|
||||||
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L101>`_
|
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
|
||||||
Output file for Ezfio_files
|
Output file for Ezfio_files
|
||||||
|
|
||||||
|
|
||||||
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
|
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
|
||||||
Output file for Full_CI
|
Output file for Full_CI
|
||||||
|
|
||||||
|
|
||||||
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
|
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
|
||||||
Output file for Generators_full
|
Output file for Generators_full
|
||||||
|
|
||||||
|
|
||||||
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
|
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
|
||||||
Output file for Hartree_Fock
|
Output file for Hartree_Fock
|
||||||
|
|
||||||
|
|
||||||
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
|
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
|
||||||
Output file for Integrals_Bielec
|
Output file for Integrals_Bielec
|
||||||
|
|
||||||
|
|
||||||
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
|
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
|
||||||
Output file for Integrals_Monoelec
|
Output file for Integrals_Monoelec
|
||||||
|
|
||||||
|
|
||||||
`output_loc_cele <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
|
`output_loc_cele <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
|
||||||
Output file for loc_cele
|
Output file for loc_cele
|
||||||
|
|
||||||
|
|
||||||
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
|
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
|
||||||
Output file for MO_Basis
|
Output file for MO_Basis
|
||||||
|
|
||||||
|
|
||||||
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
|
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
|
||||||
Output file for MOGuess
|
Output file for MOGuess
|
||||||
|
|
||||||
|
|
||||||
`output_molden <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
|
`output_molden <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
|
||||||
Output file for Molden
|
Output file for Molden
|
||||||
|
|
||||||
|
|
||||||
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
|
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
|
||||||
Output file for Nuclei
|
Output file for Nuclei
|
||||||
|
|
||||||
|
|
||||||
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
|
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
|
||||||
Output file for Perturbation
|
Output file for Perturbation
|
||||||
|
|
||||||
|
|
||||||
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
|
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
|
||||||
Output file for Properties
|
Output file for Properties
|
||||||
|
|
||||||
|
|
||||||
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
|
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
|
||||||
Output file for Pseudo
|
Output file for Pseudo
|
||||||
|
|
||||||
|
|
||||||
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
|
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
|
||||||
Output file for Selectors_full
|
Output file for Selectors_full
|
||||||
|
|
||||||
|
|
||||||
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
|
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L421>`_
|
||||||
Output file for Utils
|
Output file for Utils
|
||||||
|
|
||||||
|
|
||||||
|
BIN
src/Ezfio_files/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 3.6 KiB |
@ -16,7 +16,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
|
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
|
||||||
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
|
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
|
||||||
|
BIN
src/Integrals_Bielec/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 43 KiB |
@ -4,7 +4,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
|
||||||
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
|
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
|
||||||
|
BIN
src/Integrals_Monoelec/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 39 KiB |
@ -8,7 +8,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Integrals_Monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec>`_
|
* `Integrals_Monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec>`_
|
||||||
|
|
||||||
|
16
src/MOGuess/h_core_guess_routine.irp.f
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
subroutine hcore_guess
|
||||||
|
BEGIN_DOC
|
||||||
|
! Produce `H_core` MO orbital
|
||||||
|
END_DOC
|
||||||
|
implicit none
|
||||||
|
character*(64) :: label
|
||||||
|
mo_coef = ao_ortho_lowdin_coef
|
||||||
|
TOUCH mo_coef
|
||||||
|
label = "Guess"
|
||||||
|
call mo_as_eigvectors_of_mo_matrix(mo_mono_elec_integral, &
|
||||||
|
size(mo_mono_elec_integral,1), &
|
||||||
|
size(mo_mono_elec_integral,2),label)
|
||||||
|
print *, 'save mos'
|
||||||
|
call save_mos
|
||||||
|
SOFT_TOUCH mo_coef mo_label
|
||||||
|
end
|
BIN
src/MOGuess/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 44 KiB |
@ -36,7 +36,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `AO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis>`_
|
* `AO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis>`_
|
||||||
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
|
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
|
||||||
|
BIN
src/MO_Basis/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 26 KiB |
@ -12,7 +12,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
|
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
|
||||||
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
|
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
|
||||||
|
BIN
src/Nuclei/tree_dependency.pdf
Normal file
Before Width: | Height: | Size: 11 KiB |
@ -8,7 +8,7 @@ Needed Modules
|
|||||||
.. Do not edit this section. It was auto-generated from the
|
.. Do not edit this section. It was auto-generated from the
|
||||||
.. by the `update_README.py` script.
|
.. by the `update_README.py` script.
|
||||||
|
|
||||||
.. image:: tree_dependency.png
|
.. image:: tree_dependency.pdf
|
||||||
|
|
||||||
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
|
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
|
||||||
|
|
||||||
|