diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index ea760b382..5fb76566e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -26,10 +26,10 @@ jobs: os: [ubuntu-latest, macos-12] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache conda - uses: actions/cache@v1 + uses: actions/cache@v4 env: CACHE_NUMBER: 0 # Increase this value to reset cache if .github/mrchem-gha.yml has not changed with: @@ -44,7 +44,7 @@ jobs: activate-environment: mrchem-gha environment-file: .github/mrchem-gha.yml channel-priority: true - python-version: 3.9 + python-version: 3.11 use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - name: Configure diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 7dbdec202..306dd833e 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -16,17 +16,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up environment - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true auto-activate-base: false activate-environment: mrchem-codecov environment-file: .github/mrchem-codecov.yml channel-priority: true - python-version: 3.9 + python-version: 3.11 - name: Configure shell: bash -l {0} diff --git a/doc/users/user_ref.rst b/doc/users/user_ref.rst index eab00a744..4bf33681a 100644 --- a/doc/users/user_ref.rst +++ b/doc/users/user_ref.rst @@ -16,14 +16,14 @@ User input reference - Predicates, if present, are the functions run to validate user input. :red:`Keywords` - :world_prec: Overall relative precision in the calculation. + :world_prec: Overall relative precision in the calculation. **Type** ``float`` **Predicates** - ``1.0e-10 < value < 1.0`` - :world_size: Total size of computational domain given as 2**(``world_size``). Always cubic and symmetric around the origin. Negative value means it will be computed from the molecular geometry. + :world_size: Total size of computational domain given as 2**(``world_size``). Always cubic and symmetric around the origin. Negative value means it will be computed from the molecular geometry. **Type** ``int`` @@ -32,7 +32,7 @@ User input reference **Predicates** - ``value <= 10`` - :world_unit: Length unit for *all* coordinates given in user input. Everything will be converted to atomic units (bohr) before the main executable is launched, so the JSON input is *always* given in bohrs. + :world_unit: Length unit for *all* coordinates given in user input. Everything will be converted to atomic units (bohr) before the main executable is launched, so the JSON input is *always* given in bohrs. **Type** ``str`` @@ -41,7 +41,7 @@ User input reference **Predicates** - ``value.lower() in ["bohr", "angstrom"]`` - :world_origin: Global gauge origin of the calculation. + :world_origin: Global gauge origin of the calculation. **Type** ``List[float]`` @@ -51,12207 +51,12225 @@ User input reference - ``len(value) == 3`` :red:`Sections` - :Precisions: Define specific precision parameters. + :Precisions: Define specific precision parameters. :red:`Keywords` - :exchange_prec: Precision parameter used in construction of Exchange operators. Negative value means it will follow the dynamic precision in SCF. - + :exchange_prec: Precision parameter used in construction of Exchange operators. Negative value means it will follow the dynamic precision in SCF. + **Type** ``float`` - + **Default** ``-1.0`` - - :helmholtz_prec: Precision parameter used in construction of Helmholtz operators. Negative value means it will follow the dynamic precision in SCF. - + + :helmholtz_prec: Precision parameter used in construction of Helmholtz operators. Negative value means it will follow the dynamic precision in SCF. + **Type** ``float`` - + **Default** ``-1.0`` - - :poisson_prec: Precision parameter used in construction of Poisson operators. - + + :poisson_prec: Precision parameter used in construction of Poisson operators. + **Type** ``float`` - + **Default** ``user['world_prec']`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :nuclear_prec: Precision parameter used in smoothing and projection of nuclear potential. - + + :nuclear_prec: Precision parameter used in smoothing and projection of nuclear potential. + **Type** ``float`` - + **Default** ``user['world_prec']`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :Printer: Define variables for printed output. + + :Printer: Define variables for printed output. :red:`Keywords` - :print_level: Level of detail in the written output. Level 0 for production calculations, negative level for complete silence. - + :print_level: Level of detail in the written output. Level 0 for production calculations, negative level for complete silence. + **Type** ``int`` - + **Default** ``0`` - - :print_mpi: Write separate output from each MPI to file called ``-.out``. - + + :print_mpi: Write separate output from each MPI to file called ``-.out``. + **Type** ``bool`` - + **Default** ``False`` - - :print_prec: Number of digits in property output (energies will get twice this number of digits). - + + :print_prec: Number of digits in property output (energies will get twice this number of digits). + **Type** ``int`` - + **Default** ``6`` - + **Predicates** - ``0 < value < 10`` - - :print_width: Line width of printed output (in number of characters). - + + :print_width: Line width of printed output (in number of characters). + **Type** ``int`` - + **Default** ``75`` - + **Predicates** - ``50 < value < 100`` - - :print_constants: Print table of physical constants used by MRChem. - + + :print_constants: Print table of physical constants used by MRChem. + **Type** ``bool`` - + **Default** ``False`` - - :Plotter: Give details regarding the density and orbital plots. Three types of plots are available, line, surface and cube, and the plotting ranges are defined by three vectors (A, B and C) and an origin (O): ``line``: plots on line spanned by A, starting from O. ``surf``: plots on surface spanned by A and B, starting from O. ``cube``: plots on volume spanned by A, B and C, starting from O. + + :Plotter: Give details regarding the density and orbital plots. Three types of plots are available, line, surface and cube, and the plotting ranges are defined by three vectors (A, B and C) and an origin (O): ``line``: plots on line spanned by A, starting from O. ``surf``: plots on surface spanned by A and B, starting from O. ``cube``: plots on volume spanned by A, B and C, starting from O. :red:`Keywords` - :path: File path to plot directory. - + :path: File path to plot directory. + **Type** ``str`` - + **Default** ``plots`` - + **Predicates** - ``value[-1] != '/'`` - - :type: Type of plot: line (1D), surface (2D) or cube (3D). - + + :type: Type of plot: line (1D), surface (2D) or cube (3D). + **Type** ``str`` - + **Default** ``cube`` - + **Predicates** - ``value.lower() in ['line', 'surf', 'cube']`` - - :points: Number of points in each direction on the cube grid. - + + :points: Number of points in each direction on the cube grid. + **Type** ``List[int]`` - + **Default** ``[20, 20, 20]`` - + **Predicates** - ``all(p > 0 for p in value)`` - ``not (user['Plotter']['type'] == 'line' and len(value) < 1)`` - ``not (user['Plotter']['type'] == 'surf' and len(value) < 2)`` - ``not (user['Plotter']['type'] == 'cube' and len(value) < 3)`` - - :O: Origin of plotting ranges. - + + :O: Origin of plotting ranges. + **Type** ``List[float]`` - + **Default** ``[0.0, 0.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :A: First boundary vector for plot. - + + :A: First boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[1.0, 0.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :B: Second boundary vector for plot. - + + :B: Second boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[0.0, 1.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :C: Third boundary vector for plot. - + + :C: Third boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[0.0, 0.0, 1.0]`` - + **Predicates** - ``len(value) == 3`` - - :MPI: Define MPI related parameters. + + :MPI: Define MPI related parameters. :red:`Keywords` - :numerically_exact: This will use MPI algorithms that guarantees that the output is invariant wrt the number of MPI processes. - + :numerically_exact: This will use MPI algorithms that guarantees that the output is invariant wrt the number of MPI processes. + **Type** ``bool`` - + **Default** ``False`` - - :shared_memory_size: Size (MB) of the MPI shared memory blocks of each shared function. - + + :shared_memory_size: Size (MB) of the MPI shared memory blocks of each shared function. + **Type** ``int`` - + **Default** ``10000`` - - :share_nuclear_potential: This will use MPI shared memory for the nuclear potential. - + + :share_nuclear_potential: This will use MPI shared memory for the nuclear potential. + **Type** ``bool`` - + **Default** ``False`` - - :share_coulomb_potential: This will use MPI shared memory for the Coulomb potential. - + + :share_coulomb_potential: This will use MPI shared memory for the Coulomb potential. + **Type** ``bool`` - + **Default** ``False`` - - :share_xc_potential: This will use MPI shared memory for the exchange-correlation potential. - + + :share_xc_potential: This will use MPI shared memory for the exchange-correlation potential. + **Type** ``bool`` - + **Default** ``False`` - - :bank_size: Number of MPI processes exclusively dedicated to manage orbital bank. - + + :bank_size: Number of MPI processes exclusively dedicated to manage orbital bank in total. + **Type** ``int`` - + **Default** ``-1`` - - :omp_threads: Force the number of omp threads (leave default is better). - + + :bank_per_node: Number of MPI processes exclusively dedicated to manage orbital bank for each node. + **Type** ``int`` - + **Default** ``-1`` - - :Basis: Define polynomial basis. + + :omp_threads: Force the number of OpenMP threads for workers. + + **Type** ``int`` + + **Default** ``-1`` + + :use_omp_num_threads: Use the environment variable OMP_NUM_THREADS to determine the average number of threads for OMP (NB: banks will use 1 thread, workers may use more threads than OMP_NUM_THREADS). + + **Type** ``bool`` + + **Default** ``false`` + +:Basis: Define polynomial basis. :red:`Keywords` - :order: Polynomial order of multiwavelet basis. Negative value means it will be set automatically based on the world precision. - + :order: Polynomial order of multiwavelet basis. Negative value means it will be set automatically based on the world precision. + **Type** ``int`` - + **Default** ``-1`` - - :type: Polynomial type of multiwavelet basis. - + + :type: Polynomial type of multiwavelet basis. + **Type** ``str`` - + **Default** ``interpolating`` - + **Predicates** - ``value.lower() in ['interpolating', 'legendre']`` - - :Derivatives: Define various derivative operators used in the code. + + :Derivatives: Define various derivative operators used in the code. :red:`Keywords` - :kinetic: Derivative used in kinetic operator. - + :kinetic: Derivative used in kinetic operator. + **Type** ``str`` - + **Default** ``abgv_55`` - - :h_b_dip: Derivative used in magnetic dipole operator. - + + :h_b_dip: Derivative used in magnetic dipole operator. + **Type** ``str`` - + **Default** ``abgv_00`` - - :h_m_pso: Derivative used in paramagnetic spin-orbit operator. - + + :h_m_pso: Derivative used in paramagnetic spin-orbit operator. + **Type** ``str`` - + **Default** ``abgv_00`` - - :zora: Derivative used ZORA potential. - + + :zora: Derivative used ZORA potential. + **Type** ``str`` - + **Default** ``abgv_00`` - - :Molecule: Define molecule. + + :Molecule: Define molecule. :red:`Keywords` - :charge: Total charge of molecule. - + :charge: Total charge of molecule. + **Type** ``int`` - + **Default** ``0`` - - :multiplicity: Spin multiplicity of molecule. - + + :multiplicity: Spin multiplicity of molecule. + **Type** ``int`` - + **Default** ``1`` - + **Predicates** - ``value > 0`` - - :translate: Translate coordinates such that center of mass coincides with the global gauge origin. - + + :translate: Translate coordinates such that center of mass coincides with the global gauge origin. + **Type** ``bool`` - + **Default** ``False`` - - :coords: Coordinates in xyz format. Atoms can be given either using atom symbol or atom number - + + :coords: Coordinates in xyz format. Atoms can be given either using atom symbol or atom number + **Type** ``str`` - - :WaveFunction: Define the wavefunction method. + + :WaveFunction: Define the wavefunction method. :red:`Keywords` - :method: Wavefunction method. See predicates for valid methods. ``hf``, ``hartreefock`` and ``hartree-fock`` all mean the same thing, while ``lda`` is an alias for ``svwn5``. You can set a non-standard DFT functional (e.g. varying the amount of exact exchange) by choosing ``dft`` and specifing the functional(s) in the ``DFT`` section below. - + :method: Wavefunction method. See predicates for valid methods. ``hf``, ``hartreefock`` and ``hartree-fock`` all mean the same thing, while ``lda`` is an alias for ``svwn5``. You can set a non-standard DFT functional (e.g. varying the amount of exact exchange) by choosing ``dft`` and specifing the functional(s) in the ``DFT`` section below. + **Type** ``str`` - + **Predicates** - ``value.lower() in ['core', 'hartree', 'hf', 'hartreefock', 'hartree-fock', 'dft', 'lda', 'svwn3', 'svwn5', 'pbe', 'pbe0', 'bpw91', 'bp86', 'b3p86', 'b3p86-g', 'blyp', 'b3lyp', 'b3lyp-g', 'olyp', 'kt1', 'kt2', 'kt3']`` - - :restricted: Use spin restricted wavefunction. - + + :restricted: Use spin restricted wavefunction. + **Type** ``bool`` - + **Default** ``True`` - - :relativity: Set method for relativistic treatment. ``ZORA`` for fully self-consistent ZORA potential, by default including all potentials (``V_nuc``, ``J``, ``V_xc``) but this can be overwritten in the ``ZORA`` section. ``nZORA`` is shortcut for nuclear-ZORA, i.e. only ``V_nuc`` is included (this keyword takes precedence over keywords in the ``ZORA`` section). ``azora`` uses atomic ZORA potentials, which are precomputed and read from the directory specified in the ``azora_potential_path`` keyword. - + + :relativity: Set method for relativistic treatment. ``ZORA`` for fully self-consistent ZORA potential, by default including all potentials (``V_nuc``, ``J``, ``V_xc``) but this can be overwritten in the ``ZORA`` section. ``nZORA`` is shortcut for nuclear-ZORA, i.e. only ``V_nuc`` is included (this keyword takes precedence over keywords in the ``ZORA`` section). ``azora`` uses atomic ZORA potentials, which are precomputed and read from the directory specified in the ``azora_potential_path`` keyword. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** + - ``value.lower() in ['none', 'zora', 'nzora', 'azora']`` - - :environment: Set method for treatment of environment. ``none`` for vacuum calculation. ``PCM`` for Polarizable Continuum Model, which will activate the ``PCM`` input section for further parametrization options. The ``PB`` and ``LPB`` variants add the Poisson-Boltzmann and Linearized Poisson-Boltzmann solvers, respectively. - + + :environment: Set method for treatment of environment. ``none`` for vacuum calculation. ``PCM`` for Polarizable Continuum Model, which will activate the ``PCM`` input section for further parametrization options. The ``PB`` and ``LPB`` variants add the Poisson-Boltzmann and Linearized Poisson-Boltzmann solvers, respectively. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** - ``value.lower() in ['none', 'pcm', 'pcm_pb', 'pcm_lpb']`` - - :nuclear_model: Type of nucleus model. Point-like (numerical smoothing): HFYGB (default), parabola or minimal. Finite models (physical smoothing): Gaussian or Homogeneous sphere Finite models are derived from nuclear RMS radius, Visscher (1997) - + + :nuclear_model: Type of nucleus model. Point-like (numerical smoothing): HFYGB (default), parabola or minimal. Finite models (physical smoothing): Gaussian or Homogeneous sphere Finite models are derived from nuclear RMS radius, Visscher (1997) + **Type** ``str`` - + **Default** ``point_like`` - + **Predicates** - ``value.lower() in ['point_like', 'point_parabola', 'point_minimal', 'finite_gaussian', 'finite_sphere']`` - - :ZORA: Define required parameters for the ZORA Hamiltonian. + + :ZORA: Define required parameters for the ZORA Hamiltonian. :red:`Keywords` - :include_nuclear: Include the nuclear potential ``V_nuc`` in the ZORA potential. - + :include_nuclear: Include the nuclear potential ``V_nuc`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :include_coulomb: Include the Coulomb potential ``J`` in the ZORA potential. - + + :include_coulomb: Include the Coulomb potential ``J`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :include_xc: Include the XC potential ``V_xc`` in the ZORA potential. - + + :include_xc: Include the XC potential ``V_xc`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :azora_potential_path: Path to the directory containing the AZORA potentials. If not specified, the default potentials will be used. Look into the readme file in the share/azora_potentials directory for information about the potential file format. - + + :azora_potential_path: Path to the directory containing the AZORA potentials. If not specified, the default potentials will be used. Look into the readme file in the share/azora_potentials directory for information about the potential file format. + **Type** ``str`` - + **Default** ``none`` - - :DFT: Define the exchange-correlation functional in case of DFT. + + :DFT: Define the exchange-correlation functional in case of DFT. :red:`Keywords` - :density_cutoff: Hard cutoff for passing density values to XCFun. - + :density_cutoff: Hard cutoff for passing density values to XCFun. + **Type** ``float`` - + **Default** ``0.0`` - - :functionals: List of density functionals with numerical coefficient. E.g. for PBE0 ``EXX 0.25``, ``PBEX 0.75``, ``PBEC 1.0``, see XCFun documentation _. - + + :functionals: List of density functionals with numerical coefficient. E.g. for PBE0 ``EXX 0.25``, ``PBEX 0.75``, ``PBEC 1.0``, see XCFun documentation _. + **Type** ``str`` - + **Default** `` `` - - :spin: Use spin separated density functionals. - + + :spin: Use spin separated density functionals. + **Type** ``bool`` - + **Default** ``not(user['WaveFunction']['restricted'])`` - - :Properties: Provide a list of properties to compute (total SCF energy and orbital energies are always computed). + + :Properties: Provide a list of properties to compute (total SCF energy and orbital energies are always computed). :red:`Keywords` - :dipole_moment: Compute dipole moment. - + :dipole_moment: Compute dipole moment. + **Type** ``bool`` - + **Default** ``True`` - - :quadrupole_moment: Compute quadrupole moment. Note: Gauge origin dependent, should be used with ``translate = true`` in Molecule. - + + :quadrupole_moment: Compute quadrupole moment. Note: Gauge origin dependent, should be used with ``translate = true`` in Molecule. + **Type** ``bool`` - + **Default** ``False`` - - :polarizability: Compute polarizability tensor. - + + :polarizability: Compute polarizability tensor. + **Type** ``bool`` - + **Default** ``False`` - - :magnetizability: Compute magnetizability tensor. - + + :magnetizability: Compute magnetizability tensor. + **Type** ``bool`` - + **Default** ``False`` - - :nmr_shielding: Compute NMR shielding tensor. - + + :nmr_shielding: Compute NMR shielding tensor. + **Type** ``bool`` - + **Default** ``False`` - - :plot_density: Plot converged electron density. - + + :plot_density: Plot converged electron density. + **Type** ``bool`` - + **Default** ``False`` - - :plot_orbitals: Plot converged molecular orbitals from list of indices, negative index plots all orbitals. - + + :plot_orbitals: Plot converged molecular orbitals from list of indices, negative index plots all orbitals. + **Type** ``List[int]`` - + **Default** ``[]`` - - :hirshfeld_charges: Compute Hirshfeld charges. - + + :hirshfeld_charges: Compute Hirshfeld charges. + **Type** ``bool`` - + **Default** ``False`` - - :geometric_derivative: Compute geometric derivative. - + + :geometric_derivative: Compute geometric derivative. + **Type** ``bool`` - + **Default** ``user['GeometryOptimizer']['run']`` - - :Forces: Define parameters for the computation of forces. + + :Forces: Define parameters for the computation of forces. :red:`Keywords` - :method: Method for computing forces. ``surface_integrals`` (more accurate) uses surface integrals over the quantum mechanical stress tensor, while ``hellmann_feynman`` uses the Hellmann-Feynman theorem. - + :method: Method for computing forces. ``surface_integrals`` (more accurate) uses surface integrals over the quantum mechanical stress tensor, while ``hellmann_feynman`` uses the Hellmann-Feynman theorem. + **Type** ``str`` - + **Default** ``surface_integrals`` - + **Predicates** - ``value.lower() in ['surface_integrals', 'hellmann_feynman']`` - - :surface_integral_precision: Precision of the surface integrals used in the computation of forces. Determines the number of Lebedev grid points used in the surface integration. - + + :surface_integral_precision: Precision of the surface integrals used in the computation of forces. Determines the number of Lebedev grid points used in the surface integration. + **Type** ``str`` - + **Default** ``medium`` - + **Predicates** - ``value.lower() in ['low', 'medium', 'high']`` - - :radius_factor: Sets the radius of the surface used in the computation of forces. The radius is given by this factor times the distance to the neariest neighbour. Must be between 0.1 and 0.9. This should rarely need to be changed. Different values can change the accuracy of the forces. - + + :radius_factor: Sets the radius of the surface used in the computation of forces. The radius is given by this factor times the distance to the neariest neighbour. Must be between 0.1 and 0.9. This should rarely need to be changed. Different values can change the accuracy of the forces. + **Type** ``float`` - + **Default** ``0.5`` - - :ExternalFields: Define external electromagnetic fields. + + :ExternalFields: Define external electromagnetic fields. :red:`Keywords` - :electric_field: Strength of external electric field. - + :electric_field: Strength of external electric field. + **Type** ``List[float]`` - + **Default** ``[]`` - + **Predicates** - ``len(value) == 0 or len(value) == 3`` - - :Polarizability: Give details regarding the polarizability calculation. + + :Polarizability: Give details regarding the polarizability calculation. :red:`Keywords` - :frequency: List of external field frequencies. - + :frequency: List of external field frequencies. + **Type** ``List[float]`` - + **Default** ``[0.0]`` - - :NMRShielding: Give details regarding the NMR shileding calculation. + + :NMRShielding: Give details regarding the NMR shileding calculation. :red:`Keywords` - :nuclear_specific: Use nuclear specific perturbation operator (h_m_pso). - + :nuclear_specific: Use nuclear specific perturbation operator (h_m_pso). + **Type** ``bool`` - + **Default** ``False`` - - :nucleus_k: List of nuclei to compute. Negative value computes all nuclei. - + + :nucleus_k: List of nuclei to compute. Negative value computes all nuclei. + **Type** ``List[int]`` - + **Default** ``[-1]`` - - :Files: Defines file paths used for program input/output. Note: all paths must be given in quotes if they contain slashes "path/to/file". + + :Files: Defines file paths used for program input/output. Note: all paths must be given in quotes if they contain slashes "path/to/file". :red:`Keywords` - :guess_basis: File name for GTO basis set, used with ``gto`` guess. - + :guess_basis: File name for GTO basis set, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.bas`` - - :guess_gto_p: File name for paired orbitals, used with ``gto`` guess. - + + :guess_gto_p: File name for paired orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.mop`` - - :guess_gto_a: File name for alpha orbitals, used with ``gto`` guess. - + + :guess_gto_a: File name for alpha orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.moa`` - - :guess_gto_b: File name for beta orbitals, used with ``gto`` guess. - + + :guess_gto_b: File name for beta orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.mob`` - - :guess_phi_p: File name for paired orbitals, used with ``mw`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.mw - + + :guess_phi_p: File name for paired orbitals, used with ``mw`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_p`` - - :guess_phi_a: File name for alpha orbitals, used with ``mw`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.mw - + + :guess_phi_a: File name for alpha orbitals, used with ``mw`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_a`` - - :guess_phi_b: File name for beta orbitals, used with ``mw`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.mw - + + :guess_phi_b: File name for beta orbitals, used with ``mw`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_b`` - - :guess_x_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/x_p_rsp_idx_<0...Np>_.mw - + + :guess_x_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/x_p_rsp_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_p`` - - :guess_x_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/x_a_rsp_idx_<0...Na>_.mw - + + :guess_x_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/x_a_rsp_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_a`` - - :guess_x_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/x_b_rsp_idx_<0...Nb>_.mw - + + :guess_x_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/x_b_rsp_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_b`` - - :guess_y_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/y_p_rsp_idx_<0...Np>_.mw - + + :guess_y_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/y_p_rsp_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_p`` - - :guess_y_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/y_a_rsp_idx_<0...Na>_.mw - + + :guess_y_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/y_a_rsp_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_a`` - - :guess_y_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/y_b_rsp_idx_<0...Nb>_.mw - + + :guess_y_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/y_b_rsp_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_b`` - - :guess_cube_p: File name for paired orbitals, used with ``cube`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_p: File name for paired orbitals, used with ``cube`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_p`` - - :guess_cube_a: File name for alpha orbitals, used with ``cube`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_a: File name for alpha orbitals, used with ``cube`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_a`` - - :guess_cube_b: File name for beta orbitals, used with ``cube`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_b: File name for beta orbitals, used with ``cube`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_b`` - - :guess_cube_x_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/x_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/x_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_p`` - - :guess_cube_x_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/x_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/x_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_a`` - - :guess_cube_x_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/x_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/x_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_b`` - - :guess_cube_y_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/y_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/y_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_p`` - - :guess_cube_y_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/y_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/y_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_a`` - - :guess_cube_y_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/y_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/y_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_b`` - - :cube_vectors: Directory where cube vectors are stored for mrchem calculation. - + + :cube_vectors: Directory where cube vectors are stored for mrchem calculation. + **Type** ``str`` - + **Default** ``cube_vectors/`` - - :SCF: Includes parameters related to the ground state SCF orbital optimization. + + :SCF: Includes parameters related to the ground state SCF orbital optimization. :red:`Keywords` - :run: Run SCF solver. Otherwise properties are computed on the initial orbitals. - + :run: Run SCF solver. Otherwise properties are computed on the initial orbitals. + **Type** ``bool`` - + **Default** ``True`` - - :max_iter: Maximum number of SCF iterations. - + + :max_iter: Maximum number of SCF iterations. + **Type** ``int`` - + **Default** ``100`` - - :kain: Length of KAIN iterative history. - + + :kain: Length of KAIN iterative history. + **Type** ``int`` - + **Default** ``5`` - - :rotation: Number of iterations between each diagonalization/localization. - + + :rotation: Number of iterations between each diagonalization/localization. + **Type** ``int`` - + **Default** ``0`` - - :localize: Use canonical or localized orbitals. - + + :localize: Use canonical or localized orbitals. + **Type** ``bool`` - + **Default** ``False`` - - :energy_thrs: Convergence threshold for SCF energy. - + + :energy_thrs: Convergence threshold for SCF energy. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_prec: Precision parameter used in construction of initial guess. - + + :guess_prec: Precision parameter used in construction of initial guess. + **Type** ``float`` - + **Default** ``0.001`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :guess_screen: Screening parameter used in GTO evaluations, in number of standard deviations. Every coordinate beyond N StdDev from the Gaussian center is evaluated to zero. Note that too aggressive screening is counter productive, because it leads to a sharp cutoff in the resulting function which requires higher grid refinement. Negative value means no screening. - + + :guess_screen: Screening parameter used in GTO evaluations, in number of standard deviations. Every coordinate beyond N StdDev from the Gaussian center is evaluated to zero. Note that too aggressive screening is counter productive, because it leads to a sharp cutoff in the resulting function which requires higher grid refinement. Negative value means no screening. + **Type** ``float`` - + **Default** ``12.0`` - - :start_prec: Incremental precision in SCF iterations, initial value. - + + :start_prec: Incremental precision in SCF iterations, initial value. + **Type** ``float`` - + **Default** ``-1.0`` - - :final_prec: Incremental precision in SCF iterations, final value. - + + :final_prec: Incremental precision in SCF iterations, final value. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_type: Type of initial guess for ground state orbitals. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. This will load MRA and electron spin configuration directly from the checkpoint files, which are thus required to be identical in the two calculations. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` keyword. The orbitals will be re-projected into the new computational setup, which means that the electron spin configuration and MRA can be different in the two calculations. ``gto`` reads precomputed GTO orbitals (requires extra non-standard input files for basis set and MO coefficients). ``core`` and ``sad`` will diagonalize the Fock matrix in the given AO basis (SZ, DZ, TZ or QZ) using a Core or Superposition of Atomic Densities Hamiltonian, respectively. ``cube`` will start from orbitals saved in cubefiles from external calculations. - + + :guess_type: Type of initial guess for ground state orbitals. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. This will load MRA and electron spin configuration directly from the checkpoint files, which are thus required to be identical in the two calculations. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` or ``write_orbitals_txt`` keyword. The orbitals will be re-projected into the new computational setup, which means that the electron spin configuration and MRA can be different in the two calculations. ``gto`` reads precomputed GTO orbitals (requires extra non-standard input files for basis set and MO coefficients). ``core`` and ``sad`` will diagonalize the Fock matrix in the given AO basis (SZ, DZ, TZ or QZ) using a Core or Superposition of Atomic Densities Hamiltonian, respectively. ``cube`` will start from orbitals saved in cubefiles from external calculations. + **Type** ``str`` - + **Default** ``sad_gto`` - + **Predicates** - ``value.lower() in ['mw', 'chk', 'gto', 'core_sz', 'core_dz', 'core_tz', 'core_qz', 'sad_sz', 'sad_dz', 'sad_tz', 'sad_qz', 'sad_gto', 'cube']`` - - :write_checkpoint: Write orbitals to disk in each iteration, file name ``/phi_scf_idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. Note: must be given in quotes if there are slashes in the path "path/to/checkpoint". - + + :write_checkpoint: Write orbitals to disk in each iteration, file name ``/phi_scf_idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. Note: must be given in quotes if there are slashes in the path "path/to/checkpoint". + **Type** ``bool`` - + **Default** ``False`` - - :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. - + + :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. + **Type** ``str`` - + **Default** ``checkpoint`` - + **Predicates** - ``value[-1] != '/'`` - - :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. Note: must be given in quotes if there are slashes in the path "path/to/orbitals". - + + :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. Note: must be given in quotes if there are slashes in the path "path/to/orbitals". + **Type** ``str`` - + **Default** ``orbitals`` - + **Predicates** - ``value[-1] != '/'`` - - :guess_rotate: Localize/Diagonalize the initial guess orbitals before calculating the initial guess energy. - + + :guess_rotate: Localize/Diagonalize the initial guess orbitals before calculating the initial guess energy. + **Type** ``bool`` - + **Default** ``True`` - - :write_orbitals: Write final orbitals to disk, file name ``/phi_

_scf_idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. - + + :write_orbitals: Write final orbitals to disk, file name ``/phi_

_scf_idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. + **Type** ``bool`` - + **Default** ``user['GeometryOptimizer']['use_previous_guess']`` - - :orbital_thrs: Convergence threshold for orbital residuals. - + + :orbital_thrs: Convergence threshold for orbital residuals. + **Type** ``float`` - + **Default** ``10 * user['world_prec']`` - - :Response: Includes parameters related to the response SCF optimization. + + :Response: Includes parameters related to the response SCF optimization. :red:`Keywords` - :run: In which Cartesian directions to run response solver. - + :run: In which Cartesian directions to run response solver. + **Type** ``List[bool]`` - + **Default** ``[True, True, True]`` - - :max_iter: Maximum number of response iterations. - + + :max_iter: Maximum number of response iterations. + **Type** ``int`` - + **Default** ``100`` - - :kain: Length of KAIN iterative history. - + + :kain: Length of KAIN iterative history. + **Type** ``int`` - + **Default** ``5`` - - :property_thrs: Convergence threshold for symmetric property. Symmetric meaning the property computed from the same operator as the response purturbation, e.g. for external magnetic field the symmetric property corresponds to the magnetizability (NMR shielding in non-symmetric, since one of the operators is external magnetic field, while the other is nuclear magnetic moment). - + + :property_thrs: Convergence threshold for symmetric property. Symmetric meaning the property computed from the same operator as the response purturbation, e.g. for external magnetic field the symmetric property corresponds to the magnetizability (NMR shielding in non-symmetric, since one of the operators is external magnetic field, while the other is nuclear magnetic moment). + **Type** ``float`` - + **Default** ``-1.0`` - - :start_prec: Incremental precision in SCF iterations, initial value. - + + :start_prec: Incremental precision in SCF iterations, initial value. + **Type** ``float`` - + **Default** ``-1.0`` - - :final_prec: Incremental precision in SCF iterations, final value. - + + :final_prec: Incremental precision in SCF iterations, final value. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_prec: Precision parameter used in construction of initial guess. - + + :guess_prec: Precision parameter used in construction of initial guess. + **Type** ``float`` - + **Default** ``0.001`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :guess_type: Type of initial guess for response. ``none`` will start from a zero guess for the response functions. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` keyword. The orbitals will be re-projected into the new computational setup. - + + :guess_type: Type of initial guess for response. ``none`` will start from a zero guess for the response functions. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` or the ``write_orbitals_txt`` keyword. The orbitals will be re-projected into the new computational setup. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** - ``value.lower() in ['none', 'chk', 'mw', 'cube']`` - - :write_checkpoint: Write perturbed orbitals to disk in each iteration, file name ``/_rsp__idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. - + + :write_checkpoint: Write perturbed orbitals to disk in each iteration, file name ``/_rsp__idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. + **Type** ``bool`` - + **Default** ``False`` - - :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. - + + :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. + **Type** ``str`` - + **Default** ``checkpoint`` - + **Predicates** - ``value[-1] != '/'`` - - :write_orbitals: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. - + + :write_orbitals: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. + + **Type** ``bool`` + + **Default** ``False`` + + :write_orbitals_txt: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. The orbitals are written in a readable and portable text format. + **Type** ``bool`` - + **Default** ``False`` - - :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. - + + :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` or ``write_orbitals_txt`` keyword. + **Type** ``str`` - + **Default** ``orbitals`` - + **Predicates** - ``value[-1] != '/'`` - - :orbital_thrs: Convergence threshold for orbital residuals. - + + :orbital_thrs: Convergence threshold for orbital residuals. + **Type** ``float`` - + **Default** ``10 * user['world_prec']`` - - :localize: Use canonical or localized unperturbed orbitals. - + + :localize: Use canonical or localized unperturbed orbitals. + **Type** ``bool`` - + **Default** ``user['SCF']['localize']`` - - :PCM: Includes parameters related to the computation of the reaction field energy of a system in an environment within the Polarizable Continuum Model. + + :PCM: Includes parameters related to the computation of the reaction field energy of a system in an environment within the Polarizable Continuum Model. :red:`Sections` - :SCRF: Parameters for the Self-Consistent Reaction Field optimization. - + :SCRF: Parameters for the Self-Consistent Reaction Field optimization. + :red:`Keywords` - :max_iter: Max number of iterations allowed in the nested procedure. - + :max_iter: Max number of iterations allowed in the nested procedure. + **Type** ``int`` - + **Default** ``100`` - - :dynamic_thrs: Set the convergence threshold for the nested procedure. ``true`` will dynamically tighten the convergence threshold based on the absolute value of the latest orbital update as. When the orbitals are close to convergence (``mo_residual < world_prec*10``) the convergence threshold will be set equal to ``world_prec``. ``false`` uses ``world_prec`` as convergence threshold throughout. - + + :dynamic_thrs: Set the convergence threshold for the nested procedure. ``true`` will dynamically tighten the convergence threshold based on the absolute value of the latest orbital update as. When the orbitals are close to convergence (``mo_residual < world_prec*10``) the convergence threshold will be set equal to ``world_prec``. ``false`` uses ``world_prec`` as convergence threshold throughout. + **Type** ``bool`` - + **Default** ``True`` - - :density_type: What part of the total molecular charge density to use in the algorithm. ``total`` uses the total charge density. ``nuclear`` uses only the nuclear part of the total charge density. ``electronic`` uses only the electronic part of the total charge density. - + + :density_type: What part of the total molecular charge density to use in the algorithm. ``total`` uses the total charge density. ``nuclear`` uses only the nuclear part of the total charge density. ``electronic`` uses only the electronic part of the total charge density. + **Type** ``str`` - + **Default** ``total`` - + **Predicates** - ``value.lower() in ['total', 'nuclear', 'electronic']`` - - :kain: Number of previous reaction field iterates kept for convergence acceleration during the nested precedure. - + + :kain: Number of previous reaction field iterates kept for convergence acceleration during the nested precedure. + **Type** ``int`` - + **Default** ``user['SCF']['kain']`` - - :Solvent: Parameters for the Self-Consistent Reaction Field optimization. - + + :Solvent: Parameters for the Self-Consistent Reaction Field optimization. + :red:`Sections` - :Permittivity: Parameters for the permittivity function. - + :Permittivity: Parameters for the permittivity function. + :red:`Keywords` - :epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour. - + :epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour. + **Type** ``float`` - + **Default** ``1.0`` - - :formulation: Formulation of the Permittivity function. Currently only the exponential is available. - + + :formulation: Formulation of the Permittivity function. Currently only the exponential is available. + **Type** ``str`` - + **Default** ``exponential`` - + **Predicates** - ``value.lower() in ['exponential']`` - + :red:`Sections` - :epsilon_out: Parameters for the continuum solvent outside the cavity. - + :epsilon_out: Parameters for the continuum solvent outside the cavity. + :red:`Keywords` - :nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false. - + :nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false. + **Type** ``bool`` - + **Default** ``False`` - - :static: Static permittivity outside the cavity. This is characteristic of the solvent used. - + + :static: Static permittivity outside the cavity. This is characteristic of the solvent used. + **Type** ``float`` - + **Default** ``1.0`` - - :dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`. - + + :dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`. + **Type** ``float`` - + **Default** ``user['PCM']['Solvent']['Permittivity']['epsilon_out']['static']`` - - :DebyeHuckelScreening: Parameters for the Debye-Huckel screening factor - + + :DebyeHuckelScreening: Parameters for the Debye-Huckel screening factor + :red:`Keywords` - :ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent. - + :ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent. + **Type** ``float`` - + **Default** ``1.0`` - - :ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms. - + + :ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms. + **Type** ``float`` - + **Default** ``0.0`` - - :ion_width: Width of the transition between the solute and the ion accessible part. - + + :ion_width: Width of the transition between the solute and the ion accessible part. + **Type** ``float`` - + **Default** ``0.2`` - - :formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out - + + :formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out + **Type** ``str`` - + **Default** ``variable`` - + **Predicates** - ``value.lower() in ['variable']`` - - :Cavity: Define the interlocking spheres cavity. - + + :Cavity: Define the interlocking spheres cavity. + :red:`Keywords` - :mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block. - + :mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block. + **Type** ``str`` - + **Default** ``atoms`` - + **Predicates** - ``value.lower() in ['atoms', 'explicit']`` - - :spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient. - + + :spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient. + **Type** ``str`` - + **Default** ```` - - :alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. - + + :alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. + **Type** ``float`` - + **Default** ``1.1`` - - :beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. - + + :beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. + **Type** ``float`` - + **Default** ``0.5`` - - :sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**. - + + :sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**. + **Type** ``float`` - + **Default** ``0.2`` - - :GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES. Geometry optimizations require accurate forces. Consider setting world_prec to 1e-5 to 1e-7. Convergence issues can usually be solved by increasing the precision of the SCF calculation. If that does not work, try setting the initial step size manually. + + :GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES. Geometry optimizations require accurate forces. Consider setting world_prec to 1e-5 to 1e-7. Convergence issues can usually be solved by increasing the precision of the SCF calculation. If that does not work, try setting the initial step size manually. :red:`Keywords` - :run: Run optimizer. Otherwise single point energy/properties are computed. - + :run: Run optimizer. Otherwise single point energy/properties are computed. + **Type** ``bool`` - + **Default** ``False`` - - :use_previous_guess: Start each SCF from the converged orbitals from the previous geometry step. The guess_type will change to "mw" after the first iteration, and the intermediate orbitals will be stored in the "orbitals" directory. If toggled off, start over using the same initial guess method as in the first iteration. - + + :use_previous_guess: Start each SCF from the converged orbitals from the previous geometry step. The guess_type will change to "mw" after the first iteration, and the intermediate orbitals will be stored in the "orbitals" directory. If toggled off, start over using the same initial guess method as in the first iteration. + **Type** ``bool`` - + **Default** ``False`` - - :init_step_size: Initial step size. For systems with hard bonds (e.g. C-C) use a value between and 1.0 and 2.5. If a system only contains weaker bonds a value up to 5.0 may speed up the convergence. Use a small negative number (should be between -0.1 and -0.5) for an automatic guess. The optimal step size is the inverse of the largest eigenvalue of the hessian matrix. - + + :init_step_size: Initial step size. For systems with hard bonds (e.g. C-C) use a value between and 1.0 and 2.5. If a system only contains weaker bonds a value up to 5.0 may speed up the convergence. Use a small negative number (should be between -0.1 and -0.5) for an automatic guess. The optimal step size is the inverse of the largest eigenvalue of the hessian matrix. + **Type** ``float`` - + **Default** ``-0.5`` - - :minimal_step_size: Minimal step size. It rarely makes sense to change it. - + + :minimal_step_size: Minimal step size. It rarely makes sense to change it. + **Type** ``float`` - + **Default** ``0.01`` - - :max_history_length: Maximum length of history list. Energies and forces from the previous n geometry optimization iterations are used to estimate the hessian matrix. Use a value between 2 and 20. A lower value makes the SQNM algorithm behave more like steepest descent and slows down convergence. But it can handle more noise in the energies and forces. It rarely makes sense to change it. - + + :max_history_length: Maximum length of history list. Energies and forces from the previous n geometry optimization iterations are used to estimate the hessian matrix. Use a value between 2 and 20. A lower value makes the SQNM algorithm behave more like steepest descent and slows down convergence. But it can handle more noise in the energies and forces. It rarely makes sense to change it. + **Type** ``int`` - + **Default** ``10`` - - :subspace_tolerance: Lower limit on linear dependencies of basis vectors in history listSubspace tolerance. Use a number between 1e-9 and 1e-1. A high subspace tolerance slows down convergence but improves numerical stability when the energies and forces contain a lot of noise. It rarely makes sense to change it. - + + :subspace_tolerance: Lower limit on linear dependencies of basis vectors in history listSubspace tolerance. Use a number between 1e-9 and 1e-1. A high subspace tolerance slows down convergence but improves numerical stability when the energies and forces contain a lot of noise. It rarely makes sense to change it. + **Type** ``float`` - + **Default** ``0.001`` - - :max_iter: Maximum number of geometry optimization iterations. - + + :max_iter: Maximum number of geometry optimization iterations. + **Type** ``int`` - + **Default** ``100`` - - :max_force_component: The geometry optimization stopps when the absolute value of all force components is smaller than this keyword. A value between 1e-3 and 1e-4 is tight enough for most applications. - + + :max_force_component: The geometry optimization stopps when the absolute value of all force components is smaller than this keyword. A value between 1e-3 and 1e-4 is tight enough for most applications. + **Type** ``float`` - + **Default** ``0.005`` - + :Constants: Physical and mathematical constants used by MRChem :red:`Keywords` :hartree2simagnetizability: | Conversion factor for magnetizability from atomic units to SI units (unit: J T^-2). Affected code: Printed value of the magnetizability property. - + **Type** ``float`` - + **Default** ``78.9451185`` - + :light_speed: | Speed of light in atomic units (unit: au). Affected code: Relativistic Hamiltonians (ZORA, etc.) - + **Type** ``float`` - + **Default** ``137.035999084`` - + :angstrom2bohrs: | Conversion factor for Cartesian coordinates from Angstrom to Bohr (unit: Å^-1). Affected code: Parsing of input coordinates, printed coordinates - + **Type** ``float`` - + **Default** ``1.8897261246257702`` - + :hartree2kjmol: | Conversion factor from Hartree to kJ/mol (unit: kJ mol^-1). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``2625.4996394798254`` - + :hartree2kcalmol: | Conversion factor from Hartree to kcal/mol (unit: kcal mol^-1). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``627.5094740630558`` - + :hartree2ev: | Conversion factor from Hartree to eV (unit: ev). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``27.211386245988`` - + :hartree2wavenumbers: | Conversion factor from Hartree to wavenumbers (unit: cm^-1). Affected code: Printed value of frequencies. - + **Type** ``float`` - + **Default** ``219474.6313632`` - + :fine_structure_constant: | Fine-structure constant in atomic units (unit: au). Affected code: Certain magnetic interaction operators. - + **Type** ``float`` - + **Default** ``0.0072973525693`` - + :electron_g_factor: | Electron g factor in atomic units (unit: au). Affected code: Certain magnetic interaction operators. - + **Type** ``float`` - + **Default** ``-2.00231930436256`` - + :dipmom_au2debye: | Conversion factor for dipoles from atomic units to Debye (unit: ?). Affected code: Printed value of dipole moments. - + **Type** ``float`` - + **Default** ``2.5417464739297717`` - + :boltzmann_constant: | Boltzmann constant in (unit: J K^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``1.380649e-23`` - + :elementary_charge: | Elementary charge in (unit: C). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``1.602176634e-19`` - + :e0: | Permittivity of free space (unit: F m^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``8.8541878128e-12`` - + :N_a: | Avogadro constant (unit: mol^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``6.02214076e+23`` - + :meter2bohr: | conversion factor from meter to Bohr radius (unit: m^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``18897261246.2577`` - + :Elements: list of elements with data :red:`Sections` :h: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.2`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.32`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``1`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``1.00794`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``H`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``20.268`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``14.025`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0899`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hydrogen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``110.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.731`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``2.6569547399e-05`` - + :he: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.4`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.93`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``2`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``4.002602`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``He`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4.215`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.95`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.1787`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Helium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-26.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.57`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.633`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``3.5849373401e-05`` - + :li: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.81`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.23`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``3`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``6.941`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Li`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1615.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``453.7`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lithium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.49`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.0992133976e-05`` - + :be: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.53`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.9`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``4`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``9.012182`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Be`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2745.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1560.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.85`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``5.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Beryllium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1000.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.29`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.567`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.3632829651e-05`` - + :b: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.92`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.82`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``5`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``10.811`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``B`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4275.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.34`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``4.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Boron`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1250.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``8.73`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.576`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.5906118608e-05`` - + :c: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.7`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.77`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``6`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``12.011`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``C`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4470.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``4100.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.62`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``4.58`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Carbon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1860.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.57`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.6940079496e-05`` - + :n: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.55`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.75`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``7`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``14.00674`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``N`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``77.35`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``63.14`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.251`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nitrogen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-79.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.039`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.651`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.8847128967e-05`` - + :o: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.52`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.73`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``8`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``15.9994`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``O`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``90.18`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``50.35`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.429`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Oxygen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-46.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.83`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.0580178957e-05`` - + :f: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.47`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.72`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``9`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``18.9984032`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``F`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``84.95`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``53.48`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.696`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Fluorine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``MCL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.2927138943e-05`` - + :ne: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.54`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.71`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``10`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``20.1797`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ne`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``27.096`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``24.553`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.901`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``63.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.43`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.3654104231e-05`` - + :na: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.27`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.54`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``11`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``22.989768`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Na`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1156.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``371.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.97`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``23.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Sodium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.5699159416e-05`` - + :mg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.73`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.36`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``12`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``24.305`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1363.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``922.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.74`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.97`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Magnesium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``318.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.21`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.624`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.6341070732e-05`` - + :al: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.84`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.18`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``13`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``26.981539`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Al`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2793.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``933.25`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Aluminum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``394.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.05`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.8165765928e-05`` - + :si: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.1`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.11`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``14`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``28.0855`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Si`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3540.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1685.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.33`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Silicon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``625.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.43`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.8743802504e-05`` - + :p: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.8`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.06`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``15`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``30.97362`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``P`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``550.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``317.3`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.82`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Phosphorus`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``7.17`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.0399312923e-05`` - + :s: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.8`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.02`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``16`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``32.066`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``S`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``717.75`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``388.36`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.07`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Sulfur`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``10.47`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.0927308666e-05`` - + :cl: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.75`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.99`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``17`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``35.4527`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cl`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``239.1`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``172.16`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.17`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Chlorine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.24`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.2448101115e-05`` - + :ar: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.88`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.98`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``18`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``39.948`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ar`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``87.3`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``83.81`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.784`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``28.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Argon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``85.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.26`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4800211825e-05`` - + :k: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.75`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.03`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``19`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``39.0983`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``K`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1032.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``336.35`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.86`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``45.46`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Potassium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4346167051e-05`` - + :ca: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.31`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.91`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``20`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``40.078`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ca`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1757.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1112.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.55`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``29.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Calcium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``230.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.58`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4800211825e-05`` - + :sc: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``21`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``44.95591`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sc`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3104.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1812.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Scandium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-359.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.594`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d1_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.6963627201e-05`` - + :ti: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``22`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``47.88`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ti`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3562.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1943.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.64`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Titanium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``380.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.95`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.588`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d2_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.818557748e-05`` - + :v: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``23`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``50.9415`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``V`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3682.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2175.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.78`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Vanadium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``390.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.02`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d3_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.935761683e-05`` - + :cr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.18`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``24`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``51.9961`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2945.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2130.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.19`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Chromium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``460.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.88`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d5_4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.9738057221e-05`` - + :mn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``25`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``54.93085`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2335.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1517.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.43`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``1.39`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Manganese`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``8.89`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d5_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.0850896638e-05`` - + :fe: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``26`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``55.847`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fe`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3135.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1809.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.86`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iron`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``460.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.87`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d6_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.1212829817e-05`` - + :co: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``27`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``58.9332`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Co`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3201.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1768.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``6.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cobalt`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``385.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d7_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.2273420879e-05`` - + :ni: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.15`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``28`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``58.69`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ni`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3187.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1726.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``6.59`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nickel`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``375.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.52`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d8_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.1923970253e-05`` - + :cu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``29`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``63.546`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2836.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1357.6`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.96`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Copper`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``315.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.61`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.3633018675e-05`` - + :zn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``30`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``65.39`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Zn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1180.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``692.73`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.14`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Zinc`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``234.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.3963875193e-05`` - + :ga: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.87`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.26`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``31`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``69.723`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ga`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2478.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``302.9`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.91`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``11.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gallium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``240.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.5568424848e-05`` - + :ge: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.11`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.22`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``32`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``72.61`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ge`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3107.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1210.4`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.32`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Germanium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``360.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.7097216161e-05`` - + :as: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.85`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.2`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``33`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``74.92159`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``As`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1081.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.72`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Arsenic`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``285.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.13`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``54.16`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.7394645153e-05`` - + :se: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.9`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``34`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``78.96`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Se`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``958.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``494.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.45`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Selenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.36`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.8843427408e-05`` - + :br: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.83`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.14`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``35`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``79.904`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Br`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``332.25`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``265.9`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.12`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``23.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bromine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.67`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.8558604038e-05`` - + :kr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.12`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``36`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``83.8`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Kr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``119.8`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``115.78`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.74`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``38.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Krypton`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-73.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.72`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.9959560033e-05`` - + :rb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.03`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``37`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``85.4678`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``961.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``312.64`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``55.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rubidium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-56.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.0233033713e-05`` - + :sr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.49`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.91`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``38`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``87.62`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1650.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1041.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``33.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Strontium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-147.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.1040799081e-05`` - + :y: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``39`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``88.90585`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Y`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3611.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1799.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Yttrium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-256.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.65`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.571`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d1_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.1305968993e-05`` - + :zr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``40`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``91.224`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Zr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4682.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2125.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.49`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Zirconium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``250.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.593`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d2_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.156915998e-05`` - + :nb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``41`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``92.90638`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Nb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5017.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2740.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.55`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.87`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Niobium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``275.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.3`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d4_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.2347219223e-05`` - + :mo: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``42`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``95.94`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mo`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4912.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2890.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.2`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Molybdenum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``380.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.15`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d5_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.3607614434e-05`` - + :tc: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.27`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``43`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-98.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tc`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4538.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2473.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Technetium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.74`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.604`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d5_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.3607614434e-05`` - + :ru: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``44`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``101.07`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ru`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4423.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2523.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.2`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Ruthenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-382.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.7`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.584`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d7_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.4585397905e-05`` - + :rh: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``45`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``102.9055`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rh`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3970.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2236.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rhodium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-350.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.8`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d8_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.4825835954e-05`` - + :pd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.28`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``46`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``106.42`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3237.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1825.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Palladium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``275.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.89`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s0`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.5537941156e-05`` - + :ag: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``47`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``107.8682`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ag`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2436.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1234.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Silver`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``215.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.09`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.5772320442e-05`` - + :cd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.48`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``48`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``112.411`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1040.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``594.18`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.65`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cadmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``120.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.98`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.886`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.7373430179e-05`` - + :in: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.93`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.44`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``49`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``114.82`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``In`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2346.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``429.76`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.31`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Indium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``129.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.076`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.7596760865e-05`` - + :sn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.17`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.41`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``50`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``118.71`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``505.06`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tin`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``170.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.82`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.546`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.8694413774e-05`` - + :sb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.06`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.4`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``51`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``121.75`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1860.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``904.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.68`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Antimony`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``200.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``57.1`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.8910267995e-05`` - + :te: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.06`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.36`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``52`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``127.6`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Te`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1261.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``722.65`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.24`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tellurium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-139.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.45`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.33`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.0801452955e-05`` - + :i: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.98`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.33`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``53`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``126.90447`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``I`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``458.4`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``386.7`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.92`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``25.74`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iodine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``7.27`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.018104029e-05`` - + :xe: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.16`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.31`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``54`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``131.29`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Xe`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``165.03`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``161.36`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.89`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``37.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Xenon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-55.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.2`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.1209776425e-05`` - + :cs: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.43`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.35`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``55`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``132.90543`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cs`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``944.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``301.55`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.87`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``71.07`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cesium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-40.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.05`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]6s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.1412392742e-05`` - + :ba: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.68`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.98`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``56`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``137.327`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ba`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2171.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1002.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``39.24`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Barium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-110.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.02`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2410525664e-05`` - + :la: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.69`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``57`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``138.9055`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``La`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3730.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1193.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.73`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lanthanum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``132.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.619`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2607247118e-05`` - + :hf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.44`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``72`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``178.49`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2500.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.1`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hafnium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.2`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.582`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d2_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.9970978172e-05`` - + :ta: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``73`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``180.9479`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ta`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5731.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3287.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``16.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tantalum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``225.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d3_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010013585755`` - + :w: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``74`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``183.85`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``W`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5828.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3680.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.53`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tungsten`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``310.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.16`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d4_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001006268807`` - + :re: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.28`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``75`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``186.207`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Re`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5869.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3453.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``21.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.85`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rhenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``416.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.76`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.615`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d5_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010111259523`` - + :os: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.26`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``76`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``190.2`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Os`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5285.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``22.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.49`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Osmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.74`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.579`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d6_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010191070333`` - + :ir: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.27`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``77`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``192.22`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ir`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4701.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2716.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``22.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.54`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iridium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``430.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.84`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d7_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010206865731`` - + :pt: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``78`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``195.08`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pt`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4100.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2045.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``21.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Platinum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``230.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.92`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s0`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010238293593`` - + :au: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``79`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``196.96654`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Au`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3130.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1337.58`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gold`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``170.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010269507292`` - + :hg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.49`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``80`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``200.59`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``630.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``234.28`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.82`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Mercury`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.99`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``70.75`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010346628039`` - + :tl: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.96`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.48`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``81`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``204.3833`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tl`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1746.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``577.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.85`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thallium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``96.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.46`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.599`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010392291259`` - + :pb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.47`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``82`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``207.2`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2023.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``600.6`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.17`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lead`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``88.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.95`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001043751113`` - + :bi: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.07`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.46`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``83`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``208.98037`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bi`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1837.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``544.52`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``21.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bismuth`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``120.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``57.23`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010452487744`` - + :po: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.97`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.46`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``84`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-209.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Po`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1235.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``527.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Polonium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.35`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``SC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010452487744`` - + :at: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``85`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``210.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``At`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``610.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``575.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Astatine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001046741666`` - + :rn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.2`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.43`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``86`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-222.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``211.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``202.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.91`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``50.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Radon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010642976299`` - + :fr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.48`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.5`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``87`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-223.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``950.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Francium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]7s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010657317899`` - + :ra: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.83`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.4`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``88`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``226.025`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ra`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1809.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``973.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``45.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Radium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.000107000871`` - + :ac: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.2`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``89`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``227.028`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ac`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3473.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1323.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.07`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.54`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Actinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010714259349`` - + :rf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``104`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-257.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rutherfordium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``4-5s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001117320442`` - + :db: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``105`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-262.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Db`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Dubnium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``40s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - + :sg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``106`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-263.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Seaborgium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``0.9s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011198926979`` - + :bh: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``107`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-262.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bh`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bohrium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``2ms`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - + :hs: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``108`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-264.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hs`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hassium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ```` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001122451946`` - + :mt: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``109`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-266.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mt`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Meitnerium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``5ms`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011237267433`` - + :110: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``110`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-269.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``110`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ```` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :111: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``111`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-272.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``111`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``4/1000s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :112: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``112`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-277.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``112`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``280µs`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :ce: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``58`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``140.115`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ce`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3699.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1071.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.78`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.67`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cerium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-139.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.16`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f2_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2803027311e-05`` - + :pr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``59`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``140.90765`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3785.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1204.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.77`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Praseodymium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-152.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.67`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.614`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f3_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2997877424e-05`` - + :nd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.64`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``60`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``144.24`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Nd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3341.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1289.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neodymium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-157.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.614`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f4_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.3576955934e-05`` - + :pm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.63`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``61`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-145.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3785.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1204.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.475`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.39`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Promethium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f5_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.3768193375e-05`` - + :sm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``62`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``150.36`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2064.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1345.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.54`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.95`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Samarium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``166.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``9.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``23.22`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f6_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.5082839751e-05`` - + :eu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.85`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``63`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``151.965`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Eu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1870.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1090.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.26`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``28.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Europium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-107.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.61`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f7_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.5267329183e-05`` - + :gd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.61`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``64`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``157.25`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Gd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3539.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1585.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.89`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gadolinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-176.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.64`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.588`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f7_5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6177915369e-05`` - + :tb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.59`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``65`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``158.92534`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3496.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1630.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.27`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Terbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-188.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.6`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.581`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f9_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6357719009e-05`` - + :dy: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.59`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``66`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``162.5`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Dy`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2835.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1682.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.54`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Dysprosium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-186.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.573`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f10_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6892647152e-05`` - + :ho: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.58`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``67`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``164.93032`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ho`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2968.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1743.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Holmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-191.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.58`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f11_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6892647152e-05`` - + :er: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.57`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``68`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``167.26`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Er`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3136.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1795.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.05`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Erbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-195.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.56`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f12_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.7943009317e-05`` - + :tm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.56`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``69`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``168.93421`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2220.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1818.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.33`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thulium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-200.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.54`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f13_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.811562674e-05`` - + :yb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.74`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``70`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``173.04`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Yb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1467.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1097.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.98`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``24.79`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Ytterbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-118.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.49`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.8968651305e-05`` - + :lu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.56`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``71`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``174.967`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Lu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3668.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1936.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.84`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.78`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lutetium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-207.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.585`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.9137288835e-05`` - + :th: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``90`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``232.0381`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Th`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5061.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2028.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thorium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]6d2_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010784503195`` - + :pa: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``91`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``231.03588`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pa`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``15.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Protactinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.92`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.825`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f2_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010770535752`` - + :u: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.42`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``92`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``238.0289`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``U`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4407.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1405.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``18.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.59`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Uranium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-210.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.85`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f3_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010867476102`` - + :np: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``93`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``237.048`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Np`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``910.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``20.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``11.62`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neptunium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-188.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.72`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f4_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010853744903`` - + :pu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``94`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-244.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3503.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``913.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.32`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Plutonium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``MCL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f6_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010949065967`` - + :am: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``95`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-243.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Am`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2880.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1268.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.86`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Americium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f7_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010935561268`` - + :cm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``96`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-247.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1340.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.511`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.28`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Curium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f7_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010989359973`` - + :bk: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``97`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-247.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bk`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Berkelium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f8_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010989359973`` - + :cf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``98`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-251.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``900.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Californium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f10_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011042580946`` - + :es: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``99`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-252.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Es`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Einsteinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f11_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011055797721`` - + :fm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``100`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-257.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Fermium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f12_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011121362374`` - + :md: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``101`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-258.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Md`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Mendelevium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f13_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011134373034`` - + :"no": data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``102`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-259.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``"No"`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nobelium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f14_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011147350119`` - + :lr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``103`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-260.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Lr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lawrencium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f14_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - diff --git a/external/upstream/fetch_mrcpp.cmake b/external/upstream/fetch_mrcpp.cmake index dbe0d273f..6025fc780 100644 --- a/external/upstream/fetch_mrcpp.cmake +++ b/external/upstream/fetch_mrcpp.cmake @@ -39,7 +39,7 @@ else() GIT_REPOSITORY https://github.com/MRChemSoft/mrcpp.git GIT_TAG - 720133372c9717134c5a01e963cb9804a1e8c36e + 0e9dc7e6a490a0f304e54190c695217b10e31c64 ) FetchContent_GetProperties(mrcpp_sources) diff --git a/python/mrchem/api.py b/python/mrchem/api.py index f51b82447..301b4851f 100644 --- a/python/mrchem/api.py +++ b/python/mrchem/api.py @@ -68,7 +68,9 @@ def write_mpi(user_dict): "numerically_exact": user_dict["MPI"]["numerically_exact"], "shared_memory_size": user_dict["MPI"]["shared_memory_size"], "bank_size": user_dict["MPI"]["bank_size"], + "bank_per_node": user_dict["MPI"]["bank_per_node"], "omp_threads": user_dict["MPI"]["omp_threads"], + "use_omp_num_threads": user_dict["MPI"]["use_omp_num_threads"], } return mpi_dict @@ -153,6 +155,12 @@ def write_scf_calculation(user_dict, origin): "file_phi_b": path_orbitals + "/phi_b_scf", } + if user_dict["SCF"]["write_orbitals_txt"]: + scf_dict["write_orbitals_txt"] = { + "file_phi_p": path_orbitals + "/phi_p_scf", + "file_phi_a": path_orbitals + "/phi_a_scf", + "file_phi_b": path_orbitals + "/phi_b_scf", + } if user_dict["SCF"]["run"]: scf_dict["scf_solver"] = write_scf_solver(user_dict, wf_dict) diff --git a/python/mrchem/input_parser/api.py b/python/mrchem/input_parser/api.py index 3388ca232..4aee7365b 100644 --- a/python/mrchem/input_parser/api.py +++ b/python/mrchem/input_parser/api.py @@ -228,9 +228,15 @@ def stencil() -> JSONDict: { 'default': -1, 'name': 'bank_size', 'type': 'int'}, + { 'default': -1, + 'name': 'bank_per_node', + 'type': 'int'}, { 'default': -1, 'name': 'omp_threads', - 'type': 'int'}], + 'type': 'int'}, + { 'default': False, + 'name': 'use_omp_num_threads', + 'type': 'bool'}], 'name': 'MPI'}, { 'keywords': [ { 'default': -1, 'name': 'order', @@ -541,6 +547,9 @@ def stencil() -> JSONDict: { 'default': "user['GeometryOptimizer']['use_previous_guess']", 'name': 'write_orbitals', 'type': 'bool'}, + { 'default': False, + 'name': 'write_orbitals_txt', + 'type': 'bool'}, { 'default': '10 * ' "user['world_prec']", 'name': 'orbital_thrs', @@ -586,6 +595,9 @@ def stencil() -> JSONDict: { 'default': False, 'name': 'write_orbitals', 'type': 'bool'}, + { 'default': False, + 'name': 'write_orbitals_txt', + 'type': 'bool'}, { 'default': 'orbitals', 'name': 'path_orbitals', 'predicates': ["value[-1] != '/'"], diff --git a/python/mrchem/input_parser/docs/user_ref.rst b/python/mrchem/input_parser/docs/user_ref.rst index 0f6ed3435..d503eab9f 100644 --- a/python/mrchem/input_parser/docs/user_ref.rst +++ b/python/mrchem/input_parser/docs/user_ref.rst @@ -16,14 +16,14 @@ User input reference - Predicates, if present, are the functions run to validate user input. :red:`Keywords` - :world_prec: Overall relative precision in the calculation. + :world_prec: Overall relative precision in the calculation. **Type** ``float`` **Predicates** - ``1.0e-10 < value < 1.0`` - :world_size: Total size of computational domain given as 2**(``world_size``). Always cubic and symmetric around the origin. Negative value means it will be computed from the molecular geometry. + :world_size: Total size of computational domain given as 2**(``world_size``). Always cubic and symmetric around the origin. Negative value means it will be computed from the molecular geometry. **Type** ``int`` @@ -32,7 +32,7 @@ User input reference **Predicates** - ``value <= 10`` - :world_unit: Length unit for *all* coordinates given in user input. Everything will be converted to atomic units (bohr) before the main executable is launched, so the JSON input is *always* given in bohrs. + :world_unit: Length unit for *all* coordinates given in user input. Everything will be converted to atomic units (bohr) before the main executable is launched, so the JSON input is *always* given in bohrs. **Type** ``str`` @@ -41,7 +41,7 @@ User input reference **Predicates** - ``value.lower() in ["bohr", "angstrom"]`` - :world_origin: Global gauge origin of the calculation. + :world_origin: Global gauge origin of the calculation. **Type** ``List[float]`` @@ -51,12207 +51,12225 @@ User input reference - ``len(value) == 3`` :red:`Sections` - :Precisions: Define specific precision parameters. + :Precisions: Define specific precision parameters. :red:`Keywords` - :exchange_prec: Precision parameter used in construction of Exchange operators. Negative value means it will follow the dynamic precision in SCF. - + :exchange_prec: Precision parameter used in construction of Exchange operators. Negative value means it will follow the dynamic precision in SCF. + **Type** ``float`` - + **Default** ``-1.0`` - - :helmholtz_prec: Precision parameter used in construction of Helmholtz operators. Negative value means it will follow the dynamic precision in SCF. - + + :helmholtz_prec: Precision parameter used in construction of Helmholtz operators. Negative value means it will follow the dynamic precision in SCF. + **Type** ``float`` - + **Default** ``-1.0`` - - :poisson_prec: Precision parameter used in construction of Poisson operators. - + + :poisson_prec: Precision parameter used in construction of Poisson operators. + **Type** ``float`` - + **Default** ``user['world_prec']`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :nuclear_prec: Precision parameter used in smoothing and projection of nuclear potential. - + + :nuclear_prec: Precision parameter used in smoothing and projection of nuclear potential. + **Type** ``float`` - + **Default** ``user['world_prec']`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :Printer: Define variables for printed output. + + :Printer: Define variables for printed output. :red:`Keywords` - :print_level: Level of detail in the written output. Level 0 for production calculations, negative level for complete silence. - + :print_level: Level of detail in the written output. Level 0 for production calculations, negative level for complete silence. + **Type** ``int`` - + **Default** ``0`` - - :print_mpi: Write separate output from each MPI to file called ``-.out``. - + + :print_mpi: Write separate output from each MPI to file called ``-.out``. + **Type** ``bool`` - + **Default** ``False`` - - :print_prec: Number of digits in property output (energies will get twice this number of digits). - + + :print_prec: Number of digits in property output (energies will get twice this number of digits). + **Type** ``int`` - + **Default** ``6`` - + **Predicates** - ``0 < value < 10`` - - :print_width: Line width of printed output (in number of characters). - + + :print_width: Line width of printed output (in number of characters). + **Type** ``int`` - + **Default** ``75`` - + **Predicates** - ``50 < value < 100`` - - :print_constants: Print table of physical constants used by MRChem. - + + :print_constants: Print table of physical constants used by MRChem. + **Type** ``bool`` - + **Default** ``False`` - - :Plotter: Give details regarding the density and orbital plots. Three types of plots are available, line, surface and cube, and the plotting ranges are defined by three vectors (A, B and C) and an origin (O): ``line``: plots on line spanned by A, starting from O. ``surf``: plots on surface spanned by A and B, starting from O. ``cube``: plots on volume spanned by A, B and C, starting from O. + + :Plotter: Give details regarding the density and orbital plots. Three types of plots are available, line, surface and cube, and the plotting ranges are defined by three vectors (A, B and C) and an origin (O): ``line``: plots on line spanned by A, starting from O. ``surf``: plots on surface spanned by A and B, starting from O. ``cube``: plots on volume spanned by A, B and C, starting from O. :red:`Keywords` - :path: File path to plot directory. - + :path: File path to plot directory. + **Type** ``str`` - + **Default** ``plots`` - + **Predicates** - ``value[-1] != '/'`` - - :type: Type of plot: line (1D), surface (2D) or cube (3D). - + + :type: Type of plot: line (1D), surface (2D) or cube (3D). + **Type** ``str`` - + **Default** ``cube`` - + **Predicates** - ``value.lower() in ['line', 'surf', 'cube']`` - - :points: Number of points in each direction on the cube grid. - + + :points: Number of points in each direction on the cube grid. + **Type** ``List[int]`` - + **Default** ``[20, 20, 20]`` - + **Predicates** - ``all(p > 0 for p in value)`` - ``not (user['Plotter']['type'] == 'line' and len(value) < 1)`` - ``not (user['Plotter']['type'] == 'surf' and len(value) < 2)`` - ``not (user['Plotter']['type'] == 'cube' and len(value) < 3)`` - - :O: Origin of plotting ranges. - + + :O: Origin of plotting ranges. + **Type** ``List[float]`` - + **Default** ``[0.0, 0.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :A: First boundary vector for plot. - + + :A: First boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[1.0, 0.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :B: Second boundary vector for plot. - + + :B: Second boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[0.0, 1.0, 0.0]`` - + **Predicates** - ``len(value) == 3`` - - :C: Third boundary vector for plot. - + + :C: Third boundary vector for plot. + **Type** ``List[float]`` - + **Default** ``[0.0, 0.0, 1.0]`` - + **Predicates** - ``len(value) == 3`` - - :MPI: Define MPI related parameters. + + :MPI: Define MPI related parameters. :red:`Keywords` - :numerically_exact: This will use MPI algorithms that guarantees that the output is invariant wrt the number of MPI processes. - + :numerically_exact: This will use MPI algorithms that guarantees that the output is invariant wrt the number of MPI processes. + **Type** ``bool`` - + **Default** ``False`` - - :shared_memory_size: Size (MB) of the MPI shared memory blocks of each shared function. - + + :shared_memory_size: Size (MB) of the MPI shared memory blocks of each shared function. + **Type** ``int`` - + **Default** ``10000`` - - :share_nuclear_potential: This will use MPI shared memory for the nuclear potential. - + + :share_nuclear_potential: This will use MPI shared memory for the nuclear potential. + **Type** ``bool`` - + **Default** ``False`` - - :share_coulomb_potential: This will use MPI shared memory for the Coulomb potential. - + + :share_coulomb_potential: This will use MPI shared memory for the Coulomb potential. + **Type** ``bool`` - + **Default** ``False`` - - :share_xc_potential: This will use MPI shared memory for the exchange-correlation potential. - + + :share_xc_potential: This will use MPI shared memory for the exchange-correlation potential. + **Type** ``bool`` - + **Default** ``False`` - - :bank_size: Number of MPI processes exclusively dedicated to manage orbital bank. - + + :bank_size: Number of MPI processes exclusively dedicated to manage orbital bank in total. + **Type** ``int`` - + **Default** ``-1`` - - :omp_threads: Force the number of omp threads (leave default is better). - + + :bank_per_node: Number of MPI processes exclusively dedicated to manage orbital bank for each node. + **Type** ``int`` - + **Default** ``-1`` - - :Basis: Define polynomial basis. + + :omp_threads: Force the number of OpenMP threads for workers. + + **Type** ``int`` + + **Default** ``-1`` + + :use_omp_num_threads: Use the environment variable OMP_NUM_THREADS to determine the average number of threads for OMP (NB: banks will use 1 thread, workers may use more threads than OMP_NUM_THREADS). + + **Type** ``bool`` + + **Default** ``false`` + +:Basis: Define polynomial basis. :red:`Keywords` - :order: Polynomial order of multiwavelet basis. Negative value means it will be set automatically based on the world precision. - + :order: Polynomial order of multiwavelet basis. Negative value means it will be set automatically based on the world precision. + **Type** ``int`` - + **Default** ``-1`` - - :type: Polynomial type of multiwavelet basis. - + + :type: Polynomial type of multiwavelet basis. + **Type** ``str`` - + **Default** ``interpolating`` - + **Predicates** - ``value.lower() in ['interpolating', 'legendre']`` - - :Derivatives: Define various derivative operators used in the code. + + :Derivatives: Define various derivative operators used in the code. :red:`Keywords` - :kinetic: Derivative used in kinetic operator. - + :kinetic: Derivative used in kinetic operator. + **Type** ``str`` - + **Default** ``abgv_55`` - - :h_b_dip: Derivative used in magnetic dipole operator. - + + :h_b_dip: Derivative used in magnetic dipole operator. + **Type** ``str`` - + **Default** ``abgv_00`` - - :h_m_pso: Derivative used in paramagnetic spin-orbit operator. - + + :h_m_pso: Derivative used in paramagnetic spin-orbit operator. + **Type** ``str`` - + **Default** ``abgv_00`` - - :zora: Derivative used ZORA potential. - + + :zora: Derivative used ZORA potential. + **Type** ``str`` - + **Default** ``abgv_00`` - - :Molecule: Define molecule. + + :Molecule: Define molecule. :red:`Keywords` - :charge: Total charge of molecule. - + :charge: Total charge of molecule. + **Type** ``int`` - + **Default** ``0`` - - :multiplicity: Spin multiplicity of molecule. - + + :multiplicity: Spin multiplicity of molecule. + **Type** ``int`` - + **Default** ``1`` - + **Predicates** - ``value > 0`` - - :translate: Translate coordinates such that center of mass coincides with the global gauge origin. - + + :translate: Translate coordinates such that center of mass coincides with the global gauge origin. + **Type** ``bool`` - + **Default** ``False`` - - :coords: Coordinates in xyz format. Atoms can be given either using atom symbol or atom number - + + :coords: Coordinates in xyz format. Atoms can be given either using atom symbol or atom number + **Type** ``str`` - - :WaveFunction: Define the wavefunction method. + + :WaveFunction: Define the wavefunction method. :red:`Keywords` - :method: Wavefunction method. See predicates for valid methods. ``hf``, ``hartreefock`` and ``hartree-fock`` all mean the same thing, while ``lda`` is an alias for ``svwn5``. You can set a non-standard DFT functional (e.g. varying the amount of exact exchange) by choosing ``dft`` and specifing the functional(s) in the ``DFT`` section below. - + :method: Wavefunction method. See predicates for valid methods. ``hf``, ``hartreefock`` and ``hartree-fock`` all mean the same thing, while ``lda`` is an alias for ``svwn5``. You can set a non-standard DFT functional (e.g. varying the amount of exact exchange) by choosing ``dft`` and specifing the functional(s) in the ``DFT`` section below. + **Type** ``str`` - + **Predicates** - ``value.lower() in ['core', 'hartree', 'hf', 'hartreefock', 'hartree-fock', 'dft', 'lda', 'svwn3', 'svwn5', 'pbe', 'pbe0', 'bpw91', 'bp86', 'b3p86', 'b3p86-g', 'blyp', 'b3lyp', 'b3lyp-g', 'olyp', 'kt1', 'kt2', 'kt3']`` - - :restricted: Use spin restricted wavefunction. - + + :restricted: Use spin restricted wavefunction. + **Type** ``bool`` - + **Default** ``True`` - - :relativity: Set method for relativistic treatment. ``ZORA`` for fully self-consistent ZORA potential, by default including all potentials (``V_nuc``, ``J``, ``V_xc``) but this can be overwritten in the ``ZORA`` section. ``nZORA`` is shortcut for nuclear-ZORA, i.e. only ``V_nuc`` is included (this keyword takes precedence over keywords in the ``ZORA`` section). ``azora`` uses atomic ZORA potentials, which are precomputed and read from the directory specified in the ``azora_potential_path`` keyword. - + + :relativity: Set method for relativistic treatment. ``ZORA`` for fully self-consistent ZORA potential, by default including all potentials (``V_nuc``, ``J``, ``V_xc``) but this can be overwritten in the ``ZORA`` section. ``nZORA`` is shortcut for nuclear-ZORA, i.e. only ``V_nuc`` is included (this keyword takes precedence over keywords in the ``ZORA`` section). ``azora`` uses atomic ZORA potentials, which are precomputed and read from the directory specified in the ``azora_potential_path`` keyword. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** + - ``value.lower() in ['none', 'zora', 'nzora', 'azora']`` - - :environment: Set method for treatment of environment. ``none`` for vacuum calculation. ``PCM`` for Polarizable Continuum Model, which will activate the ``PCM`` input section for further parametrization options. The ``PB`` and ``LPB`` variants add the Poisson-Boltzmann and Linearized Poisson-Boltzmann solvers, respectively. - + + :environment: Set method for treatment of environment. ``none`` for vacuum calculation. ``PCM`` for Polarizable Continuum Model, which will activate the ``PCM`` input section for further parametrization options. The ``PB`` and ``LPB`` variants add the Poisson-Boltzmann and Linearized Poisson-Boltzmann solvers, respectively. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** - ``value.lower() in ['none', 'pcm', 'pcm_pb', 'pcm_lpb']`` - - :nuclear_model: Type of nucleus model. Point-like (numerical smoothing): HFYGB (default), parabola or minimal. Finite models (physical smoothing): Gaussian or Homogeneous sphere Finite models are derived from nuclear RMS radius, Visscher (1997) - + + :nuclear_model: Type of nucleus model. Point-like (numerical smoothing): HFYGB (default), parabola or minimal. Finite models (physical smoothing): Gaussian or Homogeneous sphere Finite models are derived from nuclear RMS radius, Visscher (1997) + **Type** ``str`` - + **Default** ``point_like`` - + **Predicates** - ``value.lower() in ['point_like', 'point_parabola', 'point_minimal', 'finite_gaussian', 'finite_sphere']`` - - :ZORA: Define required parameters for the ZORA Hamiltonian. + + :ZORA: Define required parameters for the ZORA Hamiltonian. :red:`Keywords` - :include_nuclear: Include the nuclear potential ``V_nuc`` in the ZORA potential. - + :include_nuclear: Include the nuclear potential ``V_nuc`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :include_coulomb: Include the Coulomb potential ``J`` in the ZORA potential. - + + :include_coulomb: Include the Coulomb potential ``J`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :include_xc: Include the XC potential ``V_xc`` in the ZORA potential. - + + :include_xc: Include the XC potential ``V_xc`` in the ZORA potential. + **Type** ``bool`` - + **Default** ``True`` - - :azora_potential_path: Path to the directory containing the AZORA potentials. If not specified, the default potentials will be used. Look into the readme file in the share/azora_potentials directory for information about the potential file format. - + + :azora_potential_path: Path to the directory containing the AZORA potentials. If not specified, the default potentials will be used. Look into the readme file in the share/azora_potentials directory for information about the potential file format. + **Type** ``str`` - + **Default** ``none`` - - :DFT: Define the exchange-correlation functional in case of DFT. + + :DFT: Define the exchange-correlation functional in case of DFT. :red:`Keywords` - :density_cutoff: Hard cutoff for passing density values to XCFun. - + :density_cutoff: Hard cutoff for passing density values to XCFun. + **Type** ``float`` - + **Default** ``0.0`` - - :functionals: List of density functionals with numerical coefficient. E.g. for PBE0 ``EXX 0.25``, ``PBEX 0.75``, ``PBEC 1.0``, see XCFun documentation _. - + + :functionals: List of density functionals with numerical coefficient. E.g. for PBE0 ``EXX 0.25``, ``PBEX 0.75``, ``PBEC 1.0``, see XCFun documentation _. + **Type** ``str`` - + **Default** `` `` - - :spin: Use spin separated density functionals. - + + :spin: Use spin separated density functionals. + **Type** ``bool`` - + **Default** ``not(user['WaveFunction']['restricted'])`` - - :Properties: Provide a list of properties to compute (total SCF energy and orbital energies are always computed). + + :Properties: Provide a list of properties to compute (total SCF energy and orbital energies are always computed). :red:`Keywords` - :dipole_moment: Compute dipole moment. - + :dipole_moment: Compute dipole moment. + **Type** ``bool`` - + **Default** ``True`` - - :quadrupole_moment: Compute quadrupole moment. Note: Gauge origin dependent, should be used with ``translate = true`` in Molecule. - + + :quadrupole_moment: Compute quadrupole moment. Note: Gauge origin dependent, should be used with ``translate = true`` in Molecule. + **Type** ``bool`` - + **Default** ``False`` - - :polarizability: Compute polarizability tensor. - + + :polarizability: Compute polarizability tensor. + **Type** ``bool`` - + **Default** ``False`` - - :magnetizability: Compute magnetizability tensor. - + + :magnetizability: Compute magnetizability tensor. + **Type** ``bool`` - + **Default** ``False`` - - :nmr_shielding: Compute NMR shielding tensor. - + + :nmr_shielding: Compute NMR shielding tensor. + **Type** ``bool`` - + **Default** ``False`` - - :plot_density: Plot converged electron density. - + + :plot_density: Plot converged electron density. + **Type** ``bool`` - + **Default** ``False`` - - :plot_orbitals: Plot converged molecular orbitals from list of indices, negative index plots all orbitals. - + + :plot_orbitals: Plot converged molecular orbitals from list of indices, negative index plots all orbitals. + **Type** ``List[int]`` - + **Default** ``[]`` - - :hirshfeld_charges: Compute Hirshfeld charges. - + + :hirshfeld_charges: Compute Hirshfeld charges. + **Type** ``bool`` - + **Default** ``False`` - - :geometric_derivative: Compute geometric derivative. - + + :geometric_derivative: Compute geometric derivative. + **Type** ``bool`` - + **Default** ``user['GeometryOptimizer']['run']`` - - :Forces: Define parameters for the computation of forces. + + :Forces: Define parameters for the computation of forces. :red:`Keywords` - :method: Method for computing forces. ``surface_integrals`` (more accurate) uses surface integrals over the quantum mechanical stress tensor, while ``hellmann_feynman`` uses the Hellmann-Feynman theorem. - + :method: Method for computing forces. ``surface_integrals`` (more accurate) uses surface integrals over the quantum mechanical stress tensor, while ``hellmann_feynman`` uses the Hellmann-Feynman theorem. + **Type** ``str`` - + **Default** ``surface_integrals`` - + **Predicates** - ``value.lower() in ['surface_integrals', 'hellmann_feynman']`` - - :surface_integral_precision: Precision of the surface integrals used in the computation of forces. Determines the number of Lebedev grid points used in the surface integration. - + + :surface_integral_precision: Precision of the surface integrals used in the computation of forces. Determines the number of Lebedev grid points used in the surface integration. + **Type** ``str`` - + **Default** ``medium`` - + **Predicates** - ``value.lower() in ['low', 'medium', 'high']`` - - :radius_factor: Sets the radius of the surface used in the computation of forces. The radius is given by this factor times the distance to the neariest neighbour. Must be between 0.1 and 0.9. This should rarely need to be changed. Different values can change the accuracy of the forces. - + + :radius_factor: Sets the radius of the surface used in the computation of forces. The radius is given by this factor times the distance to the neariest neighbour. Must be between 0.1 and 0.9. This should rarely need to be changed. Different values can change the accuracy of the forces. + **Type** ``float`` - + **Default** ``0.6`` - - :ExternalFields: Define external electromagnetic fields. + + :ExternalFields: Define external electromagnetic fields. :red:`Keywords` - :electric_field: Strength of external electric field. - + :electric_field: Strength of external electric field. + **Type** ``List[float]`` - + **Default** ``[]`` - + **Predicates** - ``len(value) == 0 or len(value) == 3`` - - :Polarizability: Give details regarding the polarizability calculation. + + :Polarizability: Give details regarding the polarizability calculation. :red:`Keywords` - :frequency: List of external field frequencies. - + :frequency: List of external field frequencies. + **Type** ``List[float]`` - + **Default** ``[0.0]`` - - :NMRShielding: Give details regarding the NMR shileding calculation. + + :NMRShielding: Give details regarding the NMR shileding calculation. :red:`Keywords` - :nuclear_specific: Use nuclear specific perturbation operator (h_m_pso). - + :nuclear_specific: Use nuclear specific perturbation operator (h_m_pso). + **Type** ``bool`` - + **Default** ``False`` - - :nucleus_k: List of nuclei to compute. Negative value computes all nuclei. - + + :nucleus_k: List of nuclei to compute. Negative value computes all nuclei. + **Type** ``List[int]`` - + **Default** ``[-1]`` - - :Files: Defines file paths used for program input/output. Note: all paths must be given in quotes if they contain slashes "path/to/file". + + :Files: Defines file paths used for program input/output. Note: all paths must be given in quotes if they contain slashes "path/to/file". :red:`Keywords` - :guess_basis: File name for GTO basis set, used with ``gto`` guess. - + :guess_basis: File name for GTO basis set, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.bas`` - - :guess_gto_p: File name for paired orbitals, used with ``gto`` guess. - + + :guess_gto_p: File name for paired orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.mop`` - - :guess_gto_a: File name for alpha orbitals, used with ``gto`` guess. - + + :guess_gto_a: File name for alpha orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.moa`` - - :guess_gto_b: File name for beta orbitals, used with ``gto`` guess. - + + :guess_gto_b: File name for beta orbitals, used with ``gto`` guess. + **Type** ``str`` - + **Default** ``initial_guess/mrchem.mob`` - - :guess_phi_p: File name for paired orbitals, used with ``mw`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.mw - + + :guess_phi_p: File name for paired orbitals, used with ``mw`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_p`` - - :guess_phi_a: File name for alpha orbitals, used with ``mw`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.mw - + + :guess_phi_a: File name for alpha orbitals, used with ``mw`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_a`` - - :guess_phi_b: File name for beta orbitals, used with ``mw`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.mw - + + :guess_phi_b: File name for beta orbitals, used with ``mw`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/phi_b`` - - :guess_x_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/x_p_rsp_idx_<0...Np>_.mw - + + :guess_x_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/x_p_rsp_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_p`` - - :guess_x_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/x_a_rsp_idx_<0...Na>_.mw - + + :guess_x_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/x_a_rsp_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_a`` - - :guess_x_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/x_b_rsp_idx_<0...Nb>_.mw - + + :guess_x_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/x_b_rsp_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/X_b`` - - :guess_y_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/y_p_rsp_idx_<0...Np>_.mw - + + :guess_y_p: File name for paired response orbitals, used with ``mw`` guess. Expected path is ``/y_p_rsp_idx_<0...Np>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_p`` - - :guess_y_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/y_a_rsp_idx_<0...Na>_.mw - + + :guess_y_a: File name for alpha response orbitals, used with ``mw`` guess. Expected path is ``/y_a_rsp_idx_<0...Na>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_a`` - - :guess_y_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/y_b_rsp_idx_<0...Nb>_.mw - + + :guess_y_b: File name for beta response orbitals, used with ``mw`` guess. Expected path is ``/y_b_rsp_idx_<0...Nb>_.mw + **Type** ``str`` - + **Default** ``initial_guess/Y_b`` - - :guess_cube_p: File name for paired orbitals, used with ``cube`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_p: File name for paired orbitals, used with ``cube`` guess. Expected path is ``/phi_p_scf_idx_<0...Np>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_p`` - - :guess_cube_a: File name for alpha orbitals, used with ``cube`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_a: File name for alpha orbitals, used with ``cube`` guess. Expected path is ``/phi_a_scf_idx_<0...Na>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_a`` - - :guess_cube_b: File name for beta orbitals, used with ``cube`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_b: File name for beta orbitals, used with ``cube`` guess. Expected path is ``/phi_b_scf_idx_<0...Nb>_.cube where `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/phi_b`` - - :guess_cube_x_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/x_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/x_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_p`` - - :guess_cube_x_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/x_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/x_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_a`` - - :guess_cube_x_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/x_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_x_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/x_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/x_b`` - - :guess_cube_y_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/y_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_p: File name for paired response orbitals, used with ``cube`` guess. Expected path is ``/y_p_rsp_<0,1,2>_<0...Np>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_p`` - - :guess_cube_y_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/y_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_a: File name for alpha response orbitals, used with ``cube`` guess. Expected path is ``/y_a_rsp_<0,1,2>_<0...Na>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_a`` - - :guess_cube_y_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/y_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. - + + :guess_cube_y_b: File name for beta response orbitals, used with ``cube`` guess. Expected path is ``/y_b_rsp_<0,1,2>_<0...Nb>_.cube where `0,1,2` indicate the index of the components of the response vectors. `Np` is the number of orbitals and `re/im` denote real or imaginary parts. + **Type** ``str`` - + **Default** ``initial_guess/y_b`` - - :cube_vectors: Directory where cube vectors are stored for mrchem calculation. - + + :cube_vectors: Directory where cube vectors are stored for mrchem calculation. + **Type** ``str`` - + **Default** ``cube_vectors/`` - - :SCF: Includes parameters related to the ground state SCF orbital optimization. + + :SCF: Includes parameters related to the ground state SCF orbital optimization. :red:`Keywords` - :run: Run SCF solver. Otherwise properties are computed on the initial orbitals. - + :run: Run SCF solver. Otherwise properties are computed on the initial orbitals. + **Type** ``bool`` - + **Default** ``True`` - - :max_iter: Maximum number of SCF iterations. - + + :max_iter: Maximum number of SCF iterations. + **Type** ``int`` - + **Default** ``100`` - - :kain: Length of KAIN iterative history. - + + :kain: Length of KAIN iterative history. + **Type** ``int`` - + **Default** ``5`` - - :rotation: Number of iterations between each diagonalization/localization. - + + :rotation: Number of iterations between each diagonalization/localization. + **Type** ``int`` - + **Default** ``0`` - - :localize: Use canonical or localized orbitals. - + + :localize: Use canonical or localized orbitals. + **Type** ``bool`` - + **Default** ``False`` - - :energy_thrs: Convergence threshold for SCF energy. - + + :energy_thrs: Convergence threshold for SCF energy. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_prec: Precision parameter used in construction of initial guess. - + + :guess_prec: Precision parameter used in construction of initial guess. + **Type** ``float`` - + **Default** ``0.001`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :guess_screen: Screening parameter used in GTO evaluations, in number of standard deviations. Every coordinate beyond N StdDev from the Gaussian center is evaluated to zero. Note that too aggressive screening is counter productive, because it leads to a sharp cutoff in the resulting function which requires higher grid refinement. Negative value means no screening. - + + :guess_screen: Screening parameter used in GTO evaluations, in number of standard deviations. Every coordinate beyond N StdDev from the Gaussian center is evaluated to zero. Note that too aggressive screening is counter productive, because it leads to a sharp cutoff in the resulting function which requires higher grid refinement. Negative value means no screening. + **Type** ``float`` - + **Default** ``12.0`` - - :start_prec: Incremental precision in SCF iterations, initial value. - + + :start_prec: Incremental precision in SCF iterations, initial value. + **Type** ``float`` - + **Default** ``-1.0`` - - :final_prec: Incremental precision in SCF iterations, final value. - + + :final_prec: Incremental precision in SCF iterations, final value. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_type: Type of initial guess for ground state orbitals. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. This will load MRA and electron spin configuration directly from the checkpoint files, which are thus required to be identical in the two calculations. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` keyword. The orbitals will be re-projected into the new computational setup, which means that the electron spin configuration and MRA can be different in the two calculations. ``gto`` reads precomputed GTO orbitals (requires extra non-standard input files for basis set and MO coefficients). ``core`` and ``sad`` will diagonalize the Fock matrix in the given AO basis (SZ, DZ, TZ or QZ) using a Core or Superposition of Atomic Densities Hamiltonian, respectively. ``cube`` will start from orbitals saved in cubefiles from external calculations. - + + :guess_type: Type of initial guess for ground state orbitals. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. This will load MRA and electron spin configuration directly from the checkpoint files, which are thus required to be identical in the two calculations. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` or ``write_orbitals_txt`` keyword. The orbitals will be re-projected into the new computational setup, which means that the electron spin configuration and MRA can be different in the two calculations. ``gto`` reads precomputed GTO orbitals (requires extra non-standard input files for basis set and MO coefficients). ``core`` and ``sad`` will diagonalize the Fock matrix in the given AO basis (SZ, DZ, TZ or QZ) using a Core or Superposition of Atomic Densities Hamiltonian, respectively. ``cube`` will start from orbitals saved in cubefiles from external calculations. + **Type** ``str`` - + **Default** ``sad_gto`` - + **Predicates** - ``value.lower() in ['mw', 'chk', 'gto', 'core_sz', 'core_dz', 'core_tz', 'core_qz', 'sad_sz', 'sad_dz', 'sad_tz', 'sad_qz', 'sad_gto', 'cube']`` - - :write_checkpoint: Write orbitals to disk in each iteration, file name ``/phi_scf_idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. Note: must be given in quotes if there are slashes in the path "path/to/checkpoint". - + + :write_checkpoint: Write orbitals to disk in each iteration, file name ``/phi_scf_idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. Note: must be given in quotes if there are slashes in the path "path/to/checkpoint". + **Type** ``bool`` - + **Default** ``False`` - - :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. - + + :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. + **Type** ``str`` - + **Default** ``checkpoint`` - + **Predicates** - ``value[-1] != '/'`` - - :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. Note: must be given in quotes if there are slashes in the path "path/to/orbitals". - + + :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. Note: must be given in quotes if there are slashes in the path "path/to/orbitals". + **Type** ``str`` - + **Default** ``orbitals`` - + **Predicates** - ``value[-1] != '/'`` - - :guess_rotate: Localize/Diagonalize the initial guess orbitals before calculating the initial guess energy. - + + :guess_rotate: Localize/Diagonalize the initial guess orbitals before calculating the initial guess energy. + **Type** ``bool`` - + **Default** ``True`` - - :write_orbitals: Write final orbitals to disk, file name ``/phi_

_scf_idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. - + + :write_orbitals: Write final orbitals to disk, file name ``/phi_

_scf_idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. + **Type** ``bool`` - + **Default** ``user['GeometryOptimizer']['use_previous_guess']`` - - :orbital_thrs: Convergence threshold for orbital residuals. - + + :orbital_thrs: Convergence threshold for orbital residuals. + **Type** ``float`` - + **Default** ``10 * user['world_prec']`` - - :Response: Includes parameters related to the response SCF optimization. + + :Response: Includes parameters related to the response SCF optimization. :red:`Keywords` - :run: In which Cartesian directions to run response solver. - + :run: In which Cartesian directions to run response solver. + **Type** ``List[bool]`` - + **Default** ``[True, True, True]`` - - :max_iter: Maximum number of response iterations. - + + :max_iter: Maximum number of response iterations. + **Type** ``int`` - + **Default** ``100`` - - :kain: Length of KAIN iterative history. - + + :kain: Length of KAIN iterative history. + **Type** ``int`` - + **Default** ``5`` - - :property_thrs: Convergence threshold for symmetric property. Symmetric meaning the property computed from the same operator as the response purturbation, e.g. for external magnetic field the symmetric property corresponds to the magnetizability (NMR shielding in non-symmetric, since one of the operators is external magnetic field, while the other is nuclear magnetic moment). - + + :property_thrs: Convergence threshold for symmetric property. Symmetric meaning the property computed from the same operator as the response purturbation, e.g. for external magnetic field the symmetric property corresponds to the magnetizability (NMR shielding in non-symmetric, since one of the operators is external magnetic field, while the other is nuclear magnetic moment). + **Type** ``float`` - + **Default** ``-1.0`` - - :start_prec: Incremental precision in SCF iterations, initial value. - + + :start_prec: Incremental precision in SCF iterations, initial value. + **Type** ``float`` - + **Default** ``-1.0`` - - :final_prec: Incremental precision in SCF iterations, final value. - + + :final_prec: Incremental precision in SCF iterations, final value. + **Type** ``float`` - + **Default** ``-1.0`` - - :guess_prec: Precision parameter used in construction of initial guess. - + + :guess_prec: Precision parameter used in construction of initial guess. + **Type** ``float`` - + **Default** ``0.001`` - + **Predicates** - ``1.0e-10 < value < 1.0`` - - :guess_type: Type of initial guess for response. ``none`` will start from a zero guess for the response functions. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` keyword. The orbitals will be re-projected into the new computational setup. - + + :guess_type: Type of initial guess for response. ``none`` will start from a zero guess for the response functions. ``chk`` restarts a previous calculation which was dumped using the ``write_checkpoint`` keyword. ``mw`` will start from final orbitals in a previous calculation written using the ``write_orbitals`` or the ``write_orbitals_txt`` keyword. The orbitals will be re-projected into the new computational setup. + **Type** ``str`` - + **Default** ``none`` - + **Predicates** - ``value.lower() in ['none', 'chk', 'mw', 'cube']`` - - :write_checkpoint: Write perturbed orbitals to disk in each iteration, file name ``/_rsp__idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. - + + :write_checkpoint: Write perturbed orbitals to disk in each iteration, file name ``/_rsp__idx_<0..N>``. Can be used as ``chk`` initial guess in subsequent calculations. + **Type** ``bool`` - + **Default** ``False`` - - :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. - + + :path_checkpoint: Path to checkpoint files during SCF, used with ``write_checkpoint`` and ``chk`` guess. + **Type** ``str`` - + **Default** ``checkpoint`` - + **Predicates** - ``value[-1] != '/'`` - - :write_orbitals: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. - + + :write_orbitals: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. + + **Type** ``bool`` + + **Default** ``False`` + + :write_orbitals_txt: Write final perturbed orbitals to disk, file name ``/_

_rsp__idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. The orbitals are written in a readable and portable text format. + **Type** ``bool`` - + **Default** ``False`` - - :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` keyword. - + + :path_orbitals: Path to where converged orbitals will be written in connection with the ``write_orbitals`` or ``write_orbitals_txt`` keyword. + **Type** ``str`` - + **Default** ``orbitals`` - + **Predicates** - ``value[-1] != '/'`` - - :orbital_thrs: Convergence threshold for orbital residuals. - + + :orbital_thrs: Convergence threshold for orbital residuals. + **Type** ``float`` - + **Default** ``10 * user['world_prec']`` - - :localize: Use canonical or localized unperturbed orbitals. - + + :localize: Use canonical or localized unperturbed orbitals. + **Type** ``bool`` - + **Default** ``user['SCF']['localize']`` - - :PCM: Includes parameters related to the computation of the reaction field energy of a system in an environment within the Polarizable Continuum Model. + + :PCM: Includes parameters related to the computation of the reaction field energy of a system in an environment within the Polarizable Continuum Model. :red:`Sections` - :SCRF: Parameters for the Self-Consistent Reaction Field optimization. - + :SCRF: Parameters for the Self-Consistent Reaction Field optimization. + :red:`Keywords` - :max_iter: Max number of iterations allowed in the nested procedure. - + :max_iter: Max number of iterations allowed in the nested procedure. + **Type** ``int`` - + **Default** ``100`` - - :dynamic_thrs: Set the convergence threshold for the nested procedure. ``true`` will dynamically tighten the convergence threshold based on the absolute value of the latest orbital update as. When the orbitals are close to convergence (``mo_residual < world_prec*10``) the convergence threshold will be set equal to ``world_prec``. ``false`` uses ``world_prec`` as convergence threshold throughout. - + + :dynamic_thrs: Set the convergence threshold for the nested procedure. ``true`` will dynamically tighten the convergence threshold based on the absolute value of the latest orbital update as. When the orbitals are close to convergence (``mo_residual < world_prec*10``) the convergence threshold will be set equal to ``world_prec``. ``false`` uses ``world_prec`` as convergence threshold throughout. + **Type** ``bool`` - + **Default** ``True`` - - :density_type: What part of the total molecular charge density to use in the algorithm. ``total`` uses the total charge density. ``nuclear`` uses only the nuclear part of the total charge density. ``electronic`` uses only the electronic part of the total charge density. - + + :density_type: What part of the total molecular charge density to use in the algorithm. ``total`` uses the total charge density. ``nuclear`` uses only the nuclear part of the total charge density. ``electronic`` uses only the electronic part of the total charge density. + **Type** ``str`` - + **Default** ``total`` - + **Predicates** - ``value.lower() in ['total', 'nuclear', 'electronic']`` - - :kain: Number of previous reaction field iterates kept for convergence acceleration during the nested precedure. - + + :kain: Number of previous reaction field iterates kept for convergence acceleration during the nested precedure. + **Type** ``int`` - + **Default** ``user['SCF']['kain']`` - - :Solvent: Parameters for the Self-Consistent Reaction Field optimization. - + + :Solvent: Parameters for the Self-Consistent Reaction Field optimization. + :red:`Sections` - :Permittivity: Parameters for the permittivity function. - + :Permittivity: Parameters for the permittivity function. + :red:`Keywords` - :epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour. - + :epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour. + **Type** ``float`` - + **Default** ``1.0`` - - :formulation: Formulation of the Permittivity function. Currently only the exponential is available. - + + :formulation: Formulation of the Permittivity function. Currently only the exponential is available. + **Type** ``str`` - + **Default** ``exponential`` - + **Predicates** - ``value.lower() in ['exponential']`` - + :red:`Sections` - :epsilon_out: Parameters for the continuum solvent outside the cavity. - + :epsilon_out: Parameters for the continuum solvent outside the cavity. + :red:`Keywords` - :nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false. - + :nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false. + **Type** ``bool`` - + **Default** ``False`` - - :static: Static permittivity outside the cavity. This is characteristic of the solvent used. - + + :static: Static permittivity outside the cavity. This is characteristic of the solvent used. + **Type** ``float`` - + **Default** ``1.0`` - - :dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`. - + + :dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`. + **Type** ``float`` - + **Default** ``user['PCM']['Solvent']['Permittivity']['epsilon_out']['static']`` - - :DebyeHuckelScreening: Parameters for the Debye-Huckel screening factor - + + :DebyeHuckelScreening: Parameters for the Debye-Huckel screening factor + :red:`Keywords` - :ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent. - + :ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent. + **Type** ``float`` - + **Default** ``1.0`` - - :ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms. - + + :ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms. + **Type** ``float`` - + **Default** ``0.0`` - - :ion_width: Width of the transition between the solute and the ion accessible part. - + + :ion_width: Width of the transition between the solute and the ion accessible part. + **Type** ``float`` - + **Default** ``0.2`` - - :formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out - + + :formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out + **Type** ``str`` - + **Default** ``variable`` - + **Predicates** - ``value.lower() in ['variable']`` - - :Cavity: Define the interlocking spheres cavity. - + + :Cavity: Define the interlocking spheres cavity. + :red:`Keywords` - :mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block. - + :mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block. + **Type** ``str`` - + **Default** ``atoms`` - + **Predicates** - ``value.lower() in ['atoms', 'explicit']`` - - :spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient. - + + :spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient. + **Type** ``str`` - + **Default** ```` - - :alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. - + + :alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. + **Type** ``float`` - + **Default** ``1.1`` - - :beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. - + + :beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given. + **Type** ``float`` - + **Default** ``0.5`` - - :sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**. - + + :sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**. + **Type** ``float`` - + **Default** ``0.2`` - - :GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES. Geometry optimizations require accurate forces. Consider setting world_prec to 1e-5 to 1e-7. Convergence issues can usually be solved by increasing the precision of the SCF calculation. If that does not work, try setting the initial step size manually. + + :GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES. Geometry optimizations require accurate forces. Consider setting world_prec to 1e-5 to 1e-7. Convergence issues can usually be solved by increasing the precision of the SCF calculation. If that does not work, try setting the initial step size manually. :red:`Keywords` - :run: Run optimizer. Otherwise single point energy/properties are computed. - + :run: Run optimizer. Otherwise single point energy/properties are computed. + **Type** ``bool`` - + **Default** ``False`` - - :use_previous_guess: Start each SCF from the converged orbitals from the previous geometry step. The guess_type will change to "mw" after the first iteration, and the intermediate orbitals will be stored in the "orbitals" directory. If toggled off, start over using the same initial guess method as in the first iteration. - + + :use_previous_guess: Start each SCF from the converged orbitals from the previous geometry step. The guess_type will change to "mw" after the first iteration, and the intermediate orbitals will be stored in the "orbitals" directory. If toggled off, start over using the same initial guess method as in the first iteration. + **Type** ``bool`` - + **Default** ``False`` - - :init_step_size: Initial step size. For systems with hard bonds (e.g. C-C) use a value between and 1.0 and 2.5. If a system only contains weaker bonds a value up to 5.0 may speed up the convergence. Use a small negative number (should be between -0.1 and -0.5) for an automatic guess. The optimal step size is the inverse of the largest eigenvalue of the hessian matrix. - + + :init_step_size: Initial step size. For systems with hard bonds (e.g. C-C) use a value between and 1.0 and 2.5. If a system only contains weaker bonds a value up to 5.0 may speed up the convergence. Use a small negative number (should be between -0.1 and -0.5) for an automatic guess. The optimal step size is the inverse of the largest eigenvalue of the hessian matrix. + **Type** ``float`` - + **Default** ``-0.5`` - - :minimal_step_size: Minimal step size. It rarely makes sense to change it. - + + :minimal_step_size: Minimal step size. It rarely makes sense to change it. + **Type** ``float`` - + **Default** ``0.01`` - - :max_history_length: Maximum length of history list. Energies and forces from the previous n geometry optimization iterations are used to estimate the hessian matrix. Use a value between 2 and 20. A lower value makes the SQNM algorithm behave more like steepest descent and slows down convergence. But it can handle more noise in the energies and forces. It rarely makes sense to change it. - + + :max_history_length: Maximum length of history list. Energies and forces from the previous n geometry optimization iterations are used to estimate the hessian matrix. Use a value between 2 and 20. A lower value makes the SQNM algorithm behave more like steepest descent and slows down convergence. But it can handle more noise in the energies and forces. It rarely makes sense to change it. + **Type** ``int`` - + **Default** ``10`` - - :subspace_tolerance: Lower limit on linear dependencies of basis vectors in history listSubspace tolerance. Use a number between 1e-9 and 1e-1. A high subspace tolerance slows down convergence but improves numerical stability when the energies and forces contain a lot of noise. It rarely makes sense to change it. - + + :subspace_tolerance: Lower limit on linear dependencies of basis vectors in history listSubspace tolerance. Use a number between 1e-9 and 1e-1. A high subspace tolerance slows down convergence but improves numerical stability when the energies and forces contain a lot of noise. It rarely makes sense to change it. + **Type** ``float`` - + **Default** ``0.001`` - - :max_iter: Maximum number of geometry optimization iterations. - + + :max_iter: Maximum number of geometry optimization iterations. + **Type** ``int`` - + **Default** ``100`` - - :max_force_component: The geometry optimization stopps when the absolute value of all force components is smaller than this keyword. A value between 1e-3 and 1e-4 is tight enough for most applications. - + + :max_force_component: The geometry optimization stopps when the absolute value of all force components is smaller than this keyword. A value between 1e-3 and 1e-4 is tight enough for most applications. + **Type** ``float`` - + **Default** ``0.005`` - + :Constants: Physical and mathematical constants used by MRChem :red:`Keywords` :hartree2simagnetizability: | Conversion factor for magnetizability from atomic units to SI units (unit: J T^-2). Affected code: Printed value of the magnetizability property. - + **Type** ``float`` - + **Default** ``78.9451185`` - + :light_speed: | Speed of light in atomic units (unit: au). Affected code: Relativistic Hamiltonians (ZORA, etc.) - + **Type** ``float`` - + **Default** ``137.035999084`` - + :angstrom2bohrs: | Conversion factor for Cartesian coordinates from Angstrom to Bohr (unit: Å^-1). Affected code: Parsing of input coordinates, printed coordinates - + **Type** ``float`` - + **Default** ``1.8897261246257702`` - + :hartree2kjmol: | Conversion factor from Hartree to kJ/mol (unit: kJ mol^-1). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``2625.4996394798254`` - + :hartree2kcalmol: | Conversion factor from Hartree to kcal/mol (unit: kcal mol^-1). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``627.5094740630558`` - + :hartree2ev: | Conversion factor from Hartree to eV (unit: ev). Affected code: Printed value of energies. - + **Type** ``float`` - + **Default** ``27.211386245988`` - + :hartree2wavenumbers: | Conversion factor from Hartree to wavenumbers (unit: cm^-1). Affected code: Printed value of frequencies. - + **Type** ``float`` - + **Default** ``219474.6313632`` - + :fine_structure_constant: | Fine-structure constant in atomic units (unit: au). Affected code: Certain magnetic interaction operators. - + **Type** ``float`` - + **Default** ``0.0072973525693`` - + :electron_g_factor: | Electron g factor in atomic units (unit: au). Affected code: Certain magnetic interaction operators. - + **Type** ``float`` - + **Default** ``-2.00231930436256`` - + :dipmom_au2debye: | Conversion factor for dipoles from atomic units to Debye (unit: ?). Affected code: Printed value of dipole moments. - + **Type** ``float`` - + **Default** ``2.5417464739297717`` - + :boltzmann_constant: | Boltzmann constant in (unit: J K^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``1.380649e-23`` - + :elementary_charge: | Elementary charge in (unit: C). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``1.602176634e-19`` - + :e0: | Permittivity of free space (unit: F m^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``8.8541878128e-12`` - + :N_a: | Avogadro constant (unit: mol^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``6.02214076e+23`` - + :meter2bohr: | conversion factor from meter to Bohr radius (unit: m^-1). Affected code: Value of the Debye-Huckel screening parameter in the Poisson-Boltzmann equation. - + **Type** ``float`` - + **Default** ``18897261246.2577`` - + :Elements: list of elements with data :red:`Sections` :h: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.2`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.32`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``1`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``1.00794`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``H`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``20.268`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``14.025`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0899`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hydrogen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``110.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.731`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``2.6569547399e-05`` - + :he: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.4`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.93`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``2`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``4.002602`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``He`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4.215`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.95`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.1787`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Helium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-26.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.57`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.633`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``3.5849373401e-05`` - + :li: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.81`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.23`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``3`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``6.941`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Li`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1615.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``453.7`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lithium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.49`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.0992133976e-05`` - + :be: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.53`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.9`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``4`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``9.012182`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Be`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2745.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1560.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.85`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``5.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Beryllium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1000.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.29`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.567`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.3632829651e-05`` - + :b: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.92`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.82`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``5`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``10.811`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``B`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4275.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.34`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``4.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Boron`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1250.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``8.73`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.576`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.5906118608e-05`` - + :c: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.7`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.77`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``6`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``12.011`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``C`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4470.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``4100.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.62`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``4.58`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Carbon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``1860.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.57`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.6940079496e-05`` - + :n: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.55`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.75`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``7`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``14.00674`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``N`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``77.35`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``63.14`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.251`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nitrogen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-79.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.039`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.651`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``4.8847128967e-05`` - + :o: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.52`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.73`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``8`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``15.9994`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``O`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``90.18`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``50.35`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.429`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Oxygen`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-46.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.83`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.0580178957e-05`` - + :f: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.47`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.72`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``9`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``18.9984032`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``F`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``84.95`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``53.48`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.696`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Fluorine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``MCL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.2927138943e-05`` - + :ne: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.54`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.71`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``10`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``20.1797`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ne`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``27.096`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``24.553`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.901`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``63.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.43`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``1s2_2s2_2p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.3654104231e-05`` - + :na: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.27`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.54`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``11`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``22.989768`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Na`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1156.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``371.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.97`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``23.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Sodium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.5699159416e-05`` - + :mg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.73`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.36`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``12`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``24.305`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1363.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``922.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.74`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.97`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Magnesium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``318.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.21`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.624`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.6341070732e-05`` - + :al: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.84`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.18`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``13`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``26.981539`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Al`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2793.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``933.25`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Aluminum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``394.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.05`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.8165765928e-05`` - + :si: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.1`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.11`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``14`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``28.0855`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Si`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3540.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1685.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.33`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Silicon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``625.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.43`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``5.8743802504e-05`` - + :p: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.8`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.06`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``15`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``30.97362`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``P`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``550.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``317.3`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.82`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Phosphorus`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``7.17`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.0399312923e-05`` - + :s: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.8`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.02`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``16`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``32.066`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``S`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``717.75`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``388.36`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.07`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Sulfur`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``10.47`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.0927308666e-05`` - + :cl: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.75`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.99`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``17`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``35.4527`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cl`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``239.1`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``172.16`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.17`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Chlorine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.24`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.2448101115e-05`` - + :ar: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.88`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.98`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``18`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``39.948`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ar`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``87.3`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``83.81`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.784`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``28.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Argon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``85.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.26`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ne]3s2_3p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4800211825e-05`` - + :k: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.75`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.03`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``19`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``39.0983`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``K`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1032.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``336.35`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.86`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``45.46`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Potassium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4346167051e-05`` - + :ca: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.31`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.91`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``20`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``40.078`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ca`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1757.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1112.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.55`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``29.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Calcium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``230.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.58`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.4800211825e-05`` - + :sc: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``21`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``44.95591`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sc`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3104.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1812.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Scandium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-359.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.594`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d1_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.6963627201e-05`` - + :ti: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``22`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``47.88`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ti`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3562.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1943.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.64`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Titanium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``380.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.95`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.588`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d2_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.818557748e-05`` - + :v: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``23`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``50.9415`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``V`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3682.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2175.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.78`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Vanadium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``390.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.02`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d3_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.935761683e-05`` - + :cr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.18`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``24`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``51.9961`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2945.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2130.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.19`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Chromium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``460.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.88`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d5_4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``6.9738057221e-05`` - + :mn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``25`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``54.93085`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2335.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1517.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.43`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``1.39`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Manganese`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``8.89`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``CUB`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d5_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.0850896638e-05`` - + :fe: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``26`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``55.847`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fe`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3135.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1809.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.86`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iron`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``460.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.87`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d6_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.1212829817e-05`` - + :co: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``27`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``58.9332`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Co`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3201.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1768.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``6.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cobalt`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``385.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d7_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.2273420879e-05`` - + :ni: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.15`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``28`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``58.69`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ni`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3187.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1726.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``6.59`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nickel`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``375.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.52`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d8_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.1923970253e-05`` - + :cu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.17`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``29`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``63.546`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2836.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1357.6`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.96`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``7.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Copper`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``315.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.61`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.3633018675e-05`` - + :zn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``30`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``65.39`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Zn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1180.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``692.73`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.14`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Zinc`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``234.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.3963875193e-05`` - + :ga: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.87`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.26`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``31`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``69.723`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ga`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2478.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``302.9`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.91`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``11.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gallium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``240.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.5568424848e-05`` - + :ge: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.11`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.22`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``32`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``72.61`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ge`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3107.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1210.4`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.32`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Germanium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``360.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``DIA`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.7097216161e-05`` - + :as: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.85`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.2`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``33`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``74.92159`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``As`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1081.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.72`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Arsenic`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``285.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.13`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``54.16`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.7394645153e-05`` - + :se: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.9`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``34`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``78.96`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Se`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``958.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``494.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.45`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Selenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.36`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.8843427408e-05`` - + :br: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.83`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.14`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``35`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``79.904`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Br`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``332.25`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``265.9`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.12`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``23.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bromine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.67`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.8558604038e-05`` - + :kr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.12`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``36`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``83.8`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Kr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``119.8`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``115.78`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.74`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``38.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Krypton`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-73.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.72`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Ar]3d10_4s2_4p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``7.9959560033e-05`` - + :rb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.03`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.16`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``37`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``85.4678`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``961.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``312.64`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``55.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rubidium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-56.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.0233033713e-05`` - + :sr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.49`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.91`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``38`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``87.62`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1650.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1041.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``2.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``33.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Strontium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-147.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.1040799081e-05`` - + :y: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``39`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``88.90585`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Y`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3611.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1799.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Yttrium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-256.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.65`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.571`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d1_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.1305968993e-05`` - + :zr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``40`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``91.224`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Zr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4682.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2125.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.49`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Zirconium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``250.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.23`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.593`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d2_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.156915998e-05`` - + :nb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``41`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``92.90638`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Nb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5017.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2740.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.55`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.87`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Niobium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``275.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.3`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d4_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.2347219223e-05`` - + :mo: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``42`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``95.94`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mo`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4912.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2890.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.2`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Molybdenum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``380.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.15`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d5_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.3607614434e-05`` - + :tc: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.27`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``43`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-98.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tc`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4538.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2473.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Technetium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.74`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.604`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d5_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.3607614434e-05`` - + :ru: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``44`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``101.07`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ru`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4423.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2523.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.2`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Ruthenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-382.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.7`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.584`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d7_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.4585397905e-05`` - + :rh: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.25`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``45`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``102.9055`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rh`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3970.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2236.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rhodium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-350.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.8`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d8_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.4825835954e-05`` - + :pd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.28`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``46`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``106.42`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3237.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1825.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``12.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Palladium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``275.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.89`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s0`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.5537941156e-05`` - + :ag: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``47`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``107.8682`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ag`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2436.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1234.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Silver`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``215.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.09`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.5772320442e-05`` - + :cd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.48`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``48`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``112.411`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1040.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``594.18`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.65`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cadmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``120.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.98`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.886`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.7373430179e-05`` - + :in: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.93`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.44`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``49`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``114.82`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``In`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2346.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``429.76`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.31`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Indium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``129.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.076`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.7596760865e-05`` - + :sn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.17`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.41`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``50`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``118.71`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``505.06`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``16.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tin`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``170.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.82`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.546`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.8694413774e-05`` - + :sb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.06`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.4`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``51`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``121.75`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1860.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``904.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.68`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Antimony`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``200.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``57.1`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``8.8910267995e-05`` - + :te: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.06`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.36`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``52`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``127.6`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Te`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1261.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``722.65`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.24`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tellurium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-139.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.45`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.33`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.0801452955e-05`` - + :i: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.98`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.33`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``53`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``126.90447`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``I`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``458.4`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``386.7`` - + :density: density of element - + **Type** ``float`` - + **Default** ``4.92`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``25.74`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iodine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``7.27`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.018104029e-05`` - + :xe: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.16`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.31`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``54`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``131.29`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Xe`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``165.03`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``161.36`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.89`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``37.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Xenon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-55.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.2`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Kr]4d10_5s2_5p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.1209776425e-05`` - + :cs: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.43`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.35`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``55`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``132.90543`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cs`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``944.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``301.55`` - + :density: density of element - + **Type** ``float`` - + **Default** ``1.87`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``71.07`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cesium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-40.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``6.05`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]6s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.1412392742e-05`` - + :ba: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.68`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.98`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``56`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``137.327`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ba`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2171.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1002.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``3.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``39.24`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Barium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-110.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.02`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2410525664e-05`` - + :la: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.69`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``57`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``138.9055`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``La`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3730.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1193.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.73`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lanthanum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``132.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.619`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2607247118e-05`` - + :hf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.44`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``72`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``178.49`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4876.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2500.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.1`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``13.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hafnium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.2`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.582`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d2_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.9970978172e-05`` - + :ta: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``73`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``180.9479`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ta`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5731.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3287.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``16.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tantalum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``225.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d3_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010013585755`` - + :w: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``74`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``183.85`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``W`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5828.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3680.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.53`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Tungsten`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``310.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.16`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d4_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001006268807`` - + :re: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.28`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``75`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``186.207`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Re`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5869.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3453.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``21.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.85`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rhenium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``416.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.76`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.615`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d5_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010111259523`` - + :os: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.26`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``76`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``190.2`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Os`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5285.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``3300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``22.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.49`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Osmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-400.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.74`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.579`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d6_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010191070333`` - + :ir: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.27`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``77`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``192.22`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ir`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4701.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2716.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``22.5`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``8.54`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Iridium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``430.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.84`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d7_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010206865731`` - + :pt: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.3`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``78`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``195.08`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pt`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4100.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2045.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``21.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``9.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Platinum`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``230.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.92`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s0`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010238293593`` - + :au: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.34`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``79`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``196.96654`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Au`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3130.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1337.58`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.3`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``10.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gold`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``170.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010269507292`` - + :hg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.49`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``80`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``200.59`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``630.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``234.28`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.53`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``14.82`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Mercury`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.99`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``70.75`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010346628039`` - + :tl: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.96`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.48`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``81`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``204.3833`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tl`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1746.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``577.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.85`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thallium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``96.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.46`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.599`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010392291259`` - + :pb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.47`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``82`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``207.2`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2023.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``600.6`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.17`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lead`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``88.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.95`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001043751113`` - + :bi: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.07`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.46`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``83`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``208.98037`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bi`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1837.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``544.52`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``21.3`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bismuth`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``120.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.75`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``57.23`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p3`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010452487744`` - + :po: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``1.97`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.46`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``84`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-209.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Po`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1235.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``527.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.23`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Polonium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.35`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``SC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p4`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010452487744`` - + :at: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.02`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.45`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``85`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``210.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``At`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``610.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``575.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Astatine`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p5`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001046741666`` - + :rn: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.2`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.43`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``86`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-222.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rn`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``211.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``202.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.91`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``50.5`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Radon`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d10_6s2_6p6`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010642976299`` - + :fr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``3.48`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.5`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``87`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-223.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``950.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``300.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Francium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]7s1`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010657317899`` - + :ra: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``2.83`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.4`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``88`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``226.025`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ra`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1809.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``973.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``45.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Radium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.000107000871`` - + :ac: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``2.2`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``89`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``227.028`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ac`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3473.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1323.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``10.07`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.54`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Actinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.31`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010714259349`` - + :rf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``104`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-257.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Rf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Rutherfordium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``4-5s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001117320442`` - + :db: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``105`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-262.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Db`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Dubnium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``40s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - + :sg: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``106`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-263.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sg`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Seaborgium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``0.9s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011198926979`` - + :bh: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``107`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-262.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bh`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Bohrium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``2ms`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - + :hs: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``108`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-264.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Hs`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Hassium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ```` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.0001122451946`` - + :mt: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``109`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-266.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Mt`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Meitnerium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``5ms`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011237267433`` - + :110: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``110`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-269.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``110`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ```` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :111: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``111`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-272.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``111`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``4/1000s`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :112: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``112`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-277.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``112`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``(recent_disc.)`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``280µs`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :ce: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``58`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``140.115`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ce`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3699.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1071.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.78`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.67`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Cerium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-139.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.16`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f2_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2803027311e-05`` - + :pr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``59`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``140.90765`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3785.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1204.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.77`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.8`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Praseodymium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-152.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.67`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.614`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f3_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.2997877424e-05`` - + :nd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.64`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``60`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``144.24`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Nd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3341.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1289.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``20.6`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neodymium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-157.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.66`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.614`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f4_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.3576955934e-05`` - + :pm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.63`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``61`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-145.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3785.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1204.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.475`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``22.39`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Promethium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f5_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.3768193375e-05`` - + :sm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.62`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``62`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``150.36`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Sm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2064.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1345.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.54`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.95`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Samarium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``166.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``9.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``RHL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``23.22`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f6_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.5082839751e-05`` - + :eu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.85`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``63`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``151.965`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Eu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1870.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1090.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``5.26`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``28.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Europium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-107.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.61`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``BCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f7_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.5267329183e-05`` - + :gd: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.61`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``64`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``157.25`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Gd`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3539.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1585.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``7.89`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Gadolinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-176.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.64`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.588`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f7_5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6177915369e-05`` - + :tb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.59`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``65`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``158.92534`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3496.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1630.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.27`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.2`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Terbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-188.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.6`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.581`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f9_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6357719009e-05`` - + :dy: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.59`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``66`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``162.5`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Dy`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2835.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1682.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.54`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Dysprosium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-186.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.59`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.573`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f10_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6892647152e-05`` - + :ho: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.58`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``67`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``164.93032`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Ho`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2968.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1743.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``8.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.7`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Holmium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-191.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.58`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f11_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.6892647152e-05`` - + :er: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.57`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``68`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``167.26`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Er`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3136.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1795.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.05`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.4`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Erbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-195.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.56`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f12_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.7943009317e-05`` - + :tm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.56`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``69`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``168.93421`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Tm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2220.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1818.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.33`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.1`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thulium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-200.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.54`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.57`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f13_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.811562674e-05`` - + :yb: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.74`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``70`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``173.04`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Yb`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``1467.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1097.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``6.98`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``24.79`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Ytterbium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-118.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.49`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d0_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.8968651305e-05`` - + :lu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.56`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``71`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``174.967`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Lu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3668.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1936.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``9.84`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.78`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lutetium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-207.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.51`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``HEX`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``1.585`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Xe]4f14_5d1_6s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``9.9137288835e-05`` - + :th: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.65`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``90`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``232.0381`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Th`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``5061.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``2028.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``11.7`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``19.9`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Thorium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``100.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``5.08`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``FCC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]6d2_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010784503195`` - + :pa: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``91`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``231.03588`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pa`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``15.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``15.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Protactinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``3.92`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``TET`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.825`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f2_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010770535752`` - + :u: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``1.42`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``92`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``238.0289`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``U`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``4407.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1405.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``18.9`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.59`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Uranium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-210.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``2.85`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f3_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010867476102`` - + :np: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``93`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``237.048`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Np`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``910.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``20.4`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``11.62`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Neptunium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-188.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``4.72`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``ORC`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f4_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010853744903`` - + :pu: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``94`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-244.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Pu`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``3503.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``913.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``19.8`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``12.32`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Plutonium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``-150.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ``MCL`` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f6_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010949065967`` - + :am: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``95`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-243.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Am`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``2880.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1268.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.6`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``17.86`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Americium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f7_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010935561268`` - + :cm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``96`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-247.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``1340.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``13.511`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``18.28`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Curium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f7_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010989359973`` - + :bk: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``97`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-247.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Bk`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Berkelium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f8_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00010989359973`` - + :cf: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``98`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-251.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Cf`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``900.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Californium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f10_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011042580946`` - + :es: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``99`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-252.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Es`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Einsteinium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f11_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011055797721`` - + :fm: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``100`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-257.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Fm`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Fermium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f12_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011121362374`` - + :md: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``101`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-258.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Md`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Mendelevium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f13_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011134373034`` - + :"no": data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``102`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-259.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``"No"`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Nobelium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f14_6d0_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011147350119`` - + :lr: data of element - + :red:`Keywords` :vdw-radius: radius of element - + **Type** ``float`` - + **Default** ``-1.0`` - + :covalent: covalent value element - + **Type** ``float`` - + **Default** ``0.0`` - + :Z: z-value of element - + **Type** ``int`` - + **Default** ``103`` - + :mass: mass of element - + **Type** ``float`` - + **Default** ``-260.0`` - + :symbol: symbol of element - + **Type** ``str`` - + **Default** ``Lr`` - + :bpt: bpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :mpt: mpt of element - + **Type** ``float`` - + **Default** ``0.0`` - + :density: density of element - + **Type** ``float`` - + **Default** ``0.0`` - + :volume: volume of element - + **Type** ``float`` - + **Default** ``0.0`` - + :name: name of element - + **Type** ``str`` - + **Default** ``Lawrencium`` - + :debye: debye of element - + **Type** ``float`` - + **Default** ``0.0`` - + :a: a of element - + **Type** ``float`` - + **Default** ``0.0`` - + :crystal: crystal of element - + **Type** ``str`` - + **Default** ```` - + :cpera: cpera of element - + **Type** ``float`` - + **Default** ``0.0`` - + :conf: conf of element - + **Type** ``str`` - + **Default** ``[Rn]5f14_6d1_7s2`` - + :r_rms: r_rms of element - + **Type** ``float`` - + **Default** ``0.00011186082063`` - \ No newline at end of file diff --git a/python/template.yml b/python/template.yml index b382b8575..7f3f8507f 100644 --- a/python/template.yml +++ b/python/template.yml @@ -192,11 +192,22 @@ sections: default: -1 docstring: | Number of MPI processes exclusively dedicated to manage orbital bank. + - name: bank_per_node + type: int + default: -1 + docstring: | + Number of MPI processes per node exclusively dedicated to manage orbital bank. - name: omp_threads type: int default: -1 docstring: | - Force the number of omp threads (leave default is better). + Force the number of omp threads for worker processes (leave default is better). + - name: use_omp_num_threads + type: bool + default: false + docstring: | + This will use the environment variable OMP_NUM_THREADS to determine the + average number of threads for OMP (bank will use 1, workers may use more). - name: Basis docstring: | Define polynomial basis. @@ -743,6 +754,13 @@ sections: Write final orbitals to disk, file name ``/phi_

_scf_idx_<0..Np/Na/Nb>``. Can be used as ``mw`` initial guess in subsequent calculations. + - name: write_orbitals_txt + type: bool + default: false + docstring: | + Write final orbitals to disk, in text format, file name + ``/phi_

_scf_idx_<0..Np/Na/Nb>``. + Can be used as ``mw`` initial guess in subsequent calculations. - name: path_orbitals type: str default: orbitals diff --git a/src/analyticfunctions/NuclearGradientFunction.h b/src/analyticfunctions/NuclearGradientFunction.h index 271108823..0eb5a50c2 100644 --- a/src/analyticfunctions/NuclearGradientFunction.h +++ b/src/analyticfunctions/NuclearGradientFunction.h @@ -31,7 +31,7 @@ namespace mrchem { -class NuclearGradientFunction : public mrcpp::RepresentableFunction<3> { +class NuclearGradientFunction : public mrcpp::RepresentableFunction<3, double> { public: /*! * @brief NuclearGradientFunction represents the function: Z * [x,y,z]/|r - o|^3 diff --git a/src/chemistry/Molecule.h b/src/chemistry/Molecule.h index 2dae81136..40823c013 100644 --- a/src/chemistry/Molecule.h +++ b/src/chemistry/Molecule.h @@ -44,6 +44,7 @@ #include "Nucleus.h" #include "properties/DipoleMoment.h" #include "properties/GeometricDerivative.h" +#include "properties/HirshfeldCharges.h" #include "properties/Magnetizability.h" #include "properties/NMRShielding.h" #include "properties/OrbitalEnergies.h" @@ -51,7 +52,6 @@ #include "properties/QuadrupoleMoment.h" #include "properties/SCFEnergy.h" #include "qmfunctions/Orbital.h" -#include "properties/HirshfeldCharges.h" /** @class Molecule * diff --git a/src/driver.cpp b/src/driver.cpp index 49e4629af..2ea9aa626 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -27,8 +27,8 @@ #include #include -#include #include "driver.h" +#include #include "chemistry/Molecule.h" #include "chemistry/Nucleus.h" @@ -51,12 +51,12 @@ #include "qmfunctions/density_utils.h" #include "qmfunctions/orbital_utils.h" +#include "qmoperators/one_electron/AZoraPotential.h" #include "qmoperators/one_electron/ElectricFieldOperator.h" #include "qmoperators/one_electron/KineticOperator.h" #include "qmoperators/one_electron/NuclearGradientOperator.h" #include "qmoperators/one_electron/NuclearOperator.h" #include "qmoperators/one_electron/ZoraOperator.h" -#include "qmoperators/one_electron/AZoraPotential.h" #include "qmoperators/one_electron/H_BB_dia.h" #include "qmoperators/one_electron/H_BM_dia.h" @@ -83,8 +83,8 @@ #include "environment/LPBESolver.h" #include "environment/PBESolver.h" #include "environment/Permittivity.h" -#include "surface_forces/SurfaceForce.h" #include "properties/hirshfeld/HirshfeldPartition.h" +#include "surface_forces/SurfaceForce.h" #include "mrdft/Factory.h" @@ -117,6 +117,7 @@ namespace scf { bool guess_orbitals(const json &input, Molecule &mol); bool guess_energy(const json &input, Molecule &mol, FockBuilder &F); void write_orbitals(const json &input, Molecule &mol); +void write_orbitals_txt(const json &input, Molecule &mol); void calc_properties(const json &input, Molecule &mol, const json &json_fock); void plot_quantities(const json &input, Molecule &mol); } // namespace scf @@ -317,6 +318,7 @@ json driver::scf::run(const json &json_scf, Molecule &mol) { /////////////////////////////////////////////////////////// if (json_out["success"]) { + if (json_scf.contains("write_orbitals_txt")) scf::write_orbitals_txt(json_scf["write_orbitals_txt"], mol); if (json_scf.contains("write_orbitals")) scf::write_orbitals(json_scf["write_orbitals"], mol); if (json_scf.contains("properties")) scf::calc_properties(json_scf["properties"], mol, json_fock); if (json_scf.contains("plots")) scf::plot_quantities(json_scf["plots"], mol); @@ -401,7 +403,7 @@ bool driver::scf::guess_orbitals(const json &json_guess, Molecule &mol) { success = false; } for (const auto &phi_i : Phi) { - double err = (mrcpp::mpi::my_orb(phi_i)) ? std::abs(phi_i.norm() - 1.0) : 0.0; + double err = (mrcpp::mpi::my_func(phi_i)) ? std::abs(phi_i.norm() - 1.0) : 0.0; if (err > 0.01) MSG_WARN("MO not normalized!"); } @@ -458,6 +460,13 @@ bool driver::scf::guess_energy(const json &json_guess, Molecule &mol, FockBuilde return true; } +void driver::scf::write_orbitals_txt(const json &json_orbs, Molecule &mol) { + auto &Phi = mol.getOrbitals(); + orbital::save_orbitals(Phi, json_orbs["file_phi_p"], SPIN::Paired, true); + orbital::save_orbitals(Phi, json_orbs["file_phi_a"], SPIN::Alpha, true); + orbital::save_orbitals(Phi, json_orbs["file_phi_b"], SPIN::Beta, true); +} + void driver::scf::write_orbitals(const json &json_orbs, Molecule &mol) { auto &Phi = mol.getOrbitals(); orbital::save_orbitals(Phi, json_orbs["file_phi_p"], SPIN::Paired); @@ -554,7 +563,7 @@ void driver::scf::calc_properties(const json &json_prop, Molecule &mol, const js el.row(k) = h.trace(Phi).real(); h.clear(); } - // calculate electronic gradient using the surface integrals method + // calculate electronic gradient using the surface integrals method } else if (json_prop["geometric_derivative"]["geom-1"]["method"] == "surface_integrals") { double prec = json_prop["geometric_derivative"]["geom-1"]["precision"]; std::string leb_prec = json_prop["geometric_derivative"]["geom-1"]["surface_integral_precision"]; @@ -564,9 +573,7 @@ void driver::scf::calc_properties(const json &json_prop, Molecule &mol, const js auto &nuc = G.getNuclear(); auto &el = G.getElectronic(); // set electronic gradient - for (int k = 0; k < mol.getNNuclei(); k++) { - el.row(k) = surfaceForces.row(k) - nuc.row(k); - } + for (int k = 0; k < mol.getNNuclei(); k++) { el.row(k) = surfaceForces.row(k) - nuc.row(k); } } else { MSG_ABORT("Invalid method for geometric derivative"); } @@ -630,9 +637,9 @@ void driver::scf::calc_properties(const json &json_prop, Molecule &mol, const js mrchem::density::compute(prec, rho, Phi, DensityType::Total); Eigen::VectorXd charges = Eigen::VectorXd::Zero(mol.getNNuclei()); for (int i = 0; i < mol.getNNuclei(); i++) { - if ( ! mrcpp::mpi::my_orb(i) ) continue; // my_orb also works for atoms. + if (!mrcpp::mpi::my_func(i)) continue; // my_orb also works for atoms. double charge = partitioner.getHirshfeldPartitionIntegral(i, rho, prec); - charge = - charge + mol.getNuclei()[i].getCharge(); + charge = -charge + mol.getNuclei()[i].getCharge(); charges(i) = charge; } mrcpp::mpi::allreduce_vector(charges, mrcpp::mpi::comm_wrk); @@ -690,7 +697,7 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { if (line) plt.linePlot(npts, rho, fname); if (surf) plt.surfPlot(npts, rho, fname); if (cube) plt.cubePlot(npts, rho, fname); - rho.free(NUMBER::Total); + rho.free(); mrcpp::print::time(1, fname, t_lap); if (orbital::size_singly(Phi) > 0) { @@ -701,7 +708,7 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { if (surf) plt.surfPlot(npts, rho, fname); if (cube) plt.cubePlot(npts, rho, fname); mrcpp::print::time(1, fname, t_lap); - rho.free(NUMBER::Total); + rho.free(); t_lap.start(); fname = path + "/rho_a"; @@ -710,7 +717,7 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { if (surf) plt.surfPlot(npts, rho, fname); if (cube) plt.cubePlot(npts, rho, fname); mrcpp::print::time(1, fname, t_lap); - rho.free(NUMBER::Total); + rho.free(); t_lap.start(); fname = path + "/rho_b"; @@ -718,7 +725,7 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { if (line) plt.linePlot(npts, rho, fname); if (surf) plt.surfPlot(npts, rho, fname); if (cube) plt.cubePlot(npts, rho, fname); - rho.free(NUMBER::Total); + rho.free(); mrcpp::print::time(1, fname, t_lap); } } @@ -728,10 +735,10 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { if (orb_idx[0] < 0) { // Plotting ALL orbitals for (auto i = 0; i < Phi.size(); i++) { - if (not mrcpp::mpi::my_orb(Phi[i])) continue; + if (not mrcpp::mpi::my_func(Phi[i])) continue; t_lap.start(); std::stringstream name; - name << path << "/phi_" << Phi[i].printSpin() << "_scf_idx_" << i; + name << path << "/phi_" << Orbital(Phi[i]).printSpin() << "_scf_idx_" << i; if (line) plt.linePlot(npts, Phi[i], name.str()); if (surf) plt.surfPlot(npts, Phi[i], name.str()); if (cube) plt.cubePlot(npts, Phi[i], name.str()); @@ -740,7 +747,7 @@ void driver::scf::plot_quantities(const json &json_plot, Molecule &mol) { } else { // Plotting some orbitals for (auto &i : orb_idx) { - if (not mrcpp::mpi::my_orb(Phi[i])) continue; + if (not mrcpp::mpi::my_func(Phi[i])) continue; t_lap.start(); std::stringstream name; auto sp = 'u'; @@ -1096,9 +1103,7 @@ void driver::build_fock_operator(const json &json_fock, Molecule &mol, FockBuild std::string azora_dir_src = AZORA_POTENTIALS_SOURCE_DIR; std::string azora_dir_install = AZORA_POTENTIALS_INSTALL_DIR; std::string azora_dir = ""; - if (json_fock["zora_operator"].contains("azora_potential_path")) { - azora_dir = json_fock["zora_operator"]["azora_potential_path"]; - } + if (json_fock["zora_operator"].contains("azora_potential_path")) { azora_dir = json_fock["zora_operator"]["azora_potential_path"]; } std::string azora_dir_final; if (azora_dir != "") { diff --git a/src/environment/GPESolver.cpp b/src/environment/GPESolver.cpp index df7141c04..aecb68d3d 100644 --- a/src/environment/GPESolver.cpp +++ b/src/environment/GPESolver.cpp @@ -60,7 +60,7 @@ GPESolver::GPESolver(const Permittivity &e, const Density &rho_nuc, PoissonOpera , poisson(P) {} GPESolver::~GPESolver() { - this->rho_nuc.free(NUMBER::Real); + this->rho_nuc.free(); clear(); } @@ -80,15 +80,13 @@ void GPESolver::computeDensities(const Density &rho_el, Density &rho_out) { switch (this->density_type) { case SCRFDensityType::TOTAL: - mrcpp::cplxfunc::add(rho_out, 1.0, rho_el, 1.0, this->rho_nuc, -1.0); + mrcpp::add(rho_out, 1.0, rho_el, 1.0, this->rho_nuc, -1.0); break; case SCRFDensityType::ELECTRONIC: - // using const_cast is absolutely EVIL here and in principle shouldn't be needed! - // however MRCPP is not everywhere const-correct, so here we go! - mrcpp::cplxfunc::deep_copy(rho_out, const_cast(rho_el)); + mrcpp::deep_copy(rho_out, rho_el); break; case SCRFDensityType::NUCLEAR: - mrcpp::cplxfunc::deep_copy(rho_out, this->rho_nuc); + mrcpp::deep_copy(rho_out, this->rho_nuc); break; default: MSG_ABORT("Invalid density type"); @@ -96,19 +94,20 @@ void GPESolver::computeDensities(const Density &rho_el, Density &rho_out) { print_utils::qmfunction(3, "Vacuum density", rho_out, timer); } -void GPESolver::computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFunction &out_gamma) { - +void GPESolver::computeGamma(mrcpp::CompFunction<3> &potential, mrcpp::CompFunction<3> &out_gamma) { auto d_V = mrcpp::gradient(*derivative, potential.real()); // FunctionTreeVector resetComplexFunction(out_gamma); for (int d = 0; d < 3; d++) { auto C_pin = this->epsilon.getCavity_p(); mrcpp::AnalyticFunction<3> d_cav(C_pin->getGradVector()[d]); - mrcpp::ComplexFunction cplxfunc_prod; - mrcpp::cplxfunc::multiply(cplxfunc_prod, get_func(d_V, d), d_cav, this->apply_prec, 1); + mrcpp::CompFunction<3> cplxfunc_prod; + + mrcpp::FunctionTree<3, double> &Tree = get_func(d_V, d); + mrcpp::multiply(cplxfunc_prod, Tree, d_cav, this->apply_prec, 1); // add result into out_gamma if (d == 0) { - mrcpp::cplxfunc::deep_copy(out_gamma, cplxfunc_prod); + mrcpp::deep_copy(out_gamma, cplxfunc_prod); } else { out_gamma.add(1.0, cplxfunc_prod); } @@ -118,32 +117,31 @@ void GPESolver::computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFu mrcpp::clear(d_V, true); } -mrcpp::ComplexFunction GPESolver::solvePoissonEquation(const mrcpp::ComplexFunction &in_gamma, const Density &rho_el) { - mrcpp::ComplexFunction Poisson_func; - mrcpp::ComplexFunction rho_eff; - mrcpp::ComplexFunction first_term; - mrcpp::ComplexFunction Vr_np1; - Vr_np1.alloc(NUMBER::Real); +mrcpp::CompFunction<3> GPESolver::solvePoissonEquation(const mrcpp::CompFunction<3> &in_gamma, const Density &rho_el) { + mrcpp::CompFunction<3> Poisson_func; + mrcpp::CompFunction<3> rho_eff; + mrcpp::CompFunction<3> first_term; + mrcpp::CompFunction<3> Vr_np1; + Vr_np1.func_ptr->isreal = 1; + Vr_np1.alloc(1); auto eps_inv_func = mrcpp::AnalyticFunction<3>([this](const mrcpp::Coord<3> &r) { return 1.0 / this->epsilon.evalf(r); }); Density rho_tot(false); computeDensities(rho_el, rho_tot); - mrcpp::cplxfunc::multiply(first_term, rho_tot, eps_inv_func, this->apply_prec); + mrcpp::multiply(first_term, rho_tot, eps_inv_func, this->apply_prec); - mrcpp::cplxfunc::add(rho_eff, 1.0, first_term, -1.0, rho_tot, -1.0); - rho_tot.free(NUMBER::Real); + mrcpp::add(rho_eff, 1.0, first_term, -1.0, rho_tot, -1.0); + rho_tot.free(); - mrcpp::cplxfunc::add(Poisson_func, 1.0, in_gamma, 1.0, rho_eff, -1.0); + mrcpp::add(Poisson_func, 1.0, in_gamma, 1.0, rho_eff, -1.0); mrcpp::apply(this->apply_prec, Vr_np1.real(), *poisson, Poisson_func.real()); return Vr_np1; } -void GPESolver::accelerateConvergence(mrcpp::ComplexFunction &dfunc, mrcpp::ComplexFunction &func, KAIN &kain) { - OrbitalVector phi_n(0); - OrbitalVector dPhi_n(0); - phi_n.push_back(Orbital(SPIN::Paired)); - dPhi_n.push_back(Orbital(SPIN::Paired)); +void GPESolver::accelerateConvergence(mrcpp::CompFunction<3> &dfunc, mrcpp::CompFunction<3> &func, KAIN &kain) { + OrbitalVector phi_n(1); + OrbitalVector dPhi_n(1); phi_n[0] = func; dPhi_n[0] = dfunc; @@ -160,7 +158,7 @@ void GPESolver::accelerateConvergence(mrcpp::ComplexFunction &dfunc, mrcpp::Comp dPhi_n.clear(); } -void GPESolver::runMicroIterations(const mrcpp::ComplexFunction &V_vac, const Density &rho_el) { +void GPESolver::runMicroIterations(const mrcpp::CompFunction<3> &V_vac, const Density &rho_el) { KAIN kain(this->history); kain.setLocalPrintLevel(10); @@ -171,30 +169,30 @@ void GPESolver::runMicroIterations(const mrcpp::ComplexFunction &V_vac, const De while (update >= this->conv_thrs && iter <= max_iter) { Timer t_iter; // solve the poisson equation - mrcpp::ComplexFunction V_tot; - mrcpp::ComplexFunction gamma_n; - mrcpp::ComplexFunction dVr_n; + mrcpp::CompFunction<3> V_tot; + mrcpp::CompFunction<3> gamma_n; + mrcpp::CompFunction<3> dVr_n; - mrcpp::cplxfunc::add(V_tot, 1.0, this->Vr_n, 1.0, V_vac, -1.0); + mrcpp::add(V_tot, 1.0, this->Vr_n, 1.0, V_vac, -1.0); computeGamma(V_tot, gamma_n); auto Vr_np1 = solvePoissonEquation(gamma_n, rho_el); norm = Vr_np1.norm(); // use a convergence accelerator - mrcpp::cplxfunc::add(dVr_n, 1.0, Vr_np1, -1.0, this->Vr_n, -1.0); + mrcpp::add(dVr_n, 1.0, Vr_np1, -1.0, this->Vr_n, -1.0); update = dVr_n.norm(); if (iter > 1 and this->history > 0) { accelerateConvergence(dVr_n, Vr_n, kain); - Vr_np1.free(NUMBER::Real); - mrcpp::cplxfunc::add(Vr_np1, 1.0, Vr_n, 1.0, dVr_n, -1.0); + Vr_np1.free(); + mrcpp::add(Vr_np1, 1.0, Vr_n, 1.0, dVr_n, -1.0); } // set up for next iteration resetComplexFunction(this->Vr_n); - mrcpp::cplxfunc::deep_copy(this->Vr_n, Vr_np1); - Vr_np1.free(NUMBER::Real); + mrcpp::deep_copy(this->Vr_n, Vr_np1); + Vr_np1.free(); printConvergenceRow(iter, norm, update, t_iter.elapsed()); @@ -233,23 +231,27 @@ void GPESolver::printConvergenceRow(int i, double norm, double update, double ti println(3, o_txt.str()); } -mrcpp::ComplexFunction &GPESolver::solveEquation(double prec, const Density &rho_el) { +mrcpp::CompFunction<3> &GPESolver::solveEquation(double prec, const Density &rho_el) { this->apply_prec = prec; Density rho_tot(false); computeDensities(rho_el, rho_tot); Timer t_vac; - mrcpp::ComplexFunction V_vac; - V_vac.alloc(NUMBER::Real); + mrcpp::CompFunction<3> V_vac; + V_vac.func_ptr->isreal = 1; + V_vac.alloc(1); mrcpp::apply(this->apply_prec, V_vac.real(), *poisson, rho_tot.real()); - rho_tot.free(NUMBER::Real); + rho_tot.free(); print_utils::qmfunction(3, "Vacuum potential", V_vac, t_vac); // set up the zero-th iteration potential and gamma, so the first iteration gamma and potentials can be made Timer t_gamma; - if (not this->Vr_n.hasReal()) { - mrcpp::ComplexFunction gamma_0; - mrcpp::ComplexFunction V_tot; + if (Vr_n.Ncomp() == 0) { + mrcpp::CompFunction<3> gamma_0; + mrcpp::CompFunction<3> V_tot; + gamma_0.func_ptr->isreal = 1; + gamma_0.alloc(1); + computeGamma(V_vac, gamma_0); this->Vr_n = solvePoissonEquation(gamma_0, rho_el); } @@ -263,15 +265,15 @@ mrcpp::ComplexFunction &GPESolver::solveEquation(double prec, const Density &rho } auto GPESolver::computeEnergies(const Density &rho_el) -> std::tuple { - auto Er_nuc = 0.5 * mrcpp::cplxfunc::dot(this->rho_nuc, this->Vr_n).real(); - auto Er_el = 0.5 * mrcpp::cplxfunc::dot(rho_el, this->Vr_n).real(); + auto Er_nuc = 0.5 * mrcpp::dot(this->rho_nuc, this->Vr_n).real(); + auto Er_el = 0.5 * mrcpp::dot(rho_el, this->Vr_n).real(); return {Er_el, Er_nuc}; } -void GPESolver::resetComplexFunction(mrcpp::ComplexFunction &function) { - if (function.hasReal()) function.free(NUMBER::Real); - if (function.hasImag()) function.free(NUMBER::Imag); - function.alloc(NUMBER::Real); +void GPESolver::resetComplexFunction(mrcpp::CompFunction<3> &function) { + function.func_ptr->isreal = 1; + function.func_ptr->iscomplex = 0; + function.alloc(1); } void GPESolver::printParameters() const { diff --git a/src/environment/GPESolver.h b/src/environment/GPESolver.h index acd8adf8e..621140be0 100644 --- a/src/environment/GPESolver.h +++ b/src/environment/GPESolver.h @@ -129,7 +129,7 @@ class GPESolver { // just iterate through V_R only. Only issue here is (1 -1\epsilon)/\epsilon * \rho_nuc as I am not sure how to represent this as an analytitcal function, // maybe after applying the Poisson operator? - mrcpp::ComplexFunction Vr_n; + mrcpp::CompFunction<3> Vr_n; std::shared_ptr> derivative; std::shared_ptr poisson; @@ -152,14 +152,14 @@ class GPESolver { /** @brief Computes the surface charge distibution due to polarization at the solute-solvent boundary * @param potential Potential used to compute \f$\nabla V(\mathbf{r})\f$ - * @param out_gamma ComplexFunction in which the surface charge distribution will be computed. + * @param out_gamma CompFunction<3> in which the surface charge distribution will be computed. * @details The surface charge distribution is given by * \f[ * \gamma_s(\mathbf{r}) = \frac{\log \frac{\epsilon_{in}}{\epsilon_{out}}}{4 \pi } \left( \nabla C(\mathbf{r}) \cdot \nabla V(\mathbf{r})\right) * \f] * where \f$\epsilon_{in}\f$ is the permittivity inside the cavity and \f$\epsilon_{out}\f$ is the permittivity outside the cavity. */ - virtual void computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFunction &out_gamma); + virtual void computeGamma(mrcpp::CompFunction<3> &potential, mrcpp::CompFunction<3> &out_gamma); /** @brief Iterates once through the Generalized Poisson equation to compute the reaction potential * @param ingamma the surface charge distribution @@ -172,14 +172,14 @@ class GPESolver { * where \f$\gamma_s(\mathbf{r})\f$ is the surface charge distribution describing the polarization at the surface, \f$\rho_{eff}(\mathbf{r})\f$ is the effective charge density given by * \f$\frac{\rho(\mathbf{r})}{\epsilon(\mathbf{r})}\f$ and \f$V_R(\mathbf{r})\f$ is the reaction potential. */ - mrcpp::ComplexFunction solvePoissonEquation(const mrcpp::ComplexFunction &ingamma, const Density &rho_el); + mrcpp::CompFunction<3> solvePoissonEquation(const mrcpp::CompFunction<3> &ingamma, const Density &rho_el); /** @brief Uses KAIN to accelerate convergece of the reaction potential * @param dfunc the current update of the reaction potential * @param func the current reaction potential * @param kain the KAIN object */ - void accelerateConvergence(mrcpp::ComplexFunction &dfunc, mrcpp::ComplexFunction &func, KAIN &kain); + void accelerateConvergence(mrcpp::CompFunction<3> &dfunc, mrcpp::CompFunction<3> &func, KAIN &kain); /** @brief Iterates through the application of the Poisson operator to Solve the Generalized Poisson equation * @param V_vac the vacuum potential @@ -195,7 +195,7 @@ class GPESolver { * -# Update the reaction potential as \f$V_R(\mathbf{r}) = V_R^{old}(\mathbf{r}) + \Delta V_R(\mathbf{r})\f$ * -# Check if the reaction potential has converged, if not, repeat from step 1. */ - void runMicroIterations(const mrcpp::ComplexFunction &V_vac, const Density &rho_el); + void runMicroIterations(const mrcpp::CompFunction<3> &V_vac, const Density &rho_el); /** @brief Setups and computes the reaction potential through the microiterations * @param V_vac the vacuum potential @@ -209,13 +209,13 @@ class GPESolver { * the method then runs the micro-iterations through #runMicroIterations and returns the converged reaction potential. * If this is not the first SCF iteration, the previous converged reaction potential is used as an initial guess for the micro-iterations. */ - mrcpp::ComplexFunction &solveEquation(double prec, const Density &rho_el); + mrcpp::CompFunction<3> &solveEquation(double prec, const Density &rho_el); /** @brief Frees the memory used by the FunctionTrees of the input Complexfunction and reallocates them. - * @param function the ComplexFunction to reset - * @details This is done to avoid memory leaks when the ComplexFunction is used in the micro-iterations. + * @param function the CompFunction<3> to reset + * @details This is done to avoid memory leaks when the CompFunction<3> is used in the micro-iterations. */ - void resetComplexFunction(mrcpp::ComplexFunction &function); + void resetComplexFunction(mrcpp::CompFunction<3> &function); virtual void printParameters() const; void printConvergenceRow(int i, double norm, double update, double time) const; diff --git a/src/environment/LPBESolver.cpp b/src/environment/LPBESolver.cpp index 6d6bb6868..1a3c046db 100644 --- a/src/environment/LPBESolver.cpp +++ b/src/environment/LPBESolver.cpp @@ -56,9 +56,9 @@ LPBESolver::LPBESolver(const Permittivity &e, SCRFDensityType density_type) : PBESolver(e, k, rho_nuc, P, D, kain_hist, max_iter, dyn_thrs, density_type) {} // TODO separate this for the linear and non-linear solver -void LPBESolver::computePBTerm(mrcpp::ComplexFunction &V_tot, const double salt_factor, mrcpp::ComplexFunction &pb_term) { +void LPBESolver::computePBTerm(mrcpp::CompFunction<3> &V_tot, const double salt_factor, mrcpp::CompFunction<3> &pb_term) { resetComplexFunction(pb_term); - mrcpp::cplxfunc::multiply(pb_term, V_tot, this->kappa, this->apply_prec); + mrcpp::multiply(pb_term, V_tot, this->kappa, this->apply_prec); pb_term.rescale(salt_factor / (4.0 * mrcpp::pi)); } diff --git a/src/environment/LPBESolver.h b/src/environment/LPBESolver.h index 25f617d3c..db6174217 100644 --- a/src/environment/LPBESolver.h +++ b/src/environment/LPBESolver.h @@ -61,10 +61,10 @@ class LPBESolver final : public PBESolver { /** @brief Computes the PB term * @param[in] V_tot the total potential * @param[in] salt_factor the salt factor deciding how much of the total concentration to include in the PB term - * @param[out] pb_term the ComplexFunction in which to store the result + * @param[out] pb_term the CompFunction<3> in which to store the result * @details The PB term is computed as \f$ \kappa^2 V_{tot} \f$ and returned. */ - void computePBTerm(mrcpp::ComplexFunction &V_tot, const double salt_factor, mrcpp::ComplexFunction &pb_term) override; + void computePBTerm(mrcpp::CompFunction<3> &V_tot, const double salt_factor, mrcpp::CompFunction<3> &pb_term) override; std::string solver_name{"Linearized Poisson-Boltzmann"}; }; } // namespace mrchem diff --git a/src/environment/PBESolver.cpp b/src/environment/PBESolver.cpp index 6c5e22fd6..a2671e5d8 100644 --- a/src/environment/PBESolver.cpp +++ b/src/environment/PBESolver.cpp @@ -57,18 +57,19 @@ PBESolver::PBESolver(const Permittivity &e, : GPESolver(e, rho_nuc, P, D, kain_hist, max_iter, dyn_thrs, density_type) , kappa(k) {} -void PBESolver::computePBTerm(mrcpp::ComplexFunction &V_tot, const double salt_factor, mrcpp::ComplexFunction &pb_term) { +void PBESolver::computePBTerm(mrcpp::CompFunction<3> &V_tot, const double salt_factor, mrcpp::CompFunction<3> &pb_term) { // create a lambda function for the sinh(V) term and multiply it with kappa and salt factor to get the PB term auto sinh_f = [salt_factor](const double &V) { return (salt_factor / (4.0 * mrcpp::pi)) * std::sinh(V); }; resetComplexFunction(pb_term); - mrcpp::ComplexFunction sinhV; - sinhV.alloc(NUMBER::Real); + mrcpp::CompFunction<3> sinhV; + sinhV.func_ptr->isreal = 1; + sinhV.alloc(1); mrcpp::map(this->apply_prec / 100, sinhV.real(), V_tot.real(), sinh_f); - mrcpp::cplxfunc::multiply(pb_term, sinhV, this->kappa, this->apply_prec); + mrcpp::multiply(pb_term, sinhV, this->kappa, this->apply_prec); } -void PBESolver::computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFunction &out_gamma) { +void PBESolver::computeGamma(mrcpp::CompFunction<3> &potential, mrcpp::CompFunction<3> &out_gamma) { auto d_V = mrcpp::gradient(*derivative, potential.real()); // FunctionTreeVector resetComplexFunction(out_gamma); @@ -76,21 +77,21 @@ void PBESolver::computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFu for (int d = 0; d < 3; d++) { auto C_pin = this->epsilon.getCavity_p(); mrcpp::AnalyticFunction<3> d_cav(C_pin->getGradVector()[d]); - mrcpp::ComplexFunction cplxfunc_prod; - mrcpp::cplxfunc::multiply(cplxfunc_prod, get_func(d_V, d), d_cav, this->apply_prec, 1); + mrcpp::CompFunction<3> cplxfunc_prod; + mrcpp::FunctionTree<3, double> &Tree = get_func(d_V, d); + mrcpp::multiply(cplxfunc_prod, Tree, d_cav, this->apply_prec, 1); // add result into out_gamma if (d == 0) { - mrcpp::cplxfunc::deep_copy(out_gamma, cplxfunc_prod); + mrcpp::deep_copy(out_gamma, cplxfunc_prod); } else { out_gamma.add(1.0, cplxfunc_prod); } } - out_gamma.rescale(std::log((epsilon.getValueIn() / epsilon.getValueOut())) * (1.0 / (4.0 * mrcpp::pi))); mrcpp::clear(d_V, true); // add PB term - mrcpp::ComplexFunction pb_term; + mrcpp::CompFunction<3> pb_term; auto salt_factor = 1.0; // placeholder for now, want to change it wrt to convergence in future computePBTerm(potential, salt_factor, pb_term); out_gamma.add(-1.0, pb_term); diff --git a/src/environment/PBESolver.h b/src/environment/PBESolver.h index c5215d55b..12d690bd0 100644 --- a/src/environment/PBESolver.h +++ b/src/environment/PBESolver.h @@ -78,17 +78,17 @@ class PBESolver : public GPESolver { /** @brief constructs the surface chage distribution and adds it to the PB term * @param[in] potential the potential to compute \f$\nabla V\f$ from - * @param[out] out_gamma the ComplexFunction in which to store the result + * @param[out] out_gamma the CompFunction<3> in which to store the result * @details Method follows the implementation in GPESolver::computeGamma, but adds the PB term to the surface charge distribution. */ - void computeGamma(mrcpp::ComplexFunction &potential, mrcpp::ComplexFunction &out_gamma) override; + void computeGamma(mrcpp::CompFunction<3> &potential, mrcpp::CompFunction<3> &out_gamma) override; /** @brief Computes the PB term * @param[in] V_tot the total potential * @param[in] salt_factor the salt factor deciding how much of the total concentration to include in the PB term - * @param[out] pb_term the ComplexFunction in which to store the result + * @param[out] pb_term the CompFunction<3> in which to store the result * @details The PB term is computed as \f$ \kappa^2 \sinh(V_{tot}) \f$ and returned. */ - virtual void computePBTerm(mrcpp::ComplexFunction &V_tot, const double salt_factor, mrcpp::ComplexFunction &pb_term); + virtual void computePBTerm(mrcpp::CompFunction<3> &V_tot, const double salt_factor, mrcpp::CompFunction<3> &pb_term); }; } // namespace mrchem diff --git a/src/initial_guess/core.cpp b/src/initial_guess/core.cpp index 6df6ea298..ca4411b4b 100644 --- a/src/initial_guess/core.cpp +++ b/src/initial_guess/core.cpp @@ -37,7 +37,6 @@ #include "utils/print_utils.h" #include "qmfunctions/Orbital.h" -#include "qmfunctions/OrbitalIterator.h" #include "qmfunctions/orbital_utils.h" #include "qmoperators/one_electron/MomentumOperator.h" @@ -205,8 +204,8 @@ void initial_guess::core::project_ao(OrbitalVector &Phi, double prec, const Nucl HydrogenFunction h_func(n, l, m, Z, R); Phi.push_back(Orbital(SPIN::Paired)); Phi.back().setRank(Phi.size() - 1); - if (mrcpp::mpi::my_orb(Phi.back())) { - mrcpp::cplxfunc::project(Phi.back(), h_func, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi.back())) { + mrcpp::project(Phi.back(), h_func, prec); if (std::abs(Phi.back().norm() - 1.0) > 0.01) MSG_WARN("AO not normalized!"); } @@ -227,13 +226,13 @@ void initial_guess::core::project_ao(OrbitalVector &Phi, double prec, const Nucl void initial_guess::core::rotate_orbitals(OrbitalVector &Psi, double prec, ComplexMatrix &U, OrbitalVector &Phi) { if (Psi.size() == 0) return; Timer t_tot; - mrcpp::mpifuncvec::rotate(Phi, U, Psi, prec); + mrcpp::rotate(Phi, U, Psi, prec); mrcpp::print::time(1, "Rotating orbitals", t_tot); } ComplexMatrix initial_guess::core::diagonalize(OrbitalVector &Phi, MomentumOperator &p, RankZeroOperator &V) { Timer t1; - ComplexMatrix S_m12 = orbital::calc_lowdin_matrix(Phi); + ComplexMatrix S_m12 = mrcpp::calc_lowdin_matrix(Phi); mrcpp::print::separator(2, '-'); ComplexMatrix t_tilde = qmoperator::calc_kinetic_matrix(p, Phi, Phi); ComplexMatrix v_tilde = V(Phi, Phi); diff --git a/src/initial_guess/cube.cpp b/src/initial_guess/cube.cpp index 36bb0491f..ebc5693ce 100644 --- a/src/initial_guess/cube.cpp +++ b/src/initial_guess/cube.cpp @@ -118,9 +118,9 @@ bool initial_guess::cube::project_mo(OrbitalVector &Phi, double prec, const std: bool success = true; for (int i = 0; i < Phi.size(); i++) { Timer t_i; - if (mrcpp::mpi::my_orb(Phi[i])) { + if (mrcpp::mpi::my_func(Phi[i])) { CUBEfunction phi_i = CUBEVector[i]; - Phi[i].alloc(NUMBER::Real); + Phi[i].alloc(1); mrcpp::project(prec, Phi[i].real(), phi_i); std::stringstream o_txt; o_txt << std::setw(w1 - 1) << i; diff --git a/src/initial_guess/gto.cpp b/src/initial_guess/gto.cpp index 8a2082d4a..d71a4a28e 100644 --- a/src/initial_guess/gto.cpp +++ b/src/initial_guess/gto.cpp @@ -148,10 +148,9 @@ void initial_guess::gto::project_mo(OrbitalVector &Phi, double prec, const std:: Timer t3; for (int i = 0; i < Phi.size(); i++) { Timer t_i; - if (mrcpp::mpi::my_orb(Phi[i])) { + if (mrcpp::mpi::my_func(Phi[i])) { GaussExp<3> mo_i = gto_exp.getMO(i, MO.transpose()); mo_i.calcScreening(screen); - Phi[i].alloc(NUMBER::Real); mrcpp::project(prec, Phi[i].real(), mo_i); } std::stringstream o_txt; @@ -224,8 +223,8 @@ void initial_guess::gto::project_ao(OrbitalVector &Phi, double prec, const Nucle Phi.back().setRank(Phi.size() - 1); GaussExp<3> ao_i = gto_exp.getAO(i); ao_i.calcScreening(screen); - if (mrcpp::mpi::my_orb(Phi.back())) { - mrcpp::cplxfunc::project(Phi.back(), ao_i, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi.back())) { + mrcpp::project(Phi.back(), ao_i, prec); if (std::abs(Phi.back().norm() - 1.0) > 0.01) MSG_WARN("AO not normalized!"); } diff --git a/src/initial_guess/mw.cpp b/src/initial_guess/mw.cpp index 2548917e3..4477801e8 100644 --- a/src/initial_guess/mw.cpp +++ b/src/initial_guess/mw.cpp @@ -48,7 +48,6 @@ bool project_mo(OrbitalVector &Phi, double prec, const std::string &mo_file); bool initial_guess::mw::setup(OrbitalVector &Phi, double prec, const std::string &file_p, const std::string &file_a, const std::string &file_b) { if (Phi.size() == 0) return false; - mrcpp::print::separator(0, '~'); print_utils::text(0, "Calculation ", "Compute initial orbitals"); print_utils::text(0, "Method ", "Project MW molecular orbitals"); @@ -104,27 +103,25 @@ bool initial_guess::mw::project_mo(OrbitalVector &Phi, double prec, const std::s bool success = true; for (int i = 0; i < Phi.size(); i++) { Timer t_i; - if (mrcpp::mpi::my_orb(Phi[i])) { + if (mrcpp::mpi::my_func(Phi[i])) { std::stringstream orbname; orbname << mo_file << "_idx_" << i; Orbital phi_i; orbital::loadOrbital(orbname.str(), phi_i); - if (phi_i.squaredNorm() < 0.0) { + if (phi_i.getSquareNorm() < 0.0) { MSG_ERROR("Guess orbital not found: " << orbname.str()); success &= false; } - if (phi_i.hasReal()) { - Phi[i].alloc(NUMBER::Real); + if (phi_i.isreal()) { // Refine to get accurate function values mrcpp::refine_grid(phi_i.real(), 1); mrcpp::project(prec, Phi[i].real(), phi_i.real()); } - if (phi_i.hasImag()) { - Phi[i].alloc(NUMBER::Imag); + if (phi_i.iscomplex()) { // Refine to get accurate function values - mrcpp::refine_grid(phi_i.imag(), 1); - mrcpp::project(prec, Phi[i].imag(), phi_i.imag()); + mrcpp::refine_grid(phi_i.complex(), 1); + mrcpp::project(prec, Phi[i].complex(), phi_i.complex()); } std::stringstream o_txt; o_txt << std::setw(w1 - 1) << i; diff --git a/src/initial_guess/sad.cpp b/src/initial_guess/sad.cpp index 86176ad87..afc31cbb5 100644 --- a/src/initial_guess/sad.cpp +++ b/src/initial_guess/sad.cpp @@ -104,7 +104,7 @@ bool initial_guess::sad::setup(OrbitalVector &Phi, double prec, double screen, c // Compute XC density Density &rho_xc = XC.getDensity(DensityType::Total); - mrcpp::cplxfunc::deep_copy(rho_xc, rho_j); + mrcpp::deep_copy(rho_xc, rho_j); if (plevel == 1) mrcpp::print::time(1, "Projecting GTO density", t_lap); // Project AO basis of hydrogen functions @@ -182,7 +182,7 @@ bool initial_guess::sad::setup(OrbitalVector &Phi, double prec, double screen, c // Compute XC density Density &rho_xc = XC.getDensity(DensityType::Total); - mrcpp::cplxfunc::deep_copy(rho_xc, rho_j); + mrcpp::deep_copy(rho_xc, rho_j); if (plevel == 1) mrcpp::print::time(1, "Projecting GTO density", t_lap); // Project AO basis of hydrogen functions @@ -200,7 +200,6 @@ bool initial_guess::sad::setup(OrbitalVector &Phi, double prec, double screen, c // Compute Fock matrix mrcpp::print::header(2, "Diagonalizing Fock matrix"); ComplexMatrix U = initial_guess::core::diagonalize(Psi, p, V); - // Rotate orbitals and fill electrons by Aufbau t_lap.start(); auto Phi_a = orbital::disjoin(Phi, SPIN::Alpha); @@ -249,7 +248,7 @@ void initial_guess::sad::project_atomic_densities(double prec, Density &rho_tot, Timer t_tot; Density rho_loc(false); - rho_loc.alloc(NUMBER::Real); + rho_loc.alloc(1); rho_loc.real().setZero(); Timer t_loc; diff --git a/src/mrdft/Functional.h b/src/mrdft/Functional.h index c23374f4d..8db39337d 100644 --- a/src/mrdft/Functional.h +++ b/src/mrdft/Functional.h @@ -48,7 +48,7 @@ class Functional { void setLogGradient(bool log) { log_grad = log; } void setDensityCutoff(double cut) { cutoff = cut; } - void setDerivOp(std::unique_ptr> &d) {derivOp = std::move(d);} + void setDerivOp(std::unique_ptr> &d) { derivOp = std::move(d); } virtual bool isSpin() const = 0; bool isLDA() const { return (not(isGGA() or isMetaGGA())); } diff --git a/src/mrenv.cpp b/src/mrenv.cpp index 6823031a2..7cb93a412 100644 --- a/src/mrenv.cpp +++ b/src/mrenv.cpp @@ -23,10 +23,10 @@ * */ +#include "MRCPP/utils/parallel.h" #include #include #include -#include "MRCPP/utils/parallel.h" #include "mrchem.h" #include "mrenv.h" @@ -123,14 +123,16 @@ void mrenv::init_mra(const json &json_mra) { } else { MSG_ABORT("Invalid basis type!"); } - mrcpp::cplxfunc::SetdefaultMRA(MRA); + mrcpp::SetdefaultMRA(MRA); } void mrenv::init_mpi(const json &json_mpi) { mrcpp::mpi::numerically_exact = json_mpi["numerically_exact"]; mrcpp::mpi::shared_memory_size = json_mpi["shared_memory_size"]; mrcpp::mpi::bank_size = json_mpi["bank_size"]; + mrcpp::mpi::bank_per_node = json_mpi["bank_per_node"]; mrcpp::mpi::omp_threads = json_mpi["omp_threads"]; + mrcpp::mpi::use_omp_num_threads = json_mpi["use_omp_num_threads"]; mrcpp::mpi::initialize(); // NB: must be after bank_size and init_mra but before init_printer and print_header } diff --git a/src/parallel.cpp b/src/parallel.cpp deleted file mode 100644 index 10b6cdacc..000000000 --- a/src/parallel.cpp +++ /dev/null @@ -1,546 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#include -#include - -#include "parallel.h" -#include "qmfunctions/ComplexFunction.h" -#include "qmfunctions/Density.h" -#include "qmfunctions/Orbital.h" -#include "utils/Bank.h" - -#ifdef MRCHEM_HAS_OMP -#ifndef MRCPP_HAS_OMP -#include -#endif -#define mrchem_get_max_threads() omp_get_max_threads() -#define mrchem_get_num_threads() omp_get_num_threads() -#define mrchem_get_thread_num() omp_get_thread_num() -#define mrchem_set_dynamic(n) omp_set_dynamic(n) -#else -#define mrchem_get_max_threads() 1 -#define mrchem_get_num_threads() 1 -#define mrchem_get_thread_num() 0 -#define mrchem_set_dynamic(n) -#endif - -using mrcpp::Printer; - -namespace mrchem { - -namespace omp { - -int n_threads = mrchem_get_max_threads(); - -} // namespace omp - -using namespace Eigen; - -Bank dataBank; - -namespace mpi { - -bool numerically_exact = false; -int shared_memory_size = 1000; - -// these parameters set by initialize() -int world_size = 1; -int world_rank = 0; -int orb_size = 1; -int orb_rank = 0; -int share_size = 1; -int share_rank = 0; -int sh_group_rank = 0; -int is_bank = 0; -int is_centralbank = 0; -int is_bankclient = 1; -int is_bankmaster = 0; // only one bankmaster is_bankmaster -int bank_size = 0; -int tot_bank_size = 0; // size of bank, including the task manager -int max_tag = 0; // max value allowed by MPI -std::vector bankmaster; -int task_bank = -1; // world rank of the task manager - -MPI_Comm comm_orb; -MPI_Comm comm_share; -MPI_Comm comm_sh_group; -MPI_Comm comm_bank; - -} // namespace mpi - -int id_shift; // to ensure that nodes, orbitals and functions do not collide - -extern int metadata_block[3]; // can add more metadata in future -extern int const size_metadata = 3; - -void mpi::initialize() { - Eigen::setNbThreads(1); - mrchem_set_dynamic(0); - mrcpp::set_max_threads(omp::n_threads); - -#ifdef MRCHEM_HAS_MPI - MPI_Init(nullptr, nullptr); - MPI_Comm_size(MPI_COMM_WORLD, &mpi::world_size); - MPI_Comm_rank(MPI_COMM_WORLD, &mpi::world_rank); - - // divide the world into groups - // each group has its own group communicator definition - - // define independent group of MPI processes, that are not part of comm_orb - // for now the new group does not include comm_share - mpi::comm_bank = MPI_COMM_WORLD; // clients and master - MPI_Comm comm_remainder; // clients only - - // set bank_size automatically if not defined by user - if (mpi::world_size < 2) { - mpi::bank_size = 0; - } else if (mpi::bank_size < 0) { - mpi::bank_size = std::max(mpi::world_size / 3, 1); - } - if (mpi::world_size - mpi::bank_size < 1) MSG_ABORT("No MPI ranks left for working!"); - if (mpi::bank_size < 1 and mpi::world_size > 1) MSG_ABORT("Bank size must be at least one when using MPI!"); - - mpi::bankmaster.resize(mpi::bank_size); - for (int i = 0; i < mpi::bank_size; i++) { - mpi::bankmaster[i] = mpi::world_size - i - 1; // rank of the bankmasters - } - if (mpi::world_rank < mpi::world_size - mpi::bank_size) { - // everything which is left - mpi::is_bank = 0; - mpi::is_centralbank = 0; - mpi::is_bankclient = 1; - } else { - // special group of centralbankmasters - mpi::is_bank = 1; - mpi::is_centralbank = 1; - mpi::is_bankclient = 0; - if (mpi::world_rank == mpi::world_size - mpi::bank_size) mpi::is_bankmaster = 1; - } - MPI_Comm_split(MPI_COMM_WORLD, mpi::is_bankclient, mpi::world_rank, &comm_remainder); - - // split world into groups that can share memory - MPI_Comm_split_type(comm_remainder, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &mpi::comm_share); - - MPI_Comm_rank(mpi::comm_share, &mpi::share_rank); - MPI_Comm_size(mpi::comm_share, &mpi::share_size); - - // define a rank of the group - MPI_Comm_split(comm_remainder, mpi::share_rank, mpi::world_rank, &mpi::comm_sh_group); - // mpiShRank is color (same color->in same group) - // MPI_worldrank is key (orders rank within the groups) - - // we define a new orbital rank, so that the orbitals within - // a shared memory group, have consecutive ranks - MPI_Comm_rank(mpi::comm_sh_group, &mpi::sh_group_rank); - - mpi::orb_rank = mpi::share_rank + mpi::sh_group_rank * mpi::world_size; - MPI_Comm_split(comm_remainder, 0, mpi::orb_rank, &mpi::comm_orb); - // 0 is color (same color->in same group) - // mpiOrbRank is key (orders rank in the group) - - MPI_Comm_rank(mpi::comm_orb, &mpi::orb_rank); - MPI_Comm_size(mpi::comm_orb, &mpi::orb_size); - - // if bank_size is large enough, we reserve one as "task manager" - mpi::tot_bank_size = mpi::bank_size; - if (mpi::bank_size <= 2 and mpi::bank_size > 0) { - // use the first bank as task manager - mpi::task_bank = mpi::bankmaster[0]; - } else if (mpi::bank_size > 1) { - // reserve one bank for task management only - mpi::bank_size--; - mpi::task_bank = mpi::bankmaster[mpi::bank_size]; // the last rank is reserved as task manager - } - - // determine the maximum value alowed for mpi tags - void *val; - int flag; - MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &val, &flag); // max value allowed by MPI for tags - max_tag = *(int *)val / 2; - id_shift = max_tag / 2; // half is reserved for non orbital. - - if (mpi::is_bank) { - // bank is open until end of program - if (mpi::is_centralbank) { dataBank.open(); } - mpi::finalize(); - exit(EXIT_SUCCESS); - } -#else - mpi::bank_size = 0; -#endif -} - -void mpi::finalize() { -#ifdef MRCHEM_HAS_MPI - if (mpi::bank_size > 0 and mpi::grand_master()) { - println(4, " max data in bank " << dataBank.get_maxtotalsize() << " MB "); - dataBank.close(); - } - MPI_Barrier(MPI_COMM_WORLD); // to ensure everybody got here - MPI_Finalize(); -#endif -} - -void mpi::barrier(MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - MPI_Barrier(comm); -#endif -} - -/********************************* - * Orbital related MPI functions * - *********************************/ - -bool mpi::grand_master() { - return (mpi::world_rank == 0 and is_bankclient) ? true : false; -} - -bool mpi::share_master() { - return (mpi::share_rank == 0) ? true : false; -} - -/** @brief Test if orbital belongs to this MPI rank (or is common)*/ -bool mpi::my_orb(const Orbital &orb) { - return (orb.rankID() < 0 or orb.rankID() == mpi::orb_rank) ? true : false; -} - -/** @brief Test if orbital belongs to this MPI rank */ -bool mpi::my_unique_orb(const Orbital &orb) { - return (orb.rankID() == mpi::orb_rank) ? true : false; -} - -/** @brief Distribute orbitals in vector round robin. Orbitals should be empty.*/ -void mpi::distribute(OrbitalVector &Phi) { - for (int i = 0; i < Phi.size(); i++) Phi[i].setRankID(i % mpi::orb_size); -} - -/** @brief Free all function pointers not belonging to this MPI rank */ -void mpi::free_foreign(OrbitalVector &Phi) { - for (auto &i : Phi) { - if (not mpi::my_orb(i)) i.free(NUMBER::Total); - } -} - -/** @brief Return the subset of an OrbitalVector that belongs to this MPI rank */ -OrbitalChunk mpi::get_my_chunk(OrbitalVector &Phi) { - OrbitalChunk chunk; - for (int i = 0; i < Phi.size(); i++) { - if (mpi::my_orb(Phi[i])) chunk.push_back(std::make_tuple(i, Phi[i])); - } - return chunk; -} - -/** @brief Add up each entry of the vector with contributions from all MPI ranks */ -void mpi::allreduce_vector(IntVector &vec, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = vec.size(); - MPI_Allreduce(MPI_IN_PLACE, vec.data(), N, MPI_INT, MPI_SUM, comm); -#endif -} - -/** @brief Add up each entry of the vector with contributions from all MPI ranks */ -void mpi::allreduce_vector(DoubleVector &vec, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = vec.size(); - MPI_Allreduce(MPI_IN_PLACE, vec.data(), N, MPI_DOUBLE, MPI_SUM, comm); -#endif -} - -/** @brief Add up each entry of the vector with contributions from all MPI ranks */ -void mpi::allreduce_vector(ComplexVector &vec, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = vec.size(); - MPI_Allreduce(MPI_IN_PLACE, vec.data(), N, MPI_C_DOUBLE_COMPLEX, MPI_SUM, comm); -#endif -} - -/** @brief Add up each entry of the matrix with contributions from all MPI ranks */ -void mpi::allreduce_matrix(IntMatrix &mat, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = mat.size(); - MPI_Allreduce(MPI_IN_PLACE, mat.data(), N, MPI_INT, MPI_SUM, comm); -#endif -} - -/** @brief Add up each entry of the matrix with contributions from all MPI ranks */ -void mpi::allreduce_matrix(DoubleMatrix &mat, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = mat.size(); - MPI_Allreduce(MPI_IN_PLACE, mat.data(), N, MPI_DOUBLE, MPI_SUM, comm); -#endif -} - -/** @brief Add up each entry of the matrix with contributions from all MPI ranks */ -void mpi::allreduce_matrix(ComplexMatrix &mat, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - int N = mat.size(); - MPI_Allreduce(MPI_IN_PLACE, mat.data(), N, MPI_C_DOUBLE_COMPLEX, MPI_SUM, comm); -#endif -} - -// send an orbital with MPI, includes orbital meta data -void mpi::send_orbital(Orbital &orb, int dst, int tag, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - mpi::send_function(orb, dst, tag, comm); - OrbitalData &orbinfo = orb.getOrbitalData(); - MPI_Send(&orbinfo, sizeof(OrbitalData), MPI_BYTE, dst, 0, comm); -#endif -} - -// receive an orbital with MPI, includes orbital meta data -void mpi::recv_orbital(Orbital &orb, int src, int tag, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI - mpi::recv_function(orb, src, tag, comm); - - MPI_Status status; - OrbitalData &orbinfo = orb.getOrbitalData(); - MPI_Recv(&orbinfo, sizeof(OrbitalData), MPI_BYTE, src, 0, comm, &status); -#endif -} - -// send a function with MPI -void mpi::send_function(QMFunction &func, int dst, int tag, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI -#ifdef MRCPP_HAS_MPI - if (func.isShared()) MSG_WARN("Sending a shared function is not recommended"); - FunctionData &funcinfo = func.getFunctionData(); - MPI_Send(&funcinfo, sizeof(FunctionData), MPI_BYTE, dst, 0, comm); - if (func.hasReal()) mrcpp::send_tree(func.real(), dst, tag, comm, funcinfo.real_size); - if (func.hasImag()) mrcpp::send_tree(func.imag(), dst, tag + 10000, comm, funcinfo.imag_size); -#else - MSG_ABORT("MRCPP compiled without MPI support"); -#endif -#endif -} - -// receive a function with MPI -void mpi::recv_function(QMFunction &func, int src, int tag, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI -#ifdef MRCPP_HAS_MPI - if (func.isShared()) MSG_WARN("Receiving a shared function is not recommended"); - MPI_Status status; - - FunctionData &funcinfo = func.getFunctionData(); - MPI_Recv(&funcinfo, sizeof(FunctionData), MPI_BYTE, src, 0, comm, &status); - if (funcinfo.real_size > 0) { - // We must have a tree defined for receiving nodes. Define one: - if (not func.hasReal()) func.alloc(NUMBER::Real); - mrcpp::recv_tree(func.real(), src, tag, comm, funcinfo.real_size); - } - - if (funcinfo.imag_size > 0) { - // We must have a tree defined for receiving nodes. Define one: - if (not func.hasImag()) func.alloc(NUMBER::Imag); - mrcpp::recv_tree(func.imag(), src, tag + 10000, comm, funcinfo.imag_size); - } -#else - MSG_ABORT("MRCPP compiled without MPI support"); -#endif -#endif -} - -/** Update a shared function after it has been changed by one of the MPI ranks. */ -void mpi::share_function(QMFunction &func, int src, int tag, MPI_Comm comm) { -#ifdef MRCHEM_HAS_MPI -#ifdef MRCPP_HAS_MPI - if (func.isShared()) { - if (func.hasReal()) mrcpp::share_tree(func.real(), src, tag, comm); - if (func.hasImag()) mrcpp::share_tree(func.imag(), src, 2 * tag, comm); - } -#else - MSG_ABORT("MRCPP compiled without MPI support"); -#endif -#endif -} - -/** @brief Add all mpi function into rank zero */ -void mpi::reduce_function(double prec, QMFunction &func, MPI_Comm comm) { -/* 1) Each odd rank send to the left rank - 2) All odd ranks are "deleted" (can exit routine) - 3) new "effective" ranks are defined within the non-deleted ranks - effective rank = rank/fac , where fac are powers of 2 - 4) repeat - */ -#ifdef MRCHEM_HAS_MPI - int comm_size, comm_rank; - MPI_Comm_rank(comm, &comm_rank); - MPI_Comm_size(comm, &comm_size); - if (comm_size == 1) return; - - int fac = 1; // powers of 2 - while (fac < comm_size) { - if ((comm_rank / fac) % 2 == 0) { - // receive - int src = comm_rank + fac; - if (src < comm_size) { - QMFunction func_i(false); - int tag = 3333 + src; - mpi::recv_function(func_i, src, tag, comm); - func.add(1.0, func_i); // add in place using union grid - func.crop(prec); - } - } - if ((comm_rank / fac) % 2 == 1) { - // send - int dest = comm_rank - fac; - if (dest >= 0) { - int tag = 3333 + comm_rank; - mpi::send_function(func, dest, tag, comm); - break; // once data is sent we are done - } - } - fac *= 2; - } - MPI_Barrier(comm); -#endif -} - -/** @brief make union tree and send into rank zero */ -void mpi::reduce_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, MPI_Comm comm) { -/* 1) Each odd rank send to the left rank - 2) All odd ranks are "deleted" (can exit routine) - 3) new "effective" ranks are defined within the non-deleted ranks - effective rank = rank/fac , where fac are powers of 2 - 4) repeat - */ -#ifdef MRCHEM_HAS_MPI - int comm_size, comm_rank; - MPI_Comm_rank(comm, &comm_rank); - MPI_Comm_size(comm, &comm_size); - if (comm_size == 1) return; - - int fac = 1; // powers of 2 - while (fac < comm_size) { - if ((comm_rank / fac) % 2 == 0) { - // receive - int src = comm_rank + fac; - if (src < comm_size) { - int tag = 3333 + src; - mrcpp::FunctionTree<3> tree_i(*MRA); - mrcpp::recv_tree(tree_i, src, tag, comm, -1, false); - tree.appendTreeNoCoeff(tree_i); // make union grid - } - } - if ((comm_rank / fac) % 2 == 1) { - // send - int dest = comm_rank - fac; - if (dest >= 0) { - int tag = 3333 + comm_rank; - mrcpp::send_tree(tree, dest, tag, comm, -1, false); - break; // once data is sent we are done - } - } - fac *= 2; - } - MPI_Barrier(comm); -#endif -} - -/** @brief make union tree without coeff and send to all - * Include both real and imaginary parts - */ -void mpi::allreduce_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, OrbitalVector &Phi, MPI_Comm comm) { - /* 1) make union grid of own orbitals - 2) make union grid with others orbitals (sent to rank zero) - 3) rank zero broadcast func to everybody - */ - int N = Phi.size(); - for (int j = 0; j < N; j++) { - if (not mpi::my_orb(Phi[j])) continue; - if (Phi[j].hasReal()) tree.appendTreeNoCoeff(Phi[j].real()); - if (Phi[j].hasImag()) tree.appendTreeNoCoeff(Phi[j].imag()); - } -#ifdef MRCHEM_HAS_MPI - mpi::reduce_Tree_noCoeff(tree, mpi::comm_orb); - mpi::broadcast_Tree_noCoeff(tree, mpi::comm_orb); -#endif -} - -/** @brief Distribute rank zero function to all ranks */ -void mpi::broadcast_function(QMFunction &func, MPI_Comm comm) { -/* use same strategy as a reduce, but in reverse order */ -#ifdef MRCHEM_HAS_MPI - int comm_size, comm_rank; - MPI_Comm_rank(comm, &comm_rank); - MPI_Comm_size(comm, &comm_size); - if (comm_size == 1) return; - - int fac = 1; // powers of 2 - while (fac < comm_size) fac *= 2; - fac /= 2; - - while (fac > 0) { - if (comm_rank % fac == 0 and (comm_rank / fac) % 2 == 1) { - // receive - int src = comm_rank - fac; - int tag = 4334 + comm_rank; - mpi::recv_function(func, src, tag, comm); - } - if (comm_rank % fac == 0 and (comm_rank / fac) % 2 == 0) { - // send - int dst = comm_rank + fac; - int tag = 4334 + dst; - if (dst < comm_size) mpi::send_function(func, dst, tag, comm); - } - fac /= 2; - } - MPI_Barrier(comm); -#endif -} - -/** @brief Distribute rank zero function to all ranks */ -void mpi::broadcast_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, MPI_Comm comm) { -/* use same strategy as a reduce, but in reverse order */ -#ifdef MRCHEM_HAS_MPI - int comm_size, comm_rank; - MPI_Comm_rank(comm, &comm_rank); - MPI_Comm_size(comm, &comm_size); - if (comm_size == 1) return; - - int fac = 1; // powers of 2 - while (fac < comm_size) fac *= 2; - fac /= 2; - - while (fac > 0) { - if (comm_rank % fac == 0 and (comm_rank / fac) % 2 == 1) { - // receive - int src = comm_rank - fac; - int tag = 4334 + comm_rank; - mrcpp::recv_tree(tree, src, tag, comm, -1, false); - } - if (comm_rank % fac == 0 and (comm_rank / fac) % 2 == 0) { - // send - int dst = comm_rank + fac; - int tag = 4334 + dst; - if (dst < comm_size) mrcpp::send_tree(tree, dst, tag, comm, -1, false); - } - fac /= 2; - } - MPI_Barrier(comm); -#endif -} - -} // namespace mrchem diff --git a/src/parallel.h b/src/parallel.h deleted file mode 100644 index 76dee6a05..000000000 --- a/src/parallel.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#pragma once - -#include "MRCPP/Parallel" -#include - -#ifdef MRCHEM_HAS_MPI -#ifndef MRCPP_HAS_MPI -#include -#endif -#else -#ifndef MRCPP_HAS_MPI -using MPI_Comm = int; -#endif -#endif - -#include "mrchem.h" -#include "qmfunctions/qmfunction_fwd.h" - -namespace mrchem { - -namespace omp { -extern int n_threads; -} // namespace omp - -class Bank; -extern Bank dataBank; - -namespace mpi { - -extern bool numerically_exact; -extern int shared_memory_size; - -extern int world_rank; -extern int world_size; -extern int orb_rank; -extern int orb_size; -extern int share_rank; -extern int share_size; -extern int sh_group_rank; -extern int is_bank; -extern int is_bankclient; -extern int bank_size; -extern int tot_bank_size; -extern int max_tag; -extern std::vector bankmaster; -extern int task_bank; - -extern MPI_Comm comm_orb; -extern MPI_Comm comm_share; -extern MPI_Comm comm_sh_group; -extern MPI_Comm comm_bank; - -void initialize(); -void finalize(); -void barrier(MPI_Comm comm); - -bool grand_master(); -bool share_master(); -bool my_orb(const Orbital &orb); -bool my_unique_orb(const Orbital &orb); -void distribute(OrbitalVector &Phi); -void free_foreign(OrbitalVector &Phi); -OrbitalChunk get_my_chunk(OrbitalVector &Phi); - -void send_orbital(Orbital &orb, int dst, int tag, MPI_Comm comm = mpi::comm_orb); -void recv_orbital(Orbital &orb, int src, int tag, MPI_Comm comm = mpi::comm_orb); - -void send_function(QMFunction &func, int dst, int tag, MPI_Comm comm); -void recv_function(QMFunction &func, int src, int tag, MPI_Comm comm); -void share_function(QMFunction &func, int src, int tag, MPI_Comm comm); - -void reduce_function(double prec, QMFunction &func, MPI_Comm comm); -void broadcast_function(QMFunction &func, MPI_Comm comm); - -void reduce_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, MPI_Comm comm); -void allreduce_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, OrbitalVector &Phi, MPI_Comm comm); -void broadcast_Tree_noCoeff(mrcpp::FunctionTree<3> &tree, MPI_Comm comm); - -void allreduce_vector(IntVector &vec, MPI_Comm comm); -void allreduce_vector(DoubleVector &vec, MPI_Comm comm); -void allreduce_vector(ComplexVector &vec, MPI_Comm comm); -void allreduce_matrix(IntMatrix &vec, MPI_Comm comm); -void allreduce_matrix(DoubleMatrix &mat, MPI_Comm comm); -void allreduce_matrix(ComplexMatrix &mat, MPI_Comm comm); - -} // namespace mpi - -} // namespace mrchem diff --git a/src/properties/GeometricDerivative.h b/src/properties/GeometricDerivative.h index 79fab7210..293bec733 100644 --- a/src/properties/GeometricDerivative.h +++ b/src/properties/GeometricDerivative.h @@ -74,11 +74,11 @@ class GeometricDerivative final { * @brief Compute the variance of the total force using the formula * sigma = sqrt(1/(3N) * sum_i sum_j (F_{ij})^2) presented in * Gubler et al.: Journal of Computational Physics: X Volume 17, November 2023, 100131 - */ + */ double variance() const { DoubleMatrix forces = getTensor(); Eigen::Vector3d total_force = forces.colwise().sum(); - double force_variance = total_force.norm() * std::sqrt( 1.0 / (3.0 * forces.rows()) ); + double force_variance = total_force.norm() * std::sqrt(1.0 / (3.0 * forces.rows())); return force_variance; } diff --git a/src/properties/HirshfeldCharges.h b/src/properties/HirshfeldCharges.h index f5dca8f77..08e812d2f 100644 --- a/src/properties/HirshfeldCharges.h +++ b/src/properties/HirshfeldCharges.h @@ -12,14 +12,13 @@ namespace mrchem { class HirshfeldCharges final { public: - DoubleVector getVector() const { return this->hirshfeld_charges; } void setVector(const DoubleVector &v) { this->hirshfeld_charges = v; } void print(const std::string &id) const { mrcpp::print::header(0, "Hirshfeld Charges (" + id + ")"); - mrcpp::print::separator(0, '-'); + mrcpp::print::separator(0, '-'); for (int i = 0; i < hirshfeld_charges.size(); i++) { std::string text = "Charge of atom " + std::to_string(i); print_utils::scalar(0, text, hirshfeld_charges(i)); @@ -29,9 +28,7 @@ class HirshfeldCharges final { mrcpp::print::separator(0, '='); } - nlohmann::json json() const { - return {{"total", print_utils::eigen_to_vector(getVector(), 1.0e-12)}}; - } + nlohmann::json json() const { return {{"total", print_utils::eigen_to_vector(getVector(), 1.0e-12)}}; } protected: DoubleVector hirshfeld_charges; diff --git a/src/properties/OrbitalEnergies.h b/src/properties/OrbitalEnergies.h index 93441c56e..f8505607d 100644 --- a/src/properties/OrbitalEnergies.h +++ b/src/properties/OrbitalEnergies.h @@ -41,12 +41,12 @@ namespace mrchem { // clang-format off class OrbitalEnergies final { public: - IntVector &getSpin() { return this->spin; } - IntVector &getOccupation() { return this->occupation; } + IntVector &getSpin() { return this->spinVec; } + DoubleVector &getOccupation() { return this->occupation; } DoubleVector &getEpsilon() { return this->epsilon; } - const IntVector &getSpin() const { return this->spin; } - const IntVector &getOccupation() const { return this->occupation; } + const IntVector &getSpin() const { return this->spinVec; } + const DoubleVector &getOccupation() const { return this->occupation; } const DoubleVector &getEpsilon() const { return this->epsilon; } void print(const std::string &id) const { @@ -69,9 +69,9 @@ class OrbitalEnergies final { for (int i = 0; i < this->epsilon.size(); i++) { auto sp = 'u'; - if (this->spin(i) == SPIN::Paired) sp = 'p'; - if (this->spin(i) == SPIN::Alpha) sp = 'a'; - if (this->spin(i) == SPIN::Beta) sp = 'b'; + if (this->spinVec(i) == SPIN::Paired) sp = 'p'; + if (this->spinVec(i) == SPIN::Alpha) sp = 'a'; + if (this->spinVec(i) == SPIN::Beta) sp = 'b'; std::stringstream o_txt; o_txt << std::setw(w1 - 1) << i; o_txt << std::setw(w1) << this->occupation(i); @@ -85,13 +85,13 @@ class OrbitalEnergies final { } nlohmann::json json() const { - DoubleVector occ = getOccupation().cast(); + DoubleVector occ = getOccupation(); const DoubleVector &eps = getEpsilon(); std::vector spn; - for (auto i = 0; i < spin.size(); i++) { - if (this->spin(i) == SPIN::Paired) spn.push_back("p"); - if (this->spin(i) == SPIN::Alpha) spn.push_back("a"); - if (this->spin(i) == SPIN::Beta) spn.push_back("b"); + for (auto i = 0; i < spinVec.size(); i++) { + if (this->spinVec(i) == SPIN::Paired) spn.push_back("p"); + if (this->spinVec(i) == SPIN::Alpha) spn.push_back("a"); + if (this->spinVec(i) == SPIN::Beta) spn.push_back("b"); } return { {"spin", spn}, @@ -102,8 +102,8 @@ class OrbitalEnergies final { } private: - IntVector spin; - IntVector occupation; + IntVector spinVec; + DoubleVector occupation; DoubleVector epsilon; }; // clang-format on diff --git a/src/properties/hirshfeld/HirshfeldInterpolator.cpp b/src/properties/hirshfeld/HirshfeldInterpolator.cpp index ef67aa1bf..096f177c7 100644 --- a/src/properties/hirshfeld/HirshfeldInterpolator.cpp +++ b/src/properties/hirshfeld/HirshfeldInterpolator.cpp @@ -27,9 +27,7 @@ HirshfeldRadInterpolater::HirshfeldRadInterpolater(const std::string element, st rhoGrid = rhoGrid.array().log(); lnRho = std::make_shared(rGrid, rhoGrid); - if (writeToFile) { - writeInterpolatedDensity(element + ".interpolated"); - } + if (writeToFile) { writeInterpolatedDensity(element + ".interpolated"); } } // Function to evaluate the interpolated function diff --git a/src/properties/hirshfeld/HirshfeldInterpolator.h b/src/properties/hirshfeld/HirshfeldInterpolator.h index 990c51ded..c0342304e 100644 --- a/src/properties/hirshfeld/HirshfeldInterpolator.h +++ b/src/properties/hirshfeld/HirshfeldInterpolator.h @@ -1,8 +1,8 @@ #pragma once -#include -#include #include "utils/PolyInterpolator.h" +#include +#include class HirshfeldRadInterpolater { @@ -11,18 +11,18 @@ class HirshfeldRadInterpolater { * @brief Construct a new Rad Interpolater object * @param element The element for which the ZORA potential is to be interpolated * @param data_dir The directory containing the ZORA potential data - */ + */ HirshfeldRadInterpolater(const std::string element, std::string data_dir, bool writeToFile = false); /** * @brief Evaluate the interpolated function at a given point * @param r The point at which to evaluate * @return The interpolated value at the given point - */ + */ double evalf(const double &r) const; /** - * @brief Integrates the atomic charge density to get the charge of the tabulated + * @brief Integrates the atomic charge density to get the charge of the tabulated * atomic density. The numeric is performed from 0 to 20 bohr. Only useful for debugging. */ double getNorm() const; diff --git a/src/properties/hirshfeld/HirshfeldPartition.cpp b/src/properties/hirshfeld/HirshfeldPartition.cpp index eb5a7fb32..122560076 100644 --- a/src/properties/hirshfeld/HirshfeldPartition.cpp +++ b/src/properties/hirshfeld/HirshfeldPartition.cpp @@ -12,17 +12,14 @@ HirshfeldPartition::HirshfeldPartition(const mrchem::Molecule &mol, std::string // Uncomment the following line to print the charge of the atomic density // std::cout << "Norm of " << element << " = " << this->logDensities[i].getNorm() << std::endl; } - } -double HirshfeldPartition::getHirshfeldPartitionIntegral(int index, mrcpp::ComplexFunction &rho, double prec) const { - auto w_i_analytic = [index, this](const mrcpp::Coord<3> &r) { - return this->evalf(r, index); - }; - mrcpp::ComplexFunction w_i_MW; +double HirshfeldPartition::getHirshfeldPartitionIntegral(int index, mrcpp::CompFunction<3> &rho, double prec) const { + auto w_i_analytic = [index, this](const mrcpp::Coord<3> &r) { return this->evalf(r, index); }; + mrcpp::CompFunction<3> w_i_MW; mrcpp::AnalyticFunction<3> w_i_analytic_func(w_i_analytic); - mrcpp::cplxfunc::multiply(w_i_MW, rho.real(), w_i_analytic_func, prec); - mrcpp::ComplexDouble c_complex = w_i_MW.integrate(); + mrcpp::multiply(w_i_MW, rho.real(), w_i_analytic_func, prec); + ComplexDouble c_complex = w_i_MW.integrate(); double charge = c_complex.real(); return charge; @@ -34,9 +31,7 @@ double HirshfeldPartition::lseLogDens(const mrcpp::Coord<3> &r) const { mrcpp::Coord<3> nucPos; for (int i = 0; i < this->nNucs; i++) { nucPos = this->nucs->at(i).getCoord(); - rr = std::sqrt((r[0] - nucPos[0]) * (r[0] - nucPos[0]) - + (r[1] - nucPos[1]) * (r[1] - nucPos[1]) - + (r[2] - nucPos[2]) * (r[2] - nucPos[2])); + rr = std::sqrt((r[0] - nucPos[0]) * (r[0] - nucPos[0]) + (r[1] - nucPos[1]) * (r[1] - nucPos[1]) + (r[2] - nucPos[2]) * (r[2] - nucPos[2])); lseLogDens_r(i) = this->logDensities[i].evalf(rr); } return mrchem::math_utils::logsumexp(lseLogDens_r); @@ -44,8 +39,6 @@ double HirshfeldPartition::lseLogDens(const mrcpp::Coord<3> &r) const { double HirshfeldPartition::evalf(const mrcpp::Coord<3> &r, int iAt) const { mrcpp::Coord<3> nucPos = this->nucs->at(iAt).getCoord(); - double rr = std::sqrt((r[0] - nucPos[0]) * (r[0] - nucPos[0]) - + (r[1] - nucPos[1]) * (r[1] - nucPos[1]) - + (r[2] - nucPos[2]) * (r[2] - nucPos[2])); + double rr = std::sqrt((r[0] - nucPos[0]) * (r[0] - nucPos[0]) + (r[1] - nucPos[1]) * (r[1] - nucPos[1]) + (r[2] - nucPos[2]) * (r[2] - nucPos[2])); return std::exp(this->logDensities[iAt].evalf(rr) - this->lseLogDens(r)); -} \ No newline at end of file +} diff --git a/src/properties/hirshfeld/HirshfeldPartition.h b/src/properties/hirshfeld/HirshfeldPartition.h index 2f28f4854..17da95e4c 100644 --- a/src/properties/hirshfeld/HirshfeldPartition.h +++ b/src/properties/hirshfeld/HirshfeldPartition.h @@ -1,19 +1,19 @@ #pragma once -#include -#include #include "chemistry/Molecule.h" -#include #include "chemistry/Nucleus.h" #include "properties/hirshfeld/HirshfeldInterpolator.h" +#include +#include +#include /** * @brief Class for computing the Hirshfeld partitioning of a molecule. Reads and interpolates the Hirshfeld partitioning data. * can create MW representation of the Hirshfeld partitioning functions. */ -class HirshfeldPartition{ +class HirshfeldPartition { - public: +public: /** * @brief Construct a new Hirshfeld Partition object * @param mol The molecule for which the Hirshfeld partitioning is to be computed @@ -24,10 +24,9 @@ class HirshfeldPartition{ /** * @brief Get the integral rho * w_i for a given atom i */ - double getHirshfeldPartitionIntegral(int index, mrcpp::ComplexFunction &rho, double prec) const; - - protected: + double getHirshfeldPartitionIntegral(int index, mrcpp::CompFunction<3> &rho, double prec) const; +protected: /** * @brief Evaluate the analytic, interpolated Hirshfeld partitioning function at a given point */ @@ -52,6 +51,4 @@ class HirshfeldPartition{ * @brief The atomic density interpolators for the nuclei */ std::vector logDensities; - - -}; \ No newline at end of file +}; diff --git a/src/qmfunctions/CMakeLists.txt b/src/qmfunctions/CMakeLists.txt index c03b9731b..5cc52936d 100644 --- a/src/qmfunctions/CMakeLists.txt +++ b/src/qmfunctions/CMakeLists.txt @@ -1,6 +1,6 @@ target_sources(mrchem PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/OrbitalIterator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Density.cpp ${CMAKE_CURRENT_SOURCE_DIR}/orbital_utils.cpp ${CMAKE_CURRENT_SOURCE_DIR}/density_utils.cpp - ) + ${CMAKE_CURRENT_SOURCE_DIR}/Orbital.cpp +) diff --git a/src/qmfunctions/ComplexFunction.h b/src/qmfunctions/ComplexFunction.h index 851759a8a..e85f6dff2 100644 --- a/src/qmfunctions/ComplexFunction.h +++ b/src/qmfunctions/ComplexFunction.h @@ -44,9 +44,9 @@ struct FunctionData { bool is_shared{false}; }; -class ComplexFunction final { +class CompFunction<3> final { public: - explicit ComplexFunction(bool share) + explicit CompFunction<3>(bool share) : shared_mem_re(nullptr) , shared_mem_im(nullptr) , re(nullptr) @@ -61,7 +61,7 @@ class ComplexFunction final { } } - ~ComplexFunction() { + ~CompFunction<3>() { if (this->shared_mem_re != nullptr) delete this->shared_mem_re; if (this->shared_mem_im != nullptr) delete this->shared_mem_im; if (this->re != nullptr) delete this->re; diff --git a/src/qmfunctions/Density.cpp b/src/qmfunctions/Density.cpp index db920197f..843e6f50e 100644 --- a/src/qmfunctions/Density.cpp +++ b/src/qmfunctions/Density.cpp @@ -40,7 +40,7 @@ namespace mrchem { * NO transfer of ownership. */ Density &Density::operator=(const Density &dens) { - if (this != &dens) mrcpp::ComplexFunction::operator=(dens); + if (this != &dens) mrcpp::CompFunction<3>::operator=(dens); return *this; } @@ -58,26 +58,27 @@ void Density::saveDensity(const std::string &file) { metafile << file << ".meta"; // this flushes tree sizes - mrcpp::FunctionData &func_data = mrcpp::ComplexFunction::getFunctionData(); + mrcpp::CompFunctionData<3> &func_data = mrcpp::CompFunction<3>::func_ptr->data; + flushFuncData(); std::fstream f; f.open(metafile.str(), std::ios::out | std::ios::binary); if (not f.is_open()) MSG_ERROR("Unable to open file"); - f.write((char *)&func_data, sizeof(mrcpp::FunctionData)); + f.write((char *)&func_data, sizeof(mrcpp::CompFunctionData<3>)); f.close(); // writing real part - if (hasReal()) { + if (isreal()) { std::stringstream fname; fname << file << "_re"; - real().saveTree(fname.str()); + CompD[0]->saveTree(fname.str()); } // writing imaginary part - if (hasImag()) { + if (iscomplex()) { std::stringstream fname; - fname << file << "_im"; - imag().saveTree(fname.str()); + fname << file << "_cx"; + CompC[0]->saveTree(fname.str()); } } @@ -98,27 +99,28 @@ void Density::loadDensity(const std::string &file) { fmeta << file << ".meta"; // this flushes tree sizes - mrcpp::FunctionData &func_data = mrcpp::ComplexFunction::getFunctionData(); + mrcpp::CompFunctionData<3> &func_data = mrcpp::CompFunction<3>::func_ptr->data; + flushFuncData(); std::fstream f; f.open(fmeta.str(), std::ios::in | std::ios::binary); - if (f.is_open()) f.read((char *)&func_data, sizeof(mrcpp::FunctionData)); + if (f.is_open()) f.read((char *)&func_data, sizeof(mrcpp::CompFunctionData<3>)); f.close(); - // reading real part - if (func_data.real_size > 0) { + // reading real tree + if (isreal()) { std::stringstream fname; fname << file << "_re"; - alloc(NUMBER::Real); - real().loadTree(fname.str()); + alloc(1); + CompD[0]->loadTree(fname.str()); } - // reading imaginary part - if (func_data.imag_size > 0) { + // reading complex tree + if (iscomplex()) { std::stringstream fname; - fname << file << "_im"; - alloc(NUMBER::Imag); - imag().loadTree(fname.str()); + fname << file << "_cx"; + alloc(1); + CompC[0]->loadTree(fname.str()); } } diff --git a/src/qmfunctions/Density.h b/src/qmfunctions/Density.h index 7f389b8a4..c1bb26607 100644 --- a/src/qmfunctions/Density.h +++ b/src/qmfunctions/Density.h @@ -33,7 +33,7 @@ * * @brief General complex-valued function to handle densities (incl trans. densities) * - * Inherits the general features of a complex function from mrcpp::ComplexFunction which + * Inherits the general features of a complex function from mrcpp::CompFunction<3> which * means separate MW function representations for the real and imaginary parts. * Note that there are several options for copying/assignment: the proper copy * constructor and assignment operator are *shallow* copies, which means that @@ -48,12 +48,12 @@ namespace mrchem { -class Density final : public mrcpp::ComplexFunction { +class Density final : public mrcpp::CompFunction<3> { public: - explicit Density(bool share) - : mrcpp::ComplexFunction(0, -1, -1, share) {} + explicit Density(bool share = false) + : mrcpp::CompFunction<3>(0, share) {} Density(const Density &dens) - : mrcpp::ComplexFunction(dens) {} + : mrcpp::CompFunction<3>(dens) {} Density &operator=(const Density &dens); void saveDensity(const std::string &file); diff --git a/src/qmfunctions/Orbital.cpp b/src/qmfunctions/Orbital.cpp index 2e13c526a..3aed8e15f 100644 --- a/src/qmfunctions/Orbital.cpp +++ b/src/qmfunctions/Orbital.cpp @@ -29,86 +29,82 @@ #include "Orbital.h" #include "orbital_utils.h" -#include "qmfunction_utils.h" namespace mrchem { /** @brief Default constructor * - * Initializes the QMFunction with NULL pointers for both real and imaginary part. + * Initializes with NULL tree pointers. */ Orbital::Orbital() - : QMFunction(false) - , orb_data({-1, 0, 0}) {} + : mrcpp::CompFunction<3>() {} + +/** @brief Constructor with only spin + * + * Initializes with NULL tree pointers. + */ +Orbital::Orbital(SPIN::type spin) + : mrcpp::CompFunction<3>(spin) { + if (this->spin() < 0) INVALID_ARG_ABORT; + // d1 is used to store occupancy + if (this->spin() == SPIN::Paired) this->func_ptr->data.d1[0] = 2; + if (this->spin() == SPIN::Alpha) this->func_ptr->data.d1[0] = 1; + if (this->spin() == SPIN::Beta) this->func_ptr->data.d1[0] = 1; +} /** @brief Constructor * * @param spin: electron spin (SPIN::Alpha/Beta/Paired) * @param occ: occupation - * @param rank: MPI ownership (-1 means all MPI ranks) + * @param rank: position in vector if part of a vector * - * Initializes the QMFunction with NULL pointers for both real and imaginary part. */ -Orbital::Orbital(int spin, int occ, int rank) - : QMFunction(false) - , orb_data({rank, spin, occ}) { +Orbital::Orbital(int spin, double occ, int rank) + : mrcpp::CompFunction<3>(spin) { if (this->spin() < 0) INVALID_ARG_ABORT; if (this->occ() < 0) { - if (this->spin() == SPIN::Paired) this->orb_data.occ = 2; - if (this->spin() == SPIN::Alpha) this->orb_data.occ = 1; - if (this->spin() == SPIN::Beta) this->orb_data.occ = 1; + // d1 is defined as occupancy + if (this->spin() == SPIN::Paired) this->func_ptr->data.d1[0] = 2; + if (this->spin() == SPIN::Alpha) this->func_ptr->data.d1[0] = 1; + if (this->spin() == SPIN::Beta) this->func_ptr->data.d1[0] = 1; } + this->func_ptr->rank = rank; } /** @brief Copy constructor * * @param orb: orbital to copy * - * Shallow copy: meta data is copied along with the *re and *im pointers, - * NO transfer of ownership. + * Shallow copy: meta data is copied along with the pointers, + * NO transfer of ownership: + * both orbitals are pointing to the same tree */ -Orbital::Orbital(const Orbital &orb) - : QMFunction(orb) - , orb_data(orb.orb_data) {} +Orbital::Orbital(Orbital &orb) + : mrcpp::CompFunction<3>(orb) {} -/** @brief Assignment operator +/** @brief Copy constructor * * @param orb: orbital to copy * - * Shallow copy: meta data is copied along with the *re and *im pointers, - * NO transfer of ownership. + * Shallow copy: meta data is copied along with the pointers, + * NO transfer of ownership: + * both orbitals are pointing to the same tree */ -Orbital &Orbital::operator=(const Orbital &orb) { - if (this != &orb) { - QMFunction::operator=(orb); - this->orb_data = orb.orb_data; - } - return *this; -} - -Orbital &Orbital::operator=(const QMFunction &func) { - if (this != &func) QMFunction::operator=(func); - return *this; -} - -/** @brief Parameter copy - * - * Returns a new orbital with the same spin, occupation and rank_id as *this orbital. - */ -Orbital Orbital::paramCopy() const { - return Orbital(this->spin(), this->occ(), this->rankID()); -} +// Orbital::Orbital(const mrcpp::CompFunction<3> &orb) +// : mrcpp::CompFunction<3>(orb) {} +Orbital::Orbital(const mrcpp::CompFunction<3> &orb) + : mrcpp::CompFunction<3>(orb) {} /** @brief Complex conjugation * * Returns a new orbital which is a shallow copy of *this orbital, with a flipped * conjugate parameter. Pointer ownership is not transferred, so *this and the output - * orbital points to the same MW representations of the real and imaginary parts, + * orbital points to the same MW representations of the function tree, * however, they interpret the imaginary part with opposite sign. */ Orbital Orbital::dagger() const { Orbital out(*this); // Shallow copy - out.conj = not this->conjugate(); + out.func_ptr->conj = not this->conjugate(); return out; // Return shallow copy } @@ -121,34 +117,8 @@ Orbital Orbital::dagger() const { * and imaginary ("phi_0_im.tree") parts. */ void Orbital::saveOrbital(const std::string &file) { - // writing meta data - std::stringstream metafile; - metafile << file << ".meta"; - - // this flushes tree sizes - FunctionData &func_data = getFunctionData(); - OrbitalData &orb_data = getOrbitalData(); - - std::fstream f; - f.open(metafile.str(), std::ios::out | std::ios::binary); - if (not f.is_open()) MSG_ERROR("Unable to open file"); - f.write((char *)&func_data, sizeof(FunctionData)); - f.write((char *)&orb_data, sizeof(OrbitalData)); - f.close(); - - // writing real part - if (hasReal()) { - std::stringstream fname; - fname << file << "_re"; - real().saveTree(fname.str()); - } - - // writing imaginary part - if (hasImag()) { - std::stringstream fname; - fname << file << "_im"; - imag().saveTree(fname.str()); - } + if (isreal()) CompD[0]->saveTree(file); + if (iscomplex()) CompC[0]->saveTree(file); } /** @brief Read orbital from disk @@ -160,54 +130,8 @@ void Orbital::saveOrbital(const std::string &file) { * and imaginary ("phi_0_im.tree") parts. */ void Orbital::loadOrbital(const std::string &file) { - if (hasReal()) MSG_ERROR("Orbital not empty"); - if (hasImag()) MSG_ERROR("Orbital not empty"); - - // reading meta data - std::stringstream fmeta; - fmeta << file << ".meta"; - - // this flushes tree sizes - FunctionData &func_data = getFunctionData(); - OrbitalData &orb_data = getOrbitalData(); - - std::fstream f; - f.open(fmeta.str(), std::ios::in | std::ios::binary); - if (f.is_open()) f.read((char *)&func_data, sizeof(FunctionData)); - if (f.is_open()) f.read((char *)&orb_data, sizeof(OrbitalData)); - f.close(); - - std::array corner{func_data.corner[0], func_data.corner[1], func_data.corner[2]}; - std::array boxes{func_data.boxes[0], func_data.boxes[1], func_data.boxes[2]}; - mrcpp::BoundingBox<3> world(func_data.scale, corner, boxes); - - mrcpp::MultiResolutionAnalysis<3> *mra = nullptr; - if (func_data.type == mrcpp::Interpol) { - mrcpp::InterpolatingBasis basis(func_data.order); - mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, func_data.depth); - } else if (func_data.type == mrcpp::Legendre) { - mrcpp::LegendreBasis basis(func_data.order); - mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, func_data.depth); - } else { - MSG_ABORT("Invalid basis type!"); - } - - // reading real part - if (func_data.real_size > 0) { - std::stringstream fname; - fname << file << "_re"; - alloc(NUMBER::Real, mra); - real().loadTree(fname.str()); - } - - // reading imaginary part - if (func_data.imag_size > 0) { - std::stringstream fname; - fname << file << "_im"; - alloc(NUMBER::Imag, mra); - imag().loadTree(fname.str()); - } - delete mra; + if (isreal()) CompD[0]->loadTree(file); + if (iscomplex()) CompC[0]->loadTree(file); } /** @brief Returns a character representing the spin (a/b/p) */ diff --git a/src/qmfunctions/Orbital.h b/src/qmfunctions/Orbital.h index 99a770441..843a023cd 100644 --- a/src/qmfunctions/Orbital.h +++ b/src/qmfunctions/Orbital.h @@ -27,12 +27,13 @@ #include "MRCPP/MWFunctions" #include "MRCPP/Parallel" +#include "mrchem.h" /** @class Orbital * * @brief General complex-valued function with spin * - * Inherits the general features of a complex function from mrcpp::ComplexFunction which + * Inherits the general features of a complex function from mrcpp::CompFunction<3> which * means separate MW function representations for the real and imaginary parts. * Note that there are several options for copying/assignment: the proper copy * constructor and assignment operator are *shallow* copies, which means that @@ -48,7 +49,51 @@ namespace mrchem { -using Orbital = mrcpp::ComplexFunction; -using OrbitalVector = mrcpp::MPI_FuncVector; +// Note: cannot only define "getSpin()", because sometime we only have a CompFunction, not an Orbital +#define spin() func_ptr->data.n1[0] +#define occ() func_ptr->data.d1[0] +class Orbital : public mrcpp::CompFunction<3> { +public: + Orbital(); + Orbital(SPIN::type spin); + Orbital(Orbital &orb); + Orbital(const mrcpp::CompFunction<3> &orb); + Orbital(int spin, double occ, int rank = -1); + Orbital dagger() const; + + // const int spin() const {return data().n1[0];} + // const int occ() const {return data().d1[0];} + char printSpin() const; + void setSpin(int spin) { this->func_ptr->data.n1[0] = spin; } + void saveOrbital(const std::string &file); + void loadOrbital(const std::string &file); +}; + +// All MPI processes have a vector of full length, but +// only "my_func" are fully defined. +// The others orbitals (not my_func) have only basic data (spin etc) but no trees defined. +// Vector of orbitals where all orbitals are defined for all MPI, should not have typoe +// OrbitalVectors, but directly vector. +class OrbitalVector : public mrcpp::CompFunctionVector { +public: + OrbitalVector(int N = 0) + : mrcpp::CompFunctionVector(N) {} + void push_back(Orbital orb) { + mrcpp::CompFunction<3> &compfunc = orb; + compfunc.func_ptr->rank = size(); + mrcpp::CompFunctionVector *compfuncvec = this; + compfuncvec->push_back(compfunc); // we must push in the vector, not into the OrbitalVector! + } + // Overloaded operator[] to return an Orbital element + // for read (returns lvalue) + Orbital operator[](int i) const { + // Create a temporary copy of the base class element to avoid discarding qualifiers + mrcpp::CompFunction<3> func = mrcpp::CompFunctionVector::operator[](i); + return Orbital(func); + } + // Non-const version of operator[] to allow modification of elements + // for write (returns rvalue). Cannot return an Orbital + mrcpp::CompFunction<3> &operator[](int i) { return mrcpp::CompFunctionVector::operator[](i); } +}; } // namespace mrchem diff --git a/src/qmfunctions/OrbitalIterator.cpp b/src/qmfunctions/OrbitalIterator.cpp deleted file mode 100644 index c91b3834a..000000000 --- a/src/qmfunctions/OrbitalIterator.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#include "MRCPP/Parallel" -#include "MRCPP/Printer" - -#include "Orbital.h" -#include "OrbitalIterator.h" - -namespace mrchem { - -OrbitalIterator::OrbitalIterator(OrbitalVector &Phi, bool sym) - : symmetric(sym) - , iter(0) - , received_counter(0) - , sent_counter(0) - , orbitals(&Phi) { - // Find and save the orbitals each rank owns - int my_mpi_rank = mrcpp::mpi::wrk_rank; - for (int impi = 0; impi < mrcpp::mpi::wrk_size; impi++) { - std::vector orb_ix; - for (int i = 0; i < this->orbitals->size(); i++) { - Orbital &phi_i = (*this->orbitals)[i]; - int phi_rank = phi_i.getRank(); - if (mrcpp::mpi::my_orb(i)) orb_ix.push_back(i); - // if (impi == my_mpi_rank and phi_rank < 0) orb_ix.push_back(i); - } - this->orb_ix_map.push_back(orb_ix); - } -} - -// Receive all the orbitals, for non symmetric treatment -// Receive half of the orbitals, for symmetric treatment -// Send own orbitals to half of the MPI, for symmetric treatment -// The algorithm ensures that at each iteration, each MPI is communicating -// with only one other MPI. This ensures good communication parallelism. -// NB: iter counts the number of MPI looped over: -// there may be several calls to "next" for the same iter in case max_recv<0, -// or double iterations for symmetric treatment. -bool OrbitalIterator::next(int max_recv) { - mrcpp::mpi::free_foreign(*this->orbitals); // delete foreign orbitals - // NB: for now we completely delete orbitals at each iteration. Could reuse the memory in next iteration. - this->received_orbital_index.clear(); - this->received_orbitals.clear(); - this->sent_orbital_index.clear(); - this->sent_orbital_mpirank.clear(); - this->rcv_step.clear(); - - if (this->iter >= mrcpp::mpi::wrk_size) { - // We have talked to all MPIs -> return - this->iter = 0; - return false; - } - - // We communicate with one MPI per iteration: - // - Symmetric: do two iterations, send in one step receive in the other - // - send ALL my orbitals to other_rank (or max_recv if set) - // - receive ALL orbitals owned by other_rank (or max_recv if set) - // - other_rank increases by one for each iteration, modulo size - // Each MPI pair will be treated exactly once at the end of the iteration process - - int my_rank = mrcpp::mpi::wrk_rank; - int max_rank = mrcpp::mpi::wrk_size; - int received = 0; // number of new received orbitals this call - int sent = 0; // number of new sent orbitals this call - int maxget = max_recv; // max number of orbitals to receive - if (maxget < 0) maxget = this->orbitals->size(); // unlimited - - int nstep = 1; // send and receive in the same iteration - if (this->symmetric) nstep = 2; // one iteration is receive, one iteration is send - - for (int step = 0; step < nstep; step++) { - if (this->iter >= mrcpp::mpi::wrk_size) break; // last iteration is completed - - bool IamReceiver = true; // default, both send and receive - bool IamSender = true; // default, both send and receive - - // Figure out which MPI to talk to - int other_rank = (max_rank + this->iter - my_rank) % max_rank; - // note: my_rank= (max_rank + this->iter - other_rank)%max_rank - - int send_size = this->orb_ix_map[my_rank].size(); - int recv_size = this->orb_ix_map[other_rank].size(); - - if (other_rank == my_rank) { - // We receive from ourself - IamSender = false; // sending data is "for free" - for (int i = this->received_counter; i < send_size and received < maxget; i++) { - int orb_ix = this->orb_ix_map[my_rank][i]; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - this->rcv_step.push_back(step); - this->received_orbital_index.push_back(orb_ix); - this->received_orbitals.push_back(phi_i); - this->received_counter++; - received++; - } - } else { - if (this->symmetric) { - // Either send or receive - // Figure out which one will send and receive - //(my_rank + other_rank )%2 flips each time other_rank changes by one - //(my_rank < other_rank) ensures that my_rank and other_rank are opposite - // my_rank = other_rank must correspond to a receive (since it implicitely means extra work later on) - // NB: must take care that if at one step other_rank == my_rank, the other step must not be a receive!! - // not trivial - if ((my_rank + other_rank + (my_rank > other_rank)) % 2) { - IamReceiver = false; - } else { - IamSender = false; - } - } - - // highest mpi rank send first receive after, the other does the opposite - if (my_rank > other_rank) { - // send - for (int i = this->sent_counter; i < send_size and IamSender and sent < maxget; i++) { - int tag = this->orbitals->size() * this->iter + i; - int orb_ix = this->orb_ix_map[my_rank][i]; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - mrcpp::mpi::send_function(phi_i, other_rank, tag); - this->sent_orbital_index.push_back(orb_ix); - this->sent_orbital_mpirank.push_back(other_rank); - this->sent_counter++; // total to other_rank - sent++; // this call - } - // receive - for (int i = this->received_counter; i < recv_size and IamReceiver and received < maxget; i++) { - int tag = this->orbitals->size() * this->iter + i; - int orb_ix = this->orb_ix_map[other_rank][i]; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - mrcpp::mpi::recv_function(phi_i, other_rank, tag); - this->received_orbital_index.push_back(orb_ix); - this->received_orbitals.push_back(phi_i); - this->rcv_step.push_back(step); - this->received_counter++; // total from other_rank - received++; // this call - } - } else { - // my_rank < other_rank -> receive first, send after receive - for (int i = this->received_counter; i < recv_size and IamReceiver and received < maxget; i++) { - int tag = this->orbitals->size() * this->iter + i; - int orb_ix = this->orb_ix_map[other_rank][i]; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - mrcpp::mpi::recv_function(phi_i, other_rank, tag); - this->received_orbital_index.push_back(orb_ix); - this->received_orbitals.push_back(phi_i); - this->rcv_step.push_back(step); - this->received_counter++; // total from other_rank - received++; // this call - } - // send - for (int i = this->sent_counter; i < send_size and IamSender and sent < maxget; i++) { - int tag = this->orbitals->size() * this->iter + i; - int orb_ix = this->orb_ix_map[my_rank][i]; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - mrcpp::mpi::send_function(phi_i, other_rank, tag); - this->sent_orbital_index.push_back(orb_ix); - this->sent_orbital_mpirank.push_back(other_rank); - this->sent_counter++; // total to other_rank - sent++; // this call - } - } - } - - if ((this->sent_counter >= send_size or not IamSender) and (this->received_counter >= recv_size or not IamReceiver)) { - // all orbitals to be processed during this iteration are ready. Start next iteration - this->sent_counter = 0; - this->received_counter = 0; - this->iter++; - if (this->iter % 2 == 0) break; // must always exit after odd iterations in order to finish duties outside - } - } - return true; -} - -// Receive all the orbitals from Bank -bool OrbitalIterator::bank_next(int max_recv) { - mrcpp::mpi::free_foreign(*this->orbitals); // delete foreign orbitals - // NB: for now we completely delete orbitals at each iteration. Could reuse the memory in next iteration. - this->received_orbital_index.clear(); - this->received_orbitals.clear(); - this->rcv_step.clear(); - - if (this->iter >= this->orbitals->size()) { - // We have received all orbitals -> return - this->iter = 0; - return false; - } - - int my_rank = mrcpp::mpi::wrk_rank; - int max_rank = mrcpp::mpi::wrk_size; - int received = 0; // number of new received orbitals this call - int recv_size = 1; // number of orbitals to receive per iteration - - if (this->iter == 0) { - // send all my orbitals to bank - for (int i = 0; i < this->orbitals->size(); i++) { - Orbital &phi_i = (*this->orbitals)[i]; - if (not mrcpp::mpi::my_orb(i)) continue; - orbBank.put_func(i, phi_i); - } - } - - // receive - for (int i = 0; i < recv_size; i++) { - int tag = i; - int orb_ix = this->received_counter; - Orbital &phi_i = (*this->orbitals)[orb_ix]; - orbBank.get_func(orb_ix, phi_i); - this->received_orbital_index.push_back(orb_ix); - this->received_orbitals.push_back(phi_i); - this->received_counter++; // total - received++; // this call - } - - // all orbitals to be processed during this iteration are ready. Start next iteration - this->iter++; - - return true; -} - -} // namespace mrchem diff --git a/src/qmfunctions/OrbitalIterator.h b/src/qmfunctions/OrbitalIterator.h deleted file mode 100644 index f40559823..000000000 --- a/src/qmfunctions/OrbitalIterator.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#pragma once - -#include "orbital_utils.h" - -namespace mrchem { - -class OrbitalIterator final { -public: - OrbitalIterator(OrbitalVector &Phi, bool sym = false); - - mrcpp::BankAccount orbBank; - bool next(int max_recv = -1); - bool bank_next(int max_recv = 1); - - int idx(int i) const { return (this->received_orbital_index)[i]; } - Orbital &orbital(int i) { return (this->received_orbitals)[i]; } - - int get_size() const { return this->received_orbitals.size(); } - int get_idx_sent(int i) const { return (this->sent_orbital_index)[i]; } - int get_rank_sent(int i) const { return (this->sent_orbital_mpirank)[i]; } - int get_step(int i) const { return (this->rcv_step)[i]; } - int get_sent_size() const { return this->sent_orbital_index.size(); } - -protected: - const bool symmetric; - int iter; - int received_counter; // number of orbitals fetched during this iteration - int sent_counter; // number of orbitals sent during this iteration - OrbitalVector *orbitals; - OrbitalVector received_orbitals; - std::vector received_orbital_index; // index of the orbitals received - std::vector sent_orbital_index; // indices of the orbitals sent out - std::vector sent_orbital_mpirank; // mpi rank (=rank) of the orbitals sent out - std::vector rcv_step; // for symmetric treatment: if the send was at step=0 or 1 - std::vector> orb_ix_map; // indices in the original orbital vector for each MPI -}; - -} // namespace mrchem diff --git a/src/qmfunctions/QMFunction.cpp b/src/qmfunctions/QMFunction.cpp deleted file mode 100644 index 2bb81d0f6..000000000 --- a/src/qmfunctions/QMFunction.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#include "MRCPP/Parallel" -#include "MRCPP/Printer" - -#include "QMFunction.h" -#include "parallel.h" -#include "qmfunctions/qmfunction_utils.h" - -namespace mrchem { -extern mrcpp::MultiResolutionAnalysis<3> *MRA; // Global MRA - -QMFunction::QMFunction(bool share) - : func_ptr(std::make_shared(share)) {} - -QMFunction::QMFunction(const QMFunction &func) - : conj(func.conj) - , func_ptr(func.func_ptr) {} - -QMFunction &QMFunction::operator=(const QMFunction &func) { - if (this != &func) { - this->conj = func.conj; - this->func_ptr = func.func_ptr; - } - return *this; -} - -QMFunction QMFunction::dagger() { - QMFunction out(*this); - out.conj = not(this->conj); - return out; -} - -void QMFunction::setReal(mrcpp::FunctionTree<3> *tree) { - if (isShared()) MSG_ABORT("Cannot set in shared function"); - this->func_ptr->re = tree; -} - -void QMFunction::setImag(mrcpp::FunctionTree<3> *tree) { - if (isShared()) MSG_ABORT("Cannot set in shared function"); - this->func_ptr->im = tree; -} - -void QMFunction::alloc(int type, mrcpp::MultiResolutionAnalysis<3> *mra) { - if (mra == nullptr) MSG_ABORT("Invalid argument"); - if (type == NUMBER::Real or type == NUMBER::Total) { - if (hasReal()) MSG_ABORT("Real part already allocated"); - this->func_ptr->re = new mrcpp::FunctionTree<3>(*mra, this->func_ptr->shared_mem_re); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (hasImag()) MSG_ABORT("Imaginary part already allocated"); - this->func_ptr->im = new mrcpp::FunctionTree<3>(*mra, this->func_ptr->shared_mem_im); - } -} - -void QMFunction::free(int type) { - if (type == NUMBER::Real or type == NUMBER::Total) { - if (hasReal()) delete this->func_ptr->re; - this->func_ptr->re = nullptr; - if (this->func_ptr->shared_mem_re) this->func_ptr->shared_mem_re->clear(); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (hasImag()) delete this->func_ptr->im; - this->func_ptr->im = nullptr; - if (this->func_ptr->shared_mem_im) this->func_ptr->shared_mem_im->clear(); - } -} - -/** @brief Returns the orbital meta data - * - * Tree sizes (nChunks) are flushed before return. - */ -FunctionData &QMFunction::getFunctionData() { - this->func_ptr->flushFuncData(); - return this->func_ptr->func_data; -} - -int QMFunction::getSizeNodes(int type) const { - int size_mb = 0; // Memory size in kB - if (type == NUMBER::Real or type == NUMBER::Total) { - if (hasReal()) size_mb += real().getSizeNodes(); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (hasImag()) size_mb += imag().getSizeNodes(); - } - return size_mb; -} - -int QMFunction::getNNodes(int type) const { - int nNodes = 0; - if (type == NUMBER::Real or type == NUMBER::Total) { - if (hasReal()) nNodes += real().getNNodes(); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (hasImag()) nNodes += imag().getNNodes(); - } - return nNodes; -} - -int QMFunction::crop(double prec) { - if (prec < 0.0) return 0; - bool need_to_crop = not(isShared()) or mpi::share_master(); - int nChunksremoved = 0; - if (need_to_crop) { - if (hasReal()) nChunksremoved = real().crop(prec, 1.0, false); - if (hasImag()) nChunksremoved += imag().crop(prec, 1.0, false); - } - mpi::share_function(*this, 0, 7744, mpi::comm_share); - return nChunksremoved; -} - -ComplexDouble QMFunction::integrate() const { - double int_r = 0.0; - double int_i = 0.0; - if (hasReal()) int_r = real().integrate(); - if (hasImag()) int_i = imag().integrate(); - return ComplexDouble(int_r, int_i); -} - -/** @brief Returns the norm of the orbital */ -double QMFunction::norm() const { - double norm = squaredNorm(); - if (norm > 0.0) norm = std::sqrt(norm); - return norm; -} - -/** @brief Returns the squared norm of the orbital */ -double QMFunction::squaredNorm() const { - double sq_r = -1.0; - double sq_i = -1.0; - if (hasReal()) sq_r = real().getSquareNorm(); - if (hasImag()) sq_i = imag().getSquareNorm(); - - double sq_norm = 0.0; - if (sq_r < 0.0 and sq_i < 0.0) { - sq_norm = -1.0; - } else { - if (sq_r >= 0.0) sq_norm += sq_r; - if (sq_i >= 0.0) sq_norm += sq_i; - } - return sq_norm; -} - -/** @brief In place addition. - * - * Output is extended to union grid. - * - */ -void QMFunction::add(ComplexDouble c, QMFunction inp) { - double thrs = mrcpp::MachineZero; - bool cHasReal = (std::abs(c.real()) > thrs); - bool cHasImag = (std::abs(c.imag()) > thrs); - bool outNeedsReal = (cHasReal and inp.hasReal()) or (cHasImag and inp.hasImag()); - bool outNeedsImag = (cHasReal and inp.hasImag()) or (cHasImag and inp.hasReal()); - - QMFunction &out = *this; - bool clearReal(false), clearImag(false); - if (outNeedsReal and not(out.hasReal())) { - out.alloc(NUMBER::Real); - clearReal = true; - } - - if (outNeedsImag and not(out.hasImag())) { - out.alloc(NUMBER::Imag); - clearImag = true; - } - - bool need_to_add = not(out.isShared()) or mpi::share_master(); - if (need_to_add) { - if (clearReal) out.real().setZero(); - if (clearImag) out.imag().setZero(); - if (cHasReal and inp.hasReal()) { - while (mrcpp::refine_grid(out.real(), inp.real())) {} - out.real().add(c.real(), inp.real()); - } - if (cHasReal and inp.hasImag()) { - double conj = (inp.conjugate()) ? -1.0 : 1.0; - while (mrcpp::refine_grid(out.imag(), inp.imag())) {} - out.imag().add(conj * c.real(), inp.imag()); - } - if (cHasImag and inp.hasReal()) { - while (mrcpp::refine_grid(out.imag(), inp.real())) {} - out.imag().add(c.imag(), inp.real()); - } - if (cHasImag and inp.hasImag()) { - double conj = (inp.conjugate()) ? -1.0 : 1.0; - while (mrcpp::refine_grid(out.real(), inp.imag())) {} - out.real().add(-1.0 * conj * c.imag(), inp.imag()); - } - } - mpi::share_function(out, 0, 9911, mpi::comm_share); -} - -/** @brief In place addition of absolute values. - * - * Output is extended to union grid. - * - */ -void QMFunction::absadd(ComplexDouble c, QMFunction inp) { - double thrs = mrcpp::MachineZero; - bool cHasReal = (std::abs(c.real()) > thrs); - bool cHasImag = (std::abs(c.imag()) > thrs); - bool outNeedsReal = (cHasReal and inp.hasReal()) or (cHasImag and inp.hasImag()); - bool outNeedsImag = (cHasReal and inp.hasImag()) or (cHasImag and inp.hasReal()); - - QMFunction &out = *this; - bool clearReal(false), clearImag(false); - if (outNeedsReal and not(out.hasReal())) { - out.alloc(NUMBER::Real); - clearReal = true; - } - - if (outNeedsImag and not(out.hasImag())) { - out.alloc(NUMBER::Imag); - clearImag = true; - } - - bool need_to_add = not(out.isShared()) or mpi::share_master(); - if (need_to_add) { - if (clearReal) out.real().setZero(); - if (clearImag) out.imag().setZero(); - if (cHasReal and inp.hasReal()) { - while (mrcpp::refine_grid(out.real(), inp.real())) {} - out.real().absadd(c.real(), inp.real()); - } - if (cHasReal and inp.hasImag()) { - double conj = (inp.conjugate()) ? -1.0 : 1.0; - while (mrcpp::refine_grid(out.imag(), inp.imag())) {} - out.imag().absadd(conj * c.real(), inp.imag()); - } - if (cHasImag and inp.hasReal()) { - while (mrcpp::refine_grid(out.imag(), inp.real())) {} - out.imag().absadd(c.imag(), inp.real()); - } - if (cHasImag and inp.hasImag()) { - double conj = (inp.conjugate()) ? -1.0 : 1.0; - while (mrcpp::refine_grid(out.real(), inp.imag())) {} - out.real().absadd(-1.0 * conj * c.imag(), inp.imag()); - } - } - mpi::share_function(out, 0, 9912, mpi::comm_share); -} - -/** @brief In place multiply with real scalar. Fully in-place.*/ -void QMFunction::rescale(double c) { - bool need_to_rescale = not(isShared()) or mpi::share_master(); - if (need_to_rescale) { - if (hasReal()) real().rescale(c); - if (hasImag()) imag().rescale(c); - } - mpi::share_function(*this, 0, 5543, mpi::comm_share); -} - -/** @brief In place multiply with complex scalar. Involves a deep copy.*/ -void QMFunction::rescale(ComplexDouble c) { - QMFunction &out = *this; - QMFunction tmp(isShared()); - qmfunction::deep_copy(tmp, out); - out.free(NUMBER::Total); - out.add(c, tmp); -} - -} // namespace mrchem diff --git a/src/qmfunctions/QMFunction.h b/src/qmfunctions/QMFunction.h deleted file mode 100644 index a49b7fbf7..000000000 --- a/src/qmfunctions/QMFunction.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#pragma once - -#include - -#include "ComplexFunction.h" -#include "qmfunction_fwd.h" - -namespace mrchem { - -class QMFunction { -public: - explicit QMFunction(bool share = false); - QMFunction(const QMFunction &func); - QMFunction &operator=(const QMFunction &func); - QMFunction dagger(); - virtual ~QMFunction() = default; - - void alloc(int type, mrcpp::MultiResolutionAnalysis<3> *mra = MRA); - void free(int type); - - bool isShared() const { return this->func_ptr->func_data.is_shared; } - bool hasReal() const { return (this->func_ptr->re == nullptr) ? false : true; } - bool hasImag() const { return (this->func_ptr->im == nullptr) ? false : true; } - - int getSizeNodes(int type) const; - int getNNodes(int type) const; - - FunctionData &getFunctionData(); - - void setReal(mrcpp::FunctionTree<3> *tree); - void setImag(mrcpp::FunctionTree<3> *tree); - - mrcpp::FunctionTree<3> &real() { return *this->func_ptr->re; } - mrcpp::FunctionTree<3> &imag() { return *this->func_ptr->im; } - - const mrcpp::FunctionTree<3> &real() const { return *this->func_ptr->re; } - const mrcpp::FunctionTree<3> &imag() const { return *this->func_ptr->im; } - - void release() { this->func_ptr.reset(); } - bool conjugate() const { return this->conj; } - - double norm() const; - double squaredNorm() const; - ComplexDouble integrate() const; - - int crop(double prec); - void rescale(double c); - void rescale(ComplexDouble c); - void add(ComplexDouble c, QMFunction inp); - void absadd(ComplexDouble c, QMFunction inp); - -protected: - bool conj{false}; - std::shared_ptr func_ptr; -}; - -} // namespace mrchem diff --git a/src/qmfunctions/density_utils.cpp b/src/qmfunctions/density_utils.cpp index 543ee96e2..0071820f7 100644 --- a/src/qmfunctions/density_utils.cpp +++ b/src/qmfunctions/density_utils.cpp @@ -1,4 +1,4 @@ - /* +/* * MRChem, a numerical real-space code for molecular electronic structure * calculations within the self-consistent field (SCF) approximations of quantum * chemistry (Hartree-Fock and Density Functional Theory). @@ -24,10 +24,10 @@ */ #include "MRCPP/Gaussians" +#include "MRCPP/MWFunctions" +#include "MRCPP/Parallel" #include "MRCPP/Printer" #include "MRCPP/Timer" -#include "MRCPP/Parallel" -#include "MRCPP/MWFunctions" #include "Density.h" #include "Orbital.h" @@ -51,12 +51,27 @@ namespace density { Density compute(double prec, Orbital phi, DensityType spin); void compute_local_X(double prec, Density &rho, OrbitalVector &Phi, OrbitalVector &X, DensityType spin); void compute_local_XY(double prec, Density &rho, OrbitalVector &Phi, OrbitalVector &X, OrbitalVector &Y, DensityType spin); -double compute_occupation(Orbital &phi, DensityType dens_spin); +double compute_occupation(const Orbital &phi, DensityType dens_spin); } // namespace density +double density::compute_occupation(const Orbital &phi, DensityType dens_spin) { + double occ_a(0.0), occ_b(0.0), occ_p(0.0); + if (phi.spin() == SPIN::Alpha) occ_a = static_cast(phi.occ()); + if (phi.spin() == SPIN::Beta) occ_b = static_cast(phi.occ()); + if (phi.spin() == SPIN::Paired) occ_p = static_cast(phi.occ()); + + double occup(0.0); + if (dens_spin == DensityType::Total) occup = occ_a + occ_b + occ_p; + if (dens_spin == DensityType::Alpha) occup = occ_a + 0.5 * occ_p; + if (dens_spin == DensityType::Beta) occup = occ_b + 0.5 * occ_p; + if (dens_spin == DensityType::Spin) occup = occ_a - occ_b; + + return occup; +} + /** @brief Compute density as the square of an orbital * - * This routine is similar to mrcpp::cplxfunc::multiply_real(), but it uses + * This routine is similar to mrcpp::multiply_real(), but it uses * mrcpp::square(phi) instead of mrcpp::multiply(phi, phi), which makes it * slightly faster. * @@ -64,30 +79,9 @@ double compute_occupation(Orbital &phi, DensityType dens_spin); Density density::compute(double prec, Orbital phi, DensityType spin) { double occ = density::compute_occupation(phi, spin); if (std::abs(occ) < mrcpp::MachineZero) return Density(false); - Density rho(false); - FunctionTreeVector<3> sum_vec; - if (phi.hasReal()) { - auto *real_2 = new FunctionTree<3>(*MRA); - mrcpp::copy_grid(*real_2, phi.real()); - mrcpp::square(prec, *real_2, phi.real()); - sum_vec.push_back(std::make_tuple(occ, real_2)); - } - if (phi.hasImag()) { - auto *imag_2 = new FunctionTree<3>(*MRA); - mrcpp::copy_grid(*imag_2, phi.imag()); - mrcpp::square(prec, *imag_2, phi.imag()); - sum_vec.push_back(std::make_tuple(occ, imag_2)); - } - - rho.alloc(NUMBER::Real); - if (sum_vec.size() > 0) { - mrcpp::build_grid(rho.real(), sum_vec); - mrcpp::add(-1.0, rho.real(), sum_vec, 0); - mrcpp::clear(sum_vec, true); - } else { - rho.real().setZero(); - } + mrcpp::copy_grid(rho, phi); + mrcpp::multiply(prec, rho, occ, phi, phi, -1, false, false, true); // the last "true" means use complex conjugate of the first phi return rho; } @@ -135,13 +129,9 @@ void density::compute(double prec, Density &rho, OrbitalVector &Phi, OrbitalVect void density::compute_local(double prec, Density &rho, OrbitalVector &Phi, DensityType spin) { int N_el = orbital::get_electron_number(Phi); double abs_prec = (mrcpp::mpi::numerically_exact) ? -1.0 : prec / N_el; - if (not rho.hasReal()) rho.alloc(NUMBER::Real); - - if (rho.hasReal()) rho.real().setZero(); - if (rho.hasImag()) rho.imag().setZero(); for (auto &phi_i : Phi) { - if (mrcpp::mpi::my_orb(phi_i)) { + if (mrcpp::mpi::my_func(phi_i)) { Density rho_i = density::compute(prec, phi_i, spin); rho.add(1.0, rho_i); // Extends to union grid rho.crop(abs_prec); // Truncates to given precision @@ -165,19 +155,17 @@ void density::compute_local_X(double prec, Density &rho, OrbitalVector &Phi, Orb double add_prec = prec / N_el; // prec for rho = sum_i rho_i if (Phi.size() != X.size()) MSG_ERROR("Size mismatch"); - if (not rho.hasReal()) rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) rho.alloc(1); // Compute local density from own orbitals - rho.real().setZero(); for (int i = 0; i < Phi.size(); i++) { - if (mrcpp::mpi::my_orb(Phi[i])) { - if (not mrcpp::mpi::my_orb(X[i])) MSG_ABORT("Inconsistent MPI distribution"); - - double occ = density::compute_occupation(Phi[i], spin); + if (mrcpp::mpi::my_func(Phi[i])) { + if (not mrcpp::mpi::my_func(X[i])) MSG_ABORT("Inconsistent MPI distribution"); + Orbital phi_i = Phi[i]; + double occ = density::compute_occupation(phi_i, spin); if (std::abs(occ) < mrcpp::MachineZero) continue; // next orbital if this one is not occupied! - Density rho_i(false); - mrcpp::cplxfunc::multiply_real(rho_i, Phi[i], X[i], mult_prec); + mrcpp::multiply(rho_i, phi_i, X[i], mult_prec); rho.add(2.0 * occ, rho_i); rho.crop(add_prec); } @@ -188,25 +176,28 @@ void density::compute_local_XY(double prec, Density &rho, OrbitalVector &Phi, Or int N_el = orbital::get_electron_number(Phi); double mult_prec = prec; // prec for rho_i = |x_i> &dens_exp) { - if (not rho.hasReal()) rho.alloc(NUMBER::Real); + if (not rho.hasReal()) rho.alloc(1); mrcpp::build_grid(rho.real(), dens_exp); mrcpp::project(prec, rho.real(), dens_exp); } -double density::compute_occupation(Orbital &phi, DensityType dens_spin) { - double occ_a(0.0), occ_b(0.0), occ_p(0.0); - if (phi.spin() == SPIN::Alpha) occ_a = (double)phi.occ(); - if (phi.spin() == SPIN::Beta) occ_b = (double)phi.occ(); - if (phi.spin() == SPIN::Paired) occ_p = (double)phi.occ(); - - double occ(0.0); - if (dens_spin == DensityType::Total) occ = occ_a + occ_b + occ_p; - if (dens_spin == DensityType::Alpha) occ = occ_a + 0.5 * occ_p; - if (dens_spin == DensityType::Beta) occ = occ_b + 0.5 * occ_p; - if (dens_spin == DensityType::Spin) occ = occ_a - occ_b; - - return occ; -} - /** @brief Add up local density contributions and broadcast * * MPI: Each rank first computes its own local density, which is then reduced @@ -253,7 +229,7 @@ void density::allreduce_density(double prec, Density &rho_tot, Density &rho_loc) if (mrcpp::mpi::numerically_exact) rho_loc.crop(prec); } - if (not rho_tot.hasReal()) rho_tot.alloc(NUMBER::Real); + if (not rho_tot.hasReal()) rho_tot.alloc(1); if (rho_tot.isShared()) { int tag = 2002; @@ -269,13 +245,12 @@ void density::allreduce_density(double prec, Density &rho_tot, Density &rho_loc) } else { // MPI grand master distributes to all ranks mrcpp::mpi::broadcast_function(rho_loc, mrcpp::mpi::comm_wrk); - // All MPI ranks copies the function into final memory + // All MPI ranks copies the function into final memory mrcpp::copy_grid(rho_tot.real(), rho_loc.real()); mrcpp::copy_func(rho_tot.real(), rho_loc.real()); } } - // Function to read atomic density data from a file void density::readAtomicDensity(const std::string path, Eigen::VectorXd &rGrid, Eigen::VectorXd &rhoGrid) { std::vector r, rho; diff --git a/src/qmfunctions/density_utils.h b/src/qmfunctions/density_utils.h index b177ccfac..8790a9f7d 100644 --- a/src/qmfunctions/density_utils.h +++ b/src/qmfunctions/density_utils.h @@ -25,9 +25,9 @@ #pragma once -#include "mrchem.h" -#include "Orbital.h" #include "Density.h" +#include "Orbital.h" +#include "mrchem.h" namespace mrchem { namespace density { diff --git a/src/qmfunctions/orbital_utils.cpp b/src/qmfunctions/orbital_utils.cpp index ccbf93286..1ea89e92d 100644 --- a/src/qmfunctions/orbital_utils.cpp +++ b/src/qmfunctions/orbital_utils.cpp @@ -35,7 +35,6 @@ #include "utils/print_utils.h" #include "Orbital.h" -#include "OrbitalIterator.h" #include "orbital_utils.h" using mrcpp::FunctionNode; @@ -54,7 +53,7 @@ ComplexMatrix calc_localization_matrix(double prec, OrbitalVector &Phi); struct OrbitalData { int rank_id; int spin; - int occ; + double occ; }; OrbitalData getOrbitalData(const Orbital &orb) { OrbitalData orb_data; @@ -69,56 +68,6 @@ OrbitalData getOrbitalData(const Orbital &orb) { * Orbital related standalone functions * ****************************************/ -/** @brief Compute = int bra^\dag(r) * ket(r) dr. - * - * Notice that the - * - * MPI: dot product is computed by the ket owner and the corresponding - * bra is communicated. The resulting vector is allreduced, and - * the foreign bra's are cleared. - * - */ -ComplexVector orbital::dot(OrbitalVector &Bra, OrbitalVector &Ket) { - if (Bra.size() != Ket.size()) MSG_ABORT("Size mismatch"); - - int N = Bra.size(); - ComplexVector result = ComplexVector::Zero(N); - for (int i = 0; i < N; i++) { - // The bra is sent to the owner of the ket - if (mrcpp::mpi::my_orb(Bra[i]) != mrcpp::mpi::my_orb(Ket[i])) { - int tag = 8765 + i; - int src = (Bra[i].getRank()) % mrcpp::mpi::wrk_size; - int dst = (Ket[i].getRank()) % mrcpp::mpi::wrk_size; - if (mrcpp::mpi::my_orb(Bra[i])) mrcpp::mpi::send_function(Bra[i], dst, tag, mrcpp::mpi::comm_wrk); - if (mrcpp::mpi::my_orb(Ket[i])) mrcpp::mpi::recv_function(Bra[i], src, tag, mrcpp::mpi::comm_wrk); - } - result[i] = orbital::dot(Bra[i], Ket[i]); - if (not mrcpp::mpi::my_orb(Bra[i])) Bra[i].free(NUMBER::Total); - } - mrcpp::mpi::allreduce_vector(result, mrcpp::mpi::comm_wrk); - return result; -} - -/** @brief Compute = int |bra^\dag(r)| * |ket(r)| dr. - * - */ -ComplexDouble orbital::node_norm_dot(Orbital bra, Orbital ket, bool exact) { - if ((bra.spin() == SPIN::Alpha) and (ket.spin() == SPIN::Beta)) return 0.0; - if ((bra.spin() == SPIN::Beta) and (ket.spin() == SPIN::Alpha)) return 0.0; - return mrcpp::cplxfunc::node_norm_dot(bra, ket, exact); -} - /** @brief Compare spin and occupation of two orbitals * * Returns true if orbital parameters are the same. @@ -225,8 +174,8 @@ OrbitalVector orbital::add(ComplexDouble a, OrbitalVector &Phi_a, ComplexDouble OrbitalVector out = orbital::param_copy(Phi_a); for (int i = 0; i < Phi_a.size(); i++) { - if (mrcpp::mpi::my_orb(Phi_a[i]) != mrcpp::mpi::my_orb(Phi_b[i])) MSG_ABORT("MPI rank mismatch"); - mrcpp::cplxfunc::add(out[i], a, Phi_a[i], b, Phi_b[i], prec); + if (mrcpp::mpi::my_func(Phi_a[i]) != mrcpp::mpi::my_func(Phi_b[i])) MSG_ABORT("MPI rank mismatch"); + mrcpp::add(out[i], a, Phi_a[i], b, Phi_b[i], prec); } return out; } @@ -243,9 +192,8 @@ OrbitalVector orbital::rotate(OrbitalVector &Phi, const ComplexMatrix &U, double // The principle of this routine is that nodes are rotated one by one using matrix multiplication. // The routine does avoid when possible to move data, but uses pointers and indices manipulation. // MPI version does not use OMP yet, Serial version uses OMP - OrbitalVector Psi = orbital::deep_copy(Phi); - mrcpp::mpifuncvec::rotate(Psi, U, prec); + mrcpp::rotate(Psi, U, prec); return Psi; } @@ -263,7 +211,7 @@ void orbital::save_nodes(OrbitalVector Phi, mrcpp::FunctionTree<3> &refTree, mrc int N = Phi.size(); int max_ix; for (int j = 0; j < N; j++) { - if (not mrcpp::mpi::my_orb(Phi[j])) continue; + if (not mrcpp::mpi::my_func(Phi[j])) continue; // make vector with all coef address and their index in the union grid if (Phi[j].hasReal()) { Phi[j].real().makeCoeffVector(coeffVec, indexVec, parindexVec, scalefac, max_ix, refTree); @@ -301,8 +249,8 @@ void orbital::save_nodes(OrbitalVector Phi, mrcpp::FunctionTree<3> &refTree, mrc OrbitalVector orbital::deep_copy(OrbitalVector &Phi) { OrbitalVector out; for (auto &i : Phi) { - Orbital out_i(i.spin(), i.occ(), i.getRank()); - if (mrcpp::mpi::my_orb(out_i)) mrcpp::cplxfunc::deep_copy(out_i, i); + Orbital out_i; + if (mrcpp::mpi::my_func(i)) mrcpp::deep_copy(out_i, i); out.push_back(out_i); } return out; @@ -316,7 +264,8 @@ OrbitalVector orbital::deep_copy(OrbitalVector &Phi) { OrbitalVector orbital::param_copy(const OrbitalVector &Phi) { OrbitalVector out; for (const auto &i : Phi) { - Orbital out_i(i.spin(), i.occ(), i.getRank()); + Orbital out_i; + out_i.func_ptr->data = i.func_ptr->data; out.push_back(out_i); } return out; @@ -334,8 +283,8 @@ OrbitalVector orbital::adjoin(OrbitalVector &Phi_a, OrbitalVector &Phi_b) { for (auto &phi : Phi_a) { if (phi.getRank() % mrcpp::mpi::wrk_size != out.size() % mrcpp::mpi::wrk_size) { // need to send orbital from owner to new owner - if (mrcpp::mpi::my_orb(phi)) { mrcpp::mpi::send_function(phi, out.size() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } - if (mrcpp::mpi::my_orb(out.size())) { mrcpp::mpi::recv_function(phi, phi.getRank() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(phi)) { mrcpp::mpi::send_function(phi, out.size() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(out.size())) { mrcpp::mpi::recv_function(phi, phi.getRank() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } } phi.setRank(out.size()); out.push_back(phi); @@ -343,8 +292,8 @@ OrbitalVector orbital::adjoin(OrbitalVector &Phi_a, OrbitalVector &Phi_b) { for (auto &phi : Phi_b) { if (phi.getRank() % mrcpp::mpi::wrk_size != out.size() % mrcpp::mpi::wrk_size) { // need to send orbital from owner to new owner - if (mrcpp::mpi::my_orb(phi)) { mrcpp::mpi::send_function(phi, out.size() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } - if (mrcpp::mpi::my_orb(out.size())) { mrcpp::mpi::recv_function(phi, phi.getRank() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(phi)) { mrcpp::mpi::send_function(phi, out.size() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(out.size())) { mrcpp::mpi::recv_function(phi, phi.getRank() % mrcpp::mpi::wrk_size, phi.getRank(), mrcpp::mpi::comm_wrk); } } phi.setRank(out.size()); out.push_back(phi); @@ -364,20 +313,21 @@ OrbitalVector orbital::adjoin(OrbitalVector &Phi_a, OrbitalVector &Phi_b) { OrbitalVector orbital::disjoin(OrbitalVector &Phi, int spin) { OrbitalVector out; OrbitalVector tmp; - for (auto &i : Phi) { + for (auto &Phi_i : Phi) { + Orbital i(Phi_i); if (i.spin() == spin) { if (i.getRank() % mrcpp::mpi::wrk_size != out.size() % mrcpp::mpi::wrk_size) { // need to send orbital from owner to new owner - if (mrcpp::mpi::my_orb(i)) { mrcpp::mpi::send_function(i, out.size() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } - if (mrcpp::mpi::my_orb(out.size())) { mrcpp::mpi::recv_function(i, i.getRank() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(i)) { mrcpp::mpi::send_function(i, out.size() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(out.size())) { mrcpp::mpi::recv_function(i, i.getRank() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } } i.setRank(out.size()); out.push_back(i); } else { if (i.getRank() % mrcpp::mpi::wrk_size != tmp.size() % mrcpp::mpi::wrk_size) { // need to send orbital from owner to new owner - if (mrcpp::mpi::my_orb(i)) { mrcpp::mpi::send_function(i, tmp.size() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } - if (mrcpp::mpi::my_orb(tmp.size())) { mrcpp::mpi::recv_function(i, i.getRank() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(i)) { mrcpp::mpi::send_function(i, tmp.size() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } + if (mrcpp::mpi::my_func(tmp.size())) { mrcpp::mpi::recv_function(i, i.getRank() % mrcpp::mpi::wrk_size, i.getRank(), mrcpp::mpi::comm_wrk); } } i.setRank(tmp.size()); tmp.push_back(i); @@ -400,7 +350,7 @@ OrbitalVector orbital::disjoin(OrbitalVector &Phi, int spin) { * will get an extra "_p", "_a" or "_b" suffix. Negative spin means that all * orbitals in the vector are saved, and no suffix is added. */ -void orbital::save_orbitals(OrbitalVector &Phi, const std::string &file, int spin) { +void orbital::save_orbitals(OrbitalVector &Phi, const std::string &file, int spin, int text_format) { Timer t_tot; std::string spin_str = "All"; if (spin == SPIN::Paired) spin_str = "Paired"; @@ -417,7 +367,7 @@ void orbital::save_orbitals(OrbitalVector &Phi, const std::string &file, int spi Timer t1; std::stringstream orbname; orbname << file << "_idx_" << n; - if (mrcpp::mpi::my_orb(Phi[i])) saveOrbital(orbname.str(), Phi[i]); + if (mrcpp::mpi::my_func(Phi[i])) saveOrbital(orbname.str(), Phi[i], text_format); print_utils::qmfunction(2, "'" + orbname.str() + "'", Phi[i], t1); n++; } @@ -452,7 +402,7 @@ OrbitalVector orbital::load_orbitals(const std::string &file, int n_orbs) { if (phi_i.hasReal() or phi_i.hasImag()) { Phi.push_back(phi_i); print_utils::qmfunction(2, "'" + orbname.str() + "'", phi_i, t1); - if (not mrcpp::mpi::my_orb(phi_i)) phi_i.free(NUMBER::Total); + if (not mrcpp::mpi::my_func(phi_i)) phi_i.free(); } else { break; } @@ -470,13 +420,13 @@ void orbital::normalize(Orbital phi) { void orbital::normalize(OrbitalVector &Phi) { mrcpp::mpi::free_foreign(Phi); for (auto &phi_i : Phi) - if (mrcpp::mpi::my_orb(phi_i)) orbital::normalize(phi_i); + if (mrcpp::mpi::my_func(phi_i)) orbital::normalize(phi_i); } /** @brief In place orthogonalize against inp. Private function. */ -void orbital::orthogonalize(double prec, Orbital &phi, Orbital psi) { - ComplexDouble overlap = orbital::dot(psi, phi); - double sq_norm = psi.squaredNorm(); +void orbital::orthogonalize(double prec, Orbital &&phi, Orbital psi) { + ComplexDouble overlap = mrcpp::dot(psi, phi); + double sq_norm = psi.getSquareNorm(); if (std::abs(overlap) > prec) phi.add(-1.0 * overlap / sq_norm, psi); } @@ -488,15 +438,15 @@ void orbital::orthogonalize(double prec, OrbitalVector &Phi) { int tag = 7632 * i + j; int src = (Phi[j].getRank()) % mrcpp::mpi::wrk_size; int dst = (Phi[i].getRank()) % mrcpp::mpi::wrk_size; - if (mrcpp::mpi::my_orb(Phi[i]) and mrcpp::mpi::my_orb(Phi[j])) { - orbital::orthogonalize(prec / Phi.size(), Phi[i], Phi[j]); + if (mrcpp::mpi::my_func(Phi[i]) and mrcpp::mpi::my_func(Phi[j])) { + mrcpp::orthogonalize(prec / Phi.size(), Phi[i], Phi[j]); } else { - if (mrcpp::mpi::my_orb(Phi[i])) { + if (mrcpp::mpi::my_func(Phi[i])) { mrcpp::mpi::recv_function(Phi[j], src, tag, mrcpp::mpi::comm_wrk); - orbital::orthogonalize(prec / Phi.size(), Phi[i], Phi[j]); - Phi[j].free(NUMBER::Total); + mrcpp::orthogonalize(prec / Phi.size(), Phi[i], Phi[j]); + Phi[j].free(); } - if (mrcpp::mpi::my_orb(Phi[j])) mrcpp::mpi::send_function(Phi[j], dst, tag, mrcpp::mpi::comm_wrk); + if (mrcpp::mpi::my_func(Phi[j])) mrcpp::mpi::send_function(Phi[j], dst, tag, mrcpp::mpi::comm_wrk); } } } @@ -505,7 +455,7 @@ void orbital::orthogonalize(double prec, OrbitalVector &Phi) { OrbitalChunk orbital::get_my_chunk(OrbitalVector &Phi) { OrbitalChunk chunk; for (int i = 0; i < Phi.size(); i++) { - if (mrcpp::mpi::my_orb(i)) chunk.push_back(std::make_tuple(i, Phi[i])); + if (mrcpp::mpi::my_func(i)) chunk.push_back(std::make_tuple(i, Orbital(Phi[i]))); } return chunk; } @@ -514,7 +464,7 @@ OrbitalChunk orbital::get_my_chunk(OrbitalVector &Phi) { * orthogonal spins means orthogonal orbitals. */ void orbital::orthogonalize(double prec, OrbitalVector &Phi, OrbitalVector &Psi) { - mrcpp::mpifuncvec::orthogonalize(prec, Phi, Psi); + mrcpp::orthogonalize(prec, Phi, Psi); } /** @brief Orbital transformation out_j = sum_i inp_i*U_ij @@ -526,162 +476,14 @@ void orbital::orthogonalize(double prec, OrbitalVector &Phi, OrbitalVector &Psi) * */ ComplexMatrix orbital::calc_overlap_matrix(OrbitalVector &BraKet) { - return mrcpp::mpifuncvec::calc_overlap_matrix(BraKet); + return mrcpp::calc_overlap_matrix(BraKet); } /** @brief Compute the overlap matrix S_ij = * */ ComplexMatrix orbital::calc_overlap_matrix(OrbitalVector &Bra, OrbitalVector &Ket) { - return mrcpp::mpifuncvec::calc_overlap_matrix(Bra, Ket); -} - -/** @brief Compute the overlap matrix of the absolute value of the functions S_ij = <|bra_i|||ket_j|> - * - */ -DoubleMatrix orbital::calc_norm_overlap_matrix(OrbitalVector &BraKet) { - int N = BraKet.size(); - DoubleMatrix S = DoubleMatrix::Zero(N, N); - DoubleMatrix Sreal = DoubleMatrix::Zero(2 * N, 2 * N); // same as S, but stored as 4 blocks, rr,ri,ir,ii - - // 1) make union tree without coefficients - mrcpp::FunctionTree<3> refTree(*MRA); - mrcpp::mpi::allreduce_Tree_noCoeff(refTree, BraKet, mrcpp::mpi::comm_wrk); - - int sizecoeff = (1 << refTree.getDim()) * refTree.getKp1_d(); - int sizecoeffW = ((1 << refTree.getDim()) - 1) * refTree.getKp1_d(); - - // get a list of all nodes in union grid, as defined by their indices - std::vector scalefac; - std::vector coeffVec_ref; - std::vector indexVec_ref; // serialIx of the nodes - std::vector parindexVec_ref; // serialIx of the parent nodes - int max_ix; // largest index value (not used here) - - refTree.makeCoeffVector(coeffVec_ref, indexVec_ref, parindexVec_ref, scalefac, max_ix, refTree); - int max_n = indexVec_ref.size(); - - // only used for serial case: - std::vector> coeffVec(2 * N); - std::map> node2orbVec; // for each node index, gives a vector with the indices of the orbitals using this node - std::vector> orb2node(2 * N); // for a given orbital and a given node, gives the node index in - // the orbital given the node index in the reference tree - - bool serial = mrcpp::mpi::wrk_size == 1; // flag for serial/MPI switch - mrcpp::BankAccount nodesBraKet; - - // In the serial case we store the coeff pointers in coeffVec. In the mpi case the coeff are stored in the bank - if (serial) { - // 2) make list of all coefficients, and their reference indices - // for different orbitals, indexVec will give the same index for the same node in space - std::vector parindexVec; // serialIx of the parent nodes - std::vector indexVec; // serialIx of the nodes - for (int j = 0; j < N; j++) { - // make vector with all coef pointers and their indices in the union grid - if (BraKet[j].hasReal()) { - BraKet[j].real().makeCoeffVector(coeffVec[j], indexVec, parindexVec, scalefac, max_ix, refTree); - // make a map that gives j from indexVec - int orb_node_ix = 0; - for (int ix : indexVec) { - orb2node[j][ix] = orb_node_ix++; - if (ix < 0) continue; - node2orbVec[ix].push_back(j); - } - } - if (BraKet[j].hasImag()) { - BraKet[j].imag().makeCoeffVector(coeffVec[j + N], indexVec, parindexVec, scalefac, max_ix, refTree); - // make a map that gives j from indexVec - int orb_node_ix = 0; - for (int ix : indexVec) { - orb2node[j + N][ix] = orb_node_ix++; - if (ix < 0) continue; - node2orbVec[ix].push_back(j + N); - } - } - } - } else { // MPI case - // 2) send own nodes to bank, identifying them through the serialIx of refTree - save_nodes(BraKet, refTree, nodesBraKet); - mrcpp::mpi::barrier(mrcpp::mpi::comm_wrk); // wait until everything is stored before fetching! - } - - // 3) make dot product for all the nodes and accumulate into S - - int ibank = 0; -#pragma omp parallel for schedule(dynamic) if (serial) - for (int n = 0; n < max_n; n++) { - if (n % mrcpp::mpi::wrk_size != mrcpp::mpi::wrk_rank) continue; - int csize; - int node_ix = indexVec_ref[n]; // SerialIx for this node in the reference tree - std::vector orbVec; // identifies which orbitals use this node - if (serial and node2orbVec[node_ix].size() <= 0) continue; - if (parindexVec_ref[n] < 0) - csize = sizecoeff; - else - csize = sizecoeffW; - // In the serial case we copy the coeff coeffBlock. In the mpi case coeffBlock is provided by the bank - if (serial) { - int shift = sizecoeff - sizecoeffW; // to copy only wavelet part - if (parindexVec_ref[n] < 0) shift = 0; - DoubleMatrix coeffBlock(csize, node2orbVec[node_ix].size()); - for (int j : node2orbVec[node_ix]) { // loop over indices of the orbitals using this node - int orb_node_ix = orb2node[j][node_ix]; - for (int k = 0; k < csize; k++) coeffBlock(k, orbVec.size()) = coeffVec[j][orb_node_ix][k + shift]; - orbVec.push_back(j); - } - if (orbVec.size() > 0) { - DoubleMatrix S_temp(orbVec.size(), orbVec.size()); - coeffBlock = coeffBlock.cwiseAbs(); - S_temp.noalias() = coeffBlock.transpose() * coeffBlock; - for (int i = 0; i < orbVec.size(); i++) { - for (int j = 0; j < orbVec.size(); j++) { - if (BraKet[orbVec[i] % N].spin() == SPIN::Alpha and BraKet[orbVec[j] % N].spin() == SPIN::Beta) continue; - if (BraKet[orbVec[i] % N].spin() == SPIN::Beta and BraKet[orbVec[j] % N].spin() == SPIN::Alpha) continue; - double &Srealij = Sreal(orbVec[i], orbVec[j]); - double &Stempij = S_temp(i, j); -#pragma omp atomic - Srealij += Stempij; - } - } - } - } else { // MPI case - DoubleMatrix coeffBlock(csize, 2 * N); - nodesBraKet.get_nodeblock(indexVec_ref[n], coeffBlock.data(), orbVec); - - if (orbVec.size() > 0) { - DoubleMatrix S_temp(orbVec.size(), orbVec.size()); - coeffBlock.conservativeResize(Eigen::NoChange, orbVec.size()); - coeffBlock = coeffBlock.cwiseAbs(); - S_temp.noalias() = coeffBlock.transpose() * coeffBlock; - for (int i = 0; i < orbVec.size(); i++) { - for (int j = 0; j < orbVec.size(); j++) { - if (BraKet[orbVec[i] % N].spin() == SPIN::Alpha and BraKet[orbVec[j] % N].spin() == SPIN::Beta) continue; - if (BraKet[orbVec[i] % N].spin() == SPIN::Beta and BraKet[orbVec[j] % N].spin() == SPIN::Alpha) continue; - Sreal(orbVec[i], orbVec[j]) += S_temp(i, j); - } - } - } - } - } - - IntVector conjMat = IntVector::Zero(N); - for (int i = 0; i < N; i++) { - if (!mrcpp::mpi::my_orb(BraKet[i])) continue; - conjMat[i] = (BraKet[i].conjugate()) ? -1 : 1; - } - mrcpp::mpi::allreduce_vector(conjMat, mrcpp::mpi::comm_wrk); - - for (int i = 0; i < N; i++) { - for (int j = 0; j <= i; j++) { - S(i, j) = Sreal(i, j) + conjMat[i] * conjMat[j] * Sreal(i + N, j + N) + conjMat[j] * Sreal(i, j + N) - conjMat[i] * Sreal(i + N, j); - S(j, i) = S(i, j); - } - } - - // Assumes linearity: result is sum of all nodes contributions - mrcpp::mpi::allreduce_matrix(S, mrcpp::mpi::comm_wrk); - - return S; + return mrcpp::calc_overlap_matrix(Bra, Ket); } /** @brief Compute Löwdin orthonormalization matrix @@ -737,7 +539,7 @@ ComplexMatrix orbital::localize(double prec, OrbitalVector &Phi, int spin) { OrbitalVector Phi_s = orbital::disjoin(Phi, spin); ComplexMatrix U = calc_localization_matrix(prec, Phi_s); Timer rot_t; - mrcpp::mpifuncvec::rotate(Phi_s, U, prec); + mrcpp::rotate(Phi_s, U, prec); Phi = orbital::adjoin(Phi, Phi_s); mrcpp::print::time(2, "Rotating orbitals", rot_t); return U; @@ -808,7 +610,7 @@ ComplexMatrix orbital::diagonalize(double prec, OrbitalVector &Phi, ComplexMatri mrcpp::print::time(2, "Diagonalizing matrix", diag_t); Timer rot_t; - mrcpp::mpifuncvec::rotate(Phi, U, prec); + mrcpp::rotate(Phi, U, prec); mrcpp::print::time(2, "Rotating orbitals", rot_t); mrcpp::print::footer(2, t_tot, 2); @@ -831,7 +633,7 @@ ComplexMatrix orbital::orthonormalize(double prec, OrbitalVector &Phi, ComplexMa ComplexMatrix U = orbital::calc_lowdin_matrix(Phi); t_lap.start(); - mrcpp::mpifuncvec::rotate(Phi, U, prec); + mrcpp::rotate(Phi, U, prec); mrcpp::print::time(2, "Rotating orbitals", t_lap); // Transform Fock matrix @@ -915,7 +717,7 @@ int orbital::get_electron_number(const OrbitalVector &Phi, int spin) { int nElectrons = 0; for (auto &phi_i : Phi) { if (spin == SPIN::Paired) { - nElectrons += phi_i.occ(); + nElectrons += (int)phi_i.occ() + 0.5; // nearest integer } else if (spin == SPIN::Alpha) { if (phi_i.spin() == SPIN::Paired or phi_i.spin() == SPIN::Alpha) nElectrons += 1; } else if (spin == SPIN::Beta) { @@ -931,9 +733,9 @@ int orbital::get_electron_number(const OrbitalVector &Phi, int spin) { int orbital::get_n_nodes(const OrbitalVector &Phi, bool avg) { long long totNodes = 0; int mysize = 0; - for (const auto &phi_i : Phi) totNodes += phi_i.getNNodes(NUMBER::Total); + for (const auto &phi_i : Phi) totNodes += phi_i.getNNodes(); for (const auto &phi_i : Phi) - if (mrcpp::mpi::my_orb(phi_i)) mysize++; + if (mrcpp::mpi::my_func(phi_i)) mysize++; if (avg and mysize > 0) totNodes /= mysize; if (totNodes > INT_MAX) MSG_WARN("Integer overflow: " << totNodes); return static_cast(totNodes); @@ -943,9 +745,9 @@ int orbital::get_n_nodes(const OrbitalVector &Phi, bool avg) { int orbital::get_size_nodes(const OrbitalVector &Phi, bool avg) { long long totSize = 0; int mysize = 0; - for (const auto &phi_i : Phi) totSize += phi_i.getSizeNodes(NUMBER::Total); + for (const auto &phi_i : Phi) totSize += phi_i.getSizeNodes(); for (const auto &phi_i : Phi) - if (mrcpp::mpi::my_orb(phi_i)) mysize++; + if (mrcpp::mpi::my_func(phi_i)) mysize++; if (avg and mysize > 0) totSize /= mysize; if (totSize > INT_MAX) MSG_WARN("Integer overflow: " << totSize); return static_cast(totSize); @@ -966,15 +768,15 @@ IntVector orbital::get_spins(const OrbitalVector &Phi) { */ void orbital::set_spins(OrbitalVector &Phi, const IntVector &spins) { if (Phi.size() != spins.size()) MSG_ERROR("Size mismatch"); - for (int i = 0; i < Phi.size(); i++) Phi[i].setSpin(spins(i)); + for (int i = 0; i < Phi.size(); i++) Phi[i].spin() = i; } /** @brief Returns a vector containing the orbital occupations */ -IntVector orbital::get_occupations(const OrbitalVector &Phi) { +DoubleVector orbital::get_occupations(const OrbitalVector &Phi) { int nOrbs = Phi.size(); - IntVector occ = IntVector::Zero(nOrbs); - for (int i = 0; i < nOrbs; i++) occ(i) = Phi[i].occ(); - return occ; + DoubleVector occup = DoubleVector::Zero(nOrbs); + for (int i = 0; i < nOrbs; i++) occup(i) = Phi[i].occ(); + return occup; } /** @brief Assigns occupation to each orbital @@ -982,9 +784,9 @@ IntVector orbital::get_occupations(const OrbitalVector &Phi) { * Length of input vector must match the number of orbitals in the set. * */ -void orbital::set_occupations(OrbitalVector &Phi, const IntVector &occ) { - if (Phi.size() != occ.size()) MSG_ERROR("Size mismatch"); - for (int i = 0; i < Phi.size(); i++) Phi[i].setOcc(occ(i)); +void orbital::set_occupations(OrbitalVector &Phi, const DoubleVector &occup) { + if (Phi.size() != occup.size()) MSG_ERROR("Size mismatch"); + for (int i = 0; i < Phi.size(); i++) Phi[i].occ() = occup(i); } /** @brief Returns a vector containing the orbital square norms */ @@ -992,7 +794,7 @@ DoubleVector orbital::get_squared_norms(const OrbitalVector &Phi) { int nOrbs = Phi.size(); DoubleVector norms = DoubleVector::Zero(nOrbs); for (int i = 0; i < nOrbs; i++) { - if (mrcpp::mpi::my_orb(Phi[i])) norms(i) = Phi[i].squaredNorm(); + if (mrcpp::mpi::my_func(Phi[i])) norms(i) = Phi[i].getSquareNorm(); } mrcpp::mpi::allreduce_vector(norms, mrcpp::mpi::comm_wrk); return norms; @@ -1003,7 +805,7 @@ DoubleVector orbital::get_norms(const OrbitalVector &Phi) { int nOrbs = Phi.size(); DoubleVector norms = DoubleVector::Zero(nOrbs); for (int i = 0; i < nOrbs; i++) { - if (mrcpp::mpi::my_orb(Phi[i])) norms(i) = Phi[i].norm(); + if (mrcpp::mpi::my_func(Phi[i])) norms(i) = Phi[i].norm(); } mrcpp::mpi::allreduce_vector(norms, mrcpp::mpi::comm_wrk); return norms; @@ -1014,7 +816,7 @@ ComplexVector orbital::get_integrals(const OrbitalVector &Phi) { int nOrbs = Phi.size(); ComplexVector ints = DoubleVector::Zero(nOrbs); for (int i = 0; i < nOrbs; i++) { - if (mrcpp::mpi::my_orb(Phi[i])) ints(i) = Phi[i].integrate(); + if (mrcpp::mpi::my_func(Phi[i])) ints(i) = Phi[i].integrate(); } mrcpp::mpi::allreduce_vector(ints, mrcpp::mpi::comm_wrk); return ints; @@ -1081,8 +883,8 @@ void orbital::print(const OrbitalVector &Phi) { auto nodes = 0; auto memory = 0.0; for (int i = 0; i < Phi.size(); i++) { - nodes += Phi[i].getNNodes(NUMBER::Total); - memory += Phi[i].getSizeNodes(NUMBER::Total) / 1024.0; + nodes += Phi[i].getNNodes(); + memory += Phi[i].getSizeNodes() / 1024.0; std::stringstream o_txt; o_txt << std::setw(w1 - 1) << i; o_txt << std::setw(w1) << Phi[i].occ(); @@ -1147,7 +949,7 @@ int orbital::print_size_nodes(const OrbitalVector &Phi, const std::string &txt, println(0, "OrbitalVector sizes statistics " << txt << " (MB)"); IntVector sNodes = IntVector::Zero(Phi.size()); - for (int i = 0; i < Phi.size(); i++) sNodes[i] = Phi[i].getSizeNodes(NUMBER::Total); + for (int i = 0; i < Phi.size(); i++) sNodes[i] = Phi[i].getSizeNodes(); // stats for own orbitals for (int i = 0; i < Phi.size(); i++) { @@ -1207,6 +1009,10 @@ int orbital::print_size_nodes(const OrbitalVector &Phi, const std::string &txt, return vSum; } +void orbital::saveOrbital(const std::string &file, mrcpp::CompFunction<3> &orb, int text_format) { + orbital::saveOrbital(file, Orbital(orb), text_format); +} + /** @brief Write orbital to disk * * @param file: file name prefix @@ -1215,32 +1021,38 @@ int orbital::print_size_nodes(const OrbitalVector &Phi, const std::string &txt, * binary files for meta data ("phi_0.meta"), real ("phi_0_re.tree") * and imaginary ("phi_0_im.tree") parts. */ -void orbital::saveOrbital(const std::string &file, Orbital &orb) { +void orbital::saveOrbital(const std::string &file, const Orbital &orb, int text_format) { // writing meta data std::stringstream metafile; metafile << file << ".meta"; - // this flushes tree sizes - mrcpp::FunctionData &func_data = orb.getFunctionData(); - - std::fstream f; - f.open(metafile.str(), std::ios::out | std::ios::binary); - if (not f.is_open()) MSG_ERROR("Unable to open file"); - f.write((char *)&func_data, sizeof(mrcpp::FunctionData)); - f.close(); + if (not text_format) { + std::fstream f; + f.open(metafile.str(), std::ios::out | std::ios::binary); + if (not f.is_open()) MSG_ERROR("Unable to open file"); + mrcpp::CompFunctionData<3> orbdata = orb.getFuncData(); + f.write((char *)&orb.func_ptr->data, sizeof(mrcpp::CompFunctionData<3>)); + f.close(); + } - // writing real part - if (orb.hasReal()) { + // writing real tree + if (orb.isreal()) { std::stringstream fname; - fname << file << "_re"; - orb.real().saveTree(fname.str()); + fname << file << "_real"; + if (text_format) + orb.CompD[0]->saveTreeTXT(fname.str()); + else + orb.CompD[0]->saveTree(fname.str()); } - // writing imaginary part - if (orb.hasImag()) { + // writing complex tree + if (orb.iscomplex()) { std::stringstream fname; - fname << file << "_im"; - orb.imag().saveTree(fname.str()); + fname << file << "_complex"; + if (text_format) + orb.CompC[0]->saveTreeTXT(fname.str()); + else + orb.CompC[0]->saveTree(fname.str()); } } @@ -1256,47 +1068,69 @@ void orbital::loadOrbital(const std::string &file, Orbital &orb) { if (orb.hasReal()) MSG_ERROR("Orbital not empty"); if (orb.hasImag()) MSG_ERROR("Orbital not empty"); + // first test if the file is in text format or MRChem binary format + std::ifstream testfile; + std::stringstream fname_re; + fname_re << file << "_real"; + testfile.open(fname_re.str()); + if (testfile) { + // since the MRChem file names end by .tree, we assume that this one is in text format + orb.defreal(); + orb.alloc(1); + orb.CompD[0]->loadTreeTXT(fname_re.str()); + return; + } + std::stringstream fname_co; + fname_co << file << "_complex"; + testfile.open(fname_co.str()); + if (testfile) { + // since the MRChem file names end by .tree, we assume that this one is in text format + orb.defcomplex(); + orb.alloc(1); + orb.CompC[0]->loadTreeTXT(fname_co.str()); + return; + } + + // the file is not in TXT format if this point is reached + // reading meta data std::stringstream fmeta; fmeta << file << ".meta"; - // this flushes tree sizes - mrcpp::FunctionData &func_data = orb.getFunctionData(); - std::fstream f; f.open(fmeta.str(), std::ios::in | std::ios::binary); - if (f.is_open()) f.read((char *)&func_data, sizeof(mrcpp::FunctionData)); + if (f.is_open()) f.read((char *)&orb.func_ptr->data, sizeof(mrcpp::CompFunctionData<3>)); f.close(); - std::array corner{func_data.corner[0], func_data.corner[1], func_data.corner[2]}; - std::array boxes{func_data.boxes[0], func_data.boxes[1], func_data.boxes[2]}; - mrcpp::BoundingBox<3> world(func_data.scale, corner, boxes); + std::array corner{orb.data().corner[0], orb.data().corner[1], orb.data().corner[2]}; + std::array boxes{orb.data().boxes[0], orb.data().boxes[1], orb.data().boxes[2]}; + mrcpp::BoundingBox<3> world(orb.data().scale, corner, boxes); mrcpp::MultiResolutionAnalysis<3> *mra = nullptr; - if (func_data.type == mrcpp::Interpol) { - mrcpp::InterpolatingBasis basis(func_data.order); - mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, func_data.depth); - } else if (func_data.type == mrcpp::Legendre) { - mrcpp::LegendreBasis basis(func_data.order); - mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, func_data.depth); + if (orb.data().type == mrcpp::Interpol) { + mrcpp::InterpolatingBasis basis(orb.data().order); + mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, orb.data().depth); + } else if (orb.data().type == mrcpp::Legendre) { + mrcpp::LegendreBasis basis(orb.data().order); + mra = new mrcpp::MultiResolutionAnalysis<3>(world, basis, orb.data().depth); } else { MSG_ABORT("Invalid basis type!"); } - // reading real part - if (func_data.real_size > 0) { + // reading real orbital + if (orb.isreal()) { std::stringstream fname; - fname << file << "_re"; - orb.alloc(NUMBER::Real, mra); - orb.real().loadTree(fname.str()); + fname << file << "_real"; + orb.alloc(1); + orb.CompD[0]->loadTree(fname.str()); } - // reading imaginary part - if (func_data.imag_size > 0) { + // reading complex orbital + if (orb.iscomplex()) { std::stringstream fname; - fname << file << "_im"; - orb.alloc(NUMBER::Imag, mra); - orb.imag().loadTree(fname.str()); + fname << file << "_complex"; + orb.alloc(1); + orb.CompC[0]->loadTree(fname.str()); } delete mra; } diff --git a/src/qmfunctions/orbital_utils.h b/src/qmfunctions/orbital_utils.h index 9e1547a7e..51426c5ec 100644 --- a/src/qmfunctions/orbital_utils.h +++ b/src/qmfunctions/orbital_utils.h @@ -36,13 +36,9 @@ bool compare(const Orbital &phi_a, const Orbital &phi_b); int compare_spin(const Orbital &phi_a, const Orbital &phi_b); int compare_occupation(const Orbital &phi_a, const Orbital &phi_b); -ComplexDouble dot(Orbital bra, Orbital ket); -ComplexVector dot(OrbitalVector &Bra, OrbitalVector &Ket); -ComplexDouble node_norm_dot(Orbital bra, Orbital ket, bool exact); - void normalize(Orbital phi); OrbitalChunk get_my_chunk(OrbitalVector &Phi); -void orthogonalize(double prec, Orbital &phi, Orbital psi); +void orthogonalize(double prec, Orbital &&phi, Orbital psi); OrbitalVector add(ComplexDouble a, OrbitalVector &Phi_a, ComplexDouble b, OrbitalVector &Phi_b, double prec = -1.0); OrbitalVector rotate(OrbitalVector &Phi, const ComplexMatrix &U, double prec = -1.0); @@ -53,7 +49,7 @@ OrbitalVector param_copy(const OrbitalVector &Phi); OrbitalVector adjoin(OrbitalVector &Phi_a, OrbitalVector &Phi_b); OrbitalVector disjoin(OrbitalVector &Phi, int spin); -void save_orbitals(OrbitalVector &Phi, const std::string &file, int spin = -1); +void save_orbitals(OrbitalVector &Phi, const std::string &file, int spin = -1, int text_format = 0); OrbitalVector load_orbitals(const std::string &file, int n_orbs = -1); void save_nodes(OrbitalVector Phi, mrcpp::FunctionTree<3> &refTree, mrcpp::BankAccount &nodes); @@ -65,7 +61,6 @@ void orthogonalize(double prec, OrbitalVector &Phi, OrbitalVector &Psi); ComplexMatrix calc_lowdin_matrix(OrbitalVector &Phi); ComplexMatrix calc_overlap_matrix(OrbitalVector &BraKet); ComplexMatrix calc_overlap_matrix(OrbitalVector &Bra, OrbitalVector &Ket); -DoubleMatrix calc_norm_overlap_matrix(OrbitalVector &BraKet); ComplexMatrix localize(double prec, OrbitalVector &Phi, ComplexMatrix &F); ComplexMatrix diagonalize(double prec, OrbitalVector &Phi, ComplexMatrix &F); @@ -86,10 +81,10 @@ int get_size_nodes(const OrbitalVector &Phi, bool avg = false); bool orbital_vector_is_sane(const OrbitalVector &Phi); void set_spins(OrbitalVector &Phi, const IntVector &spins); -void set_occupations(OrbitalVector &Phi, const IntVector &occ); +void set_occupations(OrbitalVector &Phi, const DoubleVector &occ); IntVector get_spins(const OrbitalVector &Phi); -IntVector get_occupations(const OrbitalVector &Phi); +DoubleVector get_occupations(const OrbitalVector &Phi); DoubleVector get_norms(const OrbitalVector &Phi); DoubleVector get_squared_norms(const OrbitalVector &Phi); DoubleVector calc_eigenvalues(const OrbitalVector &Phi, const ComplexMatrix &F_mat); @@ -97,9 +92,9 @@ ComplexVector get_integrals(const OrbitalVector &Phi); void print(const OrbitalVector &Phi); int print_size_nodes(const OrbitalVector &Phi, const std::string &txt = "", bool all = true, int plevel = 0); -void saveOrbital(const std::string &file, Orbital& orb); -void loadOrbital(const std::string &file, Orbital& orb); - //char printSpin(const Orbital& orb); +void saveOrbital(const std::string &file, const Orbital &orb, int text_format = 0); +void saveOrbital(const std::string &file, mrcpp::CompFunction<3> &orb, int text_format = 0); +void loadOrbital(const std::string &file, Orbital &orb); } // namespace orbital } // namespace mrchem diff --git a/src/qmfunctions/qmfunction_fwd.h b/src/qmfunctions/qmfunction_fwd.h index a1d0d1aca..39c31f1bd 100644 --- a/src/qmfunctions/qmfunction_fwd.h +++ b/src/qmfunctions/qmfunction_fwd.h @@ -30,11 +30,11 @@ /** Notes on vectors: * The OrbitalVector (std::vector) is conceptually different from the - * mrcpp::ComplexFunctionVector (std::vector). The former should be a collection + * mrcpp::CompFunction<3>Vector (std::vector>). The former should be a collection * of orbitals defining a proper Slater determinant, while the latter is any * arbitrary collection of functions (could also be orbitals) used e.g. when * adding several orbitals into one. The difference is important when MPI is - * considered, as OrbitalVectors are distributed while mrcpp::ComplexFunctionVectors are + * considered, as OrbitalVectors are distributed while mrcpp::CompFunction<3>Vectors are * not. This is reflected in the functionality that is available for the * different vectors, where OrbitalVectors should always be treated as a whole, * e.g. in an orbital rotation Psi = orbital::rotate(U, Phi), where U is a @@ -46,14 +46,14 @@ namespace mrchem { -class ComplexFunction; +class CompFunction; // class Orbital; -using Orbital = mrcpp::ComplexFunction; +class Orbital; using OrbitalChunk = std::vector>; -using OrbitalVector = mrcpp::MPI_FuncVector; -// class OrbitalVector; +// using OrbitalVector = mrcpp::CompFunctionVector<3>; +class OrbitalVector; class Density; diff --git a/src/qmfunctions/qmfunction_utils.cpp b/src/qmfunctions/qmfunction_utils.cpp deleted file mode 100644 index 6112106ad..000000000 --- a/src/qmfunctions/qmfunction_utils.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#include "MRCPP/Gaussians" -#include "MRCPP/Printer" -#include "MRCPP/Timer" - -#include "parallel.h" - -#include "mrcpp::ComplexFunction.h" -#include "qmfunction_utils.h" - -using mrcpp::FunctionTree; -using mrcpp::FunctionTreeVector; -using mrcpp::Printer; -using mrcpp::Timer; - -namespace mrchem { -extern mrcpp::MultiResolutionAnalysis<3> *MRA; // Global MRA - -/** @brief Compute = int bra^\dag(r) * ket(r) dr. - * - * Notice that the = int |bra^\dag(r)| * |ket(r)| dr. - * - */ -ComplexDouble mrcpp::cplxfunc::node_norm_dot(mrcpp::ComplexFunction bra, mrcpp::ComplexFunction ket, bool exact) { - double rr(0.0), ri(0.0), ir(0.0), ii(0.0); - if (bra.hasReal() and ket.hasReal()) rr = mrcpp::node_norm_dot(bra.real(), ket.real(), exact); - if (bra.hasReal() and ket.hasImag()) ri = mrcpp::node_norm_dot(bra.real(), ket.imag(), exact); - if (bra.hasImag() and ket.hasReal()) ir = mrcpp::node_norm_dot(bra.imag(), ket.real(), exact); - if (bra.hasImag() and ket.hasImag()) ii = mrcpp::node_norm_dot(bra.imag(), ket.imag(), exact); - - double bra_conj = (bra.conjugate()) ? -1.0 : 1.0; - double ket_conj = (ket.conjugate()) ? -1.0 : 1.0; - - double real_part = rr + bra_conj * ket_conj * ii; - double imag_part = ket_conj * ri - bra_conj * ir; - return ComplexDouble(real_part, imag_part); -} - -/** @brief Deep copy - * - * Returns a new function which is a full blueprint copy of the input function. - * This is achieved by building a new grid for the real and imaginary parts and - * copying. - */ -void mrcpp::cplxfunc::deep_copy(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp) { - bool need_to_copy = not(out.isShared()) or mrcpp::mpi::share_master(); - if (inp.hasReal()) { - if (not out.hasReal()) out.alloc(NUMBER::Real); - if (need_to_copy) { - mrcpp::copy_grid(out.real(), inp.real()); - mrcpp::copy_func(out.real(), inp.real()); - } - } - if (inp.hasImag()) { - if (not out.hasImag()) out.alloc(NUMBER::Imag); - if (need_to_copy) { - mrcpp::copy_grid(out.imag(), inp.imag()); - mrcpp::copy_func(out.imag(), inp.imag()); - if (out.conjugate()) out.imag().rescale(-1.0); - } - } - mrcpp::mpi::share_function(out, 0, 1324, mrcpp::mpi::comm_share); -} - -void mrcpp::cplxfunc::project(mrcpp::ComplexFunction &out, std::function &r)> f, int type, double prec) { - bool need_to_project = not(out.isShared()) or mrcpp::mpi::share_master(); - if (type == NUMBER::Real or type == NUMBER::Total) { - if (not out.hasReal()) out.alloc(NUMBER::Real); - if (need_to_project) mrcpp::project<3>(prec, out.real(), f); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (not out.hasImag()) out.alloc(NUMBER::Imag); - if (need_to_project) mrcpp::project<3>(prec, out.imag(), f); - } - mrcpp::mpi::share_function(out, 0, 123123, mrcpp::mpi::comm_share); -} - -void mrcpp::cplxfunc::project(mrcpp::ComplexFunction &out, mrcpp::GaussExp<3> &f, int type, double prec) { - bool need_to_project = not(out.isShared()) or mrcpp::mpi::share_master(); - if (type == NUMBER::Real or type == NUMBER::Total) { - if (not out.hasReal()) out.alloc(NUMBER::Real); - if (need_to_project) { - for (int i = 0; i < f.size(); i++) mrcpp::build_grid(out.real(), *f[i]); - } - if (need_to_project) mrcpp::project<3>(prec, out.real(), f); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (not out.hasImag()) out.alloc(NUMBER::Imag); - if (need_to_project) { - for (int i = 0; i < f.size(); i++) mrcpp::build_grid(out.imag(), *f[i]); - } - if (need_to_project) mrcpp::project<3>(prec, out.imag(), f); - } - mrcpp::mpi::share_function(out, 0, 132231, mrcpp::mpi::comm_share); -} - -void mrcpp::cplxfunc::project(mrcpp::ComplexFunction &out, mrcpp::RepresentableFunction<3> &f, int type, double prec) { - bool need_to_project = not(out.isShared()) or mrcpp::mpi::share_master(); - if (type == NUMBER::Real or type == NUMBER::Total) { - if (not out.hasReal()) out.alloc(NUMBER::Real); - if (need_to_project) mrcpp::build_grid(out.real(), f); - if (need_to_project) mrcpp::project<3>(prec, out.real(), f); - } - if (type == NUMBER::Imag or type == NUMBER::Total) { - if (not out.hasImag()) out.alloc(NUMBER::Imag); - if (need_to_project) mrcpp::build_grid(out.imag(), f); - if (need_to_project) mrcpp::project<3>(prec, out.imag(), f); - } - mrcpp::mpi::share_function(out, 0, 132231, mrcpp::mpi::comm_share); -} - -/** @brief out = a*inp_a + b*inp_b - * - * Recast into linear_combination. - * - */ -void mrcpp::cplxfunc::add(mrcpp::ComplexFunction &out, ComplexDouble a, mrcpp::ComplexFunction inp_a, ComplexDouble b, mrcpp::ComplexFunction inp_b, double prec) { - ComplexVector coefs(2); - coefs(0) = a; - coefs(1) = b; - - mrcpp::ComplexFunctionVector funcs; - funcs.push_back(inp_a); - funcs.push_back(inp_b); - - mrcpp::cplxfunc::linear_combination(out, coefs, funcs, prec); -} - -/** @brief out = inp_a * inp_b - * - */ -void mrcpp::cplxfunc::multiply(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec, bool useMaxNorms) { - multiply_real(out, inp_a, inp_b, prec, absPrec, useMaxNorms); - multiply_imag(out, inp_a, inp_b, prec, absPrec, useMaxNorms); -} - -/** @brief out = c_0*inp_0 + c_1*inp_1 + ... + c_N*inp_N - * - */ -void mrcpp::cplxfunc::linear_combination(mrcpp::ComplexFunction &out, const ComplexVector &c, mrcpp::ComplexFunctionVector &inp, double prec) { - FunctionTreeVector<3> rvec; - FunctionTreeVector<3> ivec; - - double thrs = mrcpp::MachineZero; - for (int i = 0; i < inp.size(); i++) { - double sign = (inp[i].conjugate()) ? -1.0 : 1.0; - - bool cHasReal = (std::abs(c[i].real()) > thrs); - bool cHasImag = (std::abs(c[i].imag()) > thrs); - - if (cHasReal and inp[i].hasReal()) rvec.push_back(std::make_tuple(c[i].real(), &inp[i].real())); - if (cHasImag and inp[i].hasImag()) rvec.push_back(std::make_tuple(-sign * c[i].imag(), &inp[i].imag())); - - if (cHasImag and inp[i].hasReal()) ivec.push_back(std::make_tuple(c[i].imag(), &inp[i].real())); - if (cHasReal and inp[i].hasImag()) ivec.push_back(std::make_tuple(sign * c[i].real(), &inp[i].imag())); - } - - if (rvec.size() > 0 and not out.hasReal()) out.alloc(NUMBER::Real); - if (ivec.size() > 0 and not out.hasImag()) out.alloc(NUMBER::Imag); - - bool need_to_add = not(out.isShared()) or mrcpp::mpi::share_master(); - if (need_to_add) { - if (rvec.size() > 0) { - if (prec < 0.0) { - mrcpp::build_grid(out.real(), rvec); - mrcpp::add(prec, out.real(), rvec, 0); - } else { - mrcpp::add(prec, out.real(), rvec); - } - } else if (out.hasReal()) { - out.real().setZero(); - } - if (ivec.size() > 0) { - if (prec < 0.0) { - mrcpp::build_grid(out.imag(), ivec); - mrcpp::add(prec, out.imag(), ivec, 0); - } else { - mrcpp::add(prec, out.imag(), ivec); - } - } else if (out.hasImag()) { - out.imag().setZero(); - } - } - mrcpp::mpi::share_function(out, 0, 9911, mrcpp::mpi::comm_share); -} - -/** @brief out = Re(inp_a * inp_b) - * - */ -void mrcpp::cplxfunc::multiply_real(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec, bool useMaxNorms) { - double conj_a = (inp_a.conjugate()) ? -1.0 : 1.0; - double conj_b = (inp_b.conjugate()) ? -1.0 : 1.0; - - bool need_to_multiply = not(out.isShared()) or mrcpp::mpi::share_master(); - - FunctionTreeVector<3> vec; - if (inp_a.hasReal() and inp_b.hasReal()) { - auto *tree = new FunctionTree<3>(*MRA); - if (need_to_multiply) { - double coef = 1.0; - if (prec < 0.0) { - // Union grid - mrcpp::build_grid(*tree, inp_a.real()); - mrcpp::build_grid(*tree, inp_b.real()); - mrcpp::multiply(prec, *tree, coef, inp_a.real(), inp_b.real(), 0); - } else { - // Adaptive grid - mrcpp::multiply(prec, *tree, coef, inp_a.real(), inp_b.real(), -1, absPrec, useMaxNorms); - } - } - vec.push_back(std::make_tuple(1.0, tree)); - } - if (inp_a.hasImag() and inp_b.hasImag()) { - auto *tree = new FunctionTree<3>(*MRA); - if (need_to_multiply) { - double coef = -1.0 * conj_a * conj_b; - if (prec < 0.0) { - // Union grid - mrcpp::build_grid(*tree, inp_a.imag()); - mrcpp::build_grid(*tree, inp_b.imag()); - mrcpp::multiply(prec, *tree, coef, inp_a.imag(), inp_b.imag(), 0); - } else { - // Adaptive grid - mrcpp::multiply(prec, *tree, coef, inp_a.imag(), inp_b.imag(), -1, absPrec, useMaxNorms); - } - } - vec.push_back(std::make_tuple(1.0, tree)); - } - - if (vec.size() > 0) { - if (out.hasReal()) { - if (need_to_multiply) out.real().clear(); - } else { - // All sharing procs must allocate - out.alloc(NUMBER::Real); - } - } - - if (need_to_multiply) { - if (vec.size() == 1) { - mrcpp::FunctionTree<3> &func_0 = mrcpp::get_func(vec, 0); - mrcpp::copy_grid(out.real(), func_0); - mrcpp::copy_func(out.real(), func_0); - mrcpp::clear(vec, true); - } else if (vec.size() == 2) { - mrcpp::build_grid(out.real(), vec); - mrcpp::add(prec, out.real(), vec, 0); - mrcpp::clear(vec, true); - } else if (out.hasReal()) { - out.real().setZero(); - } - } - mrcpp::mpi::share_function(out, 0, 9191, mrcpp::mpi::comm_share); -} - -/** @brief out = Im(inp_a * inp_b) - * - */ -void mrcpp::cplxfunc::multiply_imag(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec, bool useMaxNorms) { - double conj_a = (inp_a.conjugate()) ? -1.0 : 1.0; - double conj_b = (inp_b.conjugate()) ? -1.0 : 1.0; - - bool need_to_multiply = not(out.isShared()) or mrcpp::mpi::share_master(); - - FunctionTreeVector<3> vec; - if (inp_a.hasReal() and inp_b.hasImag()) { - auto *tree = new FunctionTree<3>(*MRA); - if (need_to_multiply) { - double coef = conj_b; - if (prec < 0.0) { - // Union grid - mrcpp::build_grid(*tree, inp_a.real()); - mrcpp::build_grid(*tree, inp_b.imag()); - mrcpp::multiply(prec, *tree, coef, inp_a.real(), inp_b.imag(), 0); - } else { - // Adaptive grid - mrcpp::multiply(prec, *tree, coef, inp_a.real(), inp_b.imag(), -1, absPrec, useMaxNorms); - } - } - vec.push_back(std::make_tuple(1.0, tree)); - } - if (inp_a.hasImag() and inp_b.hasReal()) { - auto *tree = new FunctionTree<3>(*MRA); - if (need_to_multiply) { - double coef = conj_a; - if (prec < 0.0) { - // Union grid - mrcpp::build_grid(*tree, inp_a.imag()); - mrcpp::build_grid(*tree, inp_b.real()); - mrcpp::multiply(prec, *tree, coef, inp_a.imag(), inp_b.real(), 0); - } else { - // Adaptive grid - mrcpp::multiply(prec, *tree, coef, inp_a.imag(), inp_b.real(), -1, absPrec, useMaxNorms); - } - } - vec.push_back(std::make_tuple(1.0, tree)); - } - - if (vec.size() > 0) { - if (out.hasImag()) { - if (need_to_multiply) out.imag().clear(); - } else { - // All sharing procs must allocate - out.alloc(NUMBER::Imag); - } - } - - if (need_to_multiply) { - if (vec.size() == 1) { - mrcpp::FunctionTree<3> &func_0 = mrcpp::get_func(vec, 0); - mrcpp::copy_grid(out.imag(), func_0); - mrcpp::copy_func(out.imag(), func_0); - mrcpp::clear(vec, true); - } else if (vec.size() == 2) { - mrcpp::build_grid(out.imag(), vec); - mrcpp::add(prec, out.imag(), vec, 0); - mrcpp::clear(vec, true); - } else if (out.hasImag()) { - out.imag().setZero(); - } - } - mrcpp::mpi::share_function(out, 0, 9292, mrcpp::mpi::comm_share); -} - -} // namespace mrchem diff --git a/src/qmfunctions/qmfunction_utils.h b/src/qmfunctions/qmfunction_utils.h deleted file mode 100644 index 98ab8d08d..000000000 --- a/src/qmfunctions/qmfunction_utils.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * MRChem, a numerical real-space code for molecular electronic structure - * calculations within the self-consistent field (SCF) approximations of quantum - * chemistry (Hartree-Fock and Density Functional Theory). - * Copyright (C) 2023 Stig Rune Jensen, Luca Frediani, Peter Wind and contributors. - * - * This file is part of MRChem. - * - * MRChem is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MRChem is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with MRChem. If not, see . - * - * For information on the complete list of contributors to MRChem, see: - * - */ - -#pragma once - -#include "mrchem.h" -#include "qmfunction_fwd.h" - -namespace mrchem { -namespace qmfunction { - -ComplexDouble dot(mrcpp::ComplexFunction bra, mrcpp::ComplexFunction ket); -ComplexDouble node_norm_dot(mrcpp::ComplexFunction bra, mrcpp::ComplexFunction ket, bool exact); -void deep_copy(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp); -void add(mrcpp::ComplexFunction &out, ComplexDouble a, mrcpp::ComplexFunction inp_a, ComplexDouble b, mrcpp::ComplexFunction inp_b, double prec); -void project(mrcpp::ComplexFunction &out, std::function &r)> f, int type, double prec); -void project(mrcpp::ComplexFunction &out, mrcpp::RepresentableFunction<3> &f, int type, double prec); -void project(mrcpp::ComplexFunction &out, mrcpp::GaussExp<3> &f, int type, double prec); -void multiply(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec = false, bool useMaxNorms = false); -void multiply_real(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec = false, bool useMaxNorms = false); -void multiply_imag(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction inp_a, mrcpp::ComplexFunction inp_b, double prec, bool absPrec = false, bool useMaxNorms = false); -void linear_combination(mrcpp::ComplexFunction &out, const ComplexVector &c, mrcpp::ComplexFunctionVector &inp, double prec); - -} // namespace qmfunction -} // namespace mrchem diff --git a/src/qmoperators/QMDerivative.cpp b/src/qmoperators/QMDerivative.cpp index 8090518f7..77b8003b2 100644 --- a/src/qmoperators/QMDerivative.cpp +++ b/src/qmoperators/QMDerivative.cpp @@ -28,12 +28,12 @@ #include #include "QMDerivative.h" +#include "qmfunctions/Orbital.h" #include "QMIdentity.h" #include "QMPotential.h" #include "QMSpin.h" -#include "qmfunctions/Orbital.h" -#include "qmfunctions/orbital_utils.h" +//#include "qmfunctions/orbital_utils.h" #include "utils/print_utils.h" using mrcpp::DerivativeOperator; @@ -60,32 +60,25 @@ QMDerivative::QMDerivative(const QMDerivative &inp) Orbital QMDerivative::apply(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); if (this->derivative == nullptr) MSG_ERROR("No derivative operator"); - auto dir = this->apply_dir; auto &D = *this->derivative; - - Orbital out = inp.paramCopy(); - if (this->isReal()) { - if (inp.hasReal()) { - out.alloc(NUMBER::Real); - mrcpp::apply(out.real(), D, inp.real(), dir); - } - if (inp.hasImag()) { - out.alloc(NUMBER::Imag); - mrcpp::apply(out.imag(), D, inp.imag(), dir); - if (inp.conjugate()) out.imag().rescale(-1.0); - } - } else { - if (inp.hasImag()) { - out.alloc(NUMBER::Real); - mrcpp::apply(out.real(), D, inp.imag(), dir); - if (!inp.conjugate()) out.real().rescale(-1.0); - } - if (inp.hasReal()) { - out.alloc(NUMBER::Imag); - mrcpp::apply(out.imag(), D, inp.real(), dir); + Orbital out = inp.paramCopy(true); + ComplexDouble metric[4][4]; + ComplexDouble diago = 1.0; + if (isImag() and inp.iscomplex()) diago = {0.0, 1.0}; // output will be complex + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + if (i == j) + metric[i][j] = diago; + else + metric[i][j] = 0.0; } } + mrcpp::apply(out, D, inp, dir, metric); + if (isImag() and !inp.iscomplex()) { // output is real, but we keep a soft complex scalar factor + ComplexDouble i1(0.0, 1.0); + out.func_ptr->data.c1[0] *= i1; + } return out; } @@ -106,25 +99,31 @@ QMOperatorVector QMDerivative::apply(QMOperator_p &O) { auto &D = *this->derivative; auto d = this->apply_dir; auto V_out = std::make_shared(*V_inp); + // does not compile? mrcpp::apply(V_out_base, D, V_inp, d); if (this->isReal()) { - if (V_inp->hasReal()) { - V_out->alloc(NUMBER::Real); + if (V_inp->isreal()) { + V_out->alloc(1); mrcpp::apply(V_out->real(), D, V_inp->real(), d); } - if (V_inp->hasImag()) { - V_out->alloc(NUMBER::Imag); - mrcpp::apply(V_out->imag(), D, V_inp->imag(), d); - if (V_inp->conjugate()) V_out->imag().rescale(-1.0); + if (V_inp->iscomplex()) { + V_out->func_ptr->isreal = 0; + V_out->func_ptr->iscomplex = 1; + V_out->alloc(1); + mrcpp::apply(V_out->complex(), D, V_inp->complex(), d); } } else { - if (V_inp->hasImag()) { - V_out->alloc(NUMBER::Real); - mrcpp::apply(V_out->real(), D, V_inp->imag(), d); - if (!V_inp->conjugate()) V_out->real().rescale(-1.0); + if (V_inp->iscomplex()) { + V_out->func_ptr->isreal = 0; + V_out->func_ptr->iscomplex = 1; + V_out->alloc(1); + mrcpp::apply(V_out->complex(), D, V_inp->complex(), d); + if (!V_inp->conjugate()) V_out->CompC[0]->rescale({0.0, 1.0}); } - if (V_inp->hasReal()) { - V_out->alloc(NUMBER::Imag); - mrcpp::apply(V_out->imag(), D, V_inp->real(), d); + if (V_inp->isreal()) { + mrcpp::copy_grid(V_out->real(), V_inp->real()); + mrcpp::apply(V_out->real(), D, V_inp->real(), d); + ComplexDouble i1(0.0, 1.0); + V_out->func_ptr->data.c1[0] *= i1; } } out.push_back(V_out); diff --git a/src/qmoperators/QMIdentity.cpp b/src/qmoperators/QMIdentity.cpp index 6af9de69f..72f8b2140 100644 --- a/src/qmoperators/QMIdentity.cpp +++ b/src/qmoperators/QMIdentity.cpp @@ -26,8 +26,8 @@ #include #include "QMIdentity.h" - #include "qmfunctions/Orbital.h" + #include "qmfunctions/orbital_utils.h" using QMOperator_p = std::shared_ptr; @@ -37,8 +37,9 @@ namespace mrchem { /** Identity operator is a deep copy */ Orbital QMIdentity::apply(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); - Orbital out = inp.paramCopy(); - mrcpp::cplxfunc::deep_copy(out, inp); + Orbital out; + mrcpp::deep_copy(out, inp); + return out; } diff --git a/src/qmoperators/QMOperator.h b/src/qmoperators/QMOperator.h index 464da701f..661aa75ef 100644 --- a/src/qmoperators/QMOperator.h +++ b/src/qmoperators/QMOperator.h @@ -30,6 +30,7 @@ #include #include "mrchem.h" +#include "qmfunctions/Orbital.h" #include "tensor/tensor_fwd.h" /** @class QMOperator @@ -41,6 +42,10 @@ * hierarchy should NOT be used directly, as the most important functionality is * protected. A proper interface is provided through RankZeroOperator. * + * Note that operators are treated as real, with possibly a Complex scalar factor, + * this factor is applied only if the function the ooperator is applied to is complex, + * if the function is real, only the soft factor (out.func_ptr->data.c1[0]) is multiplied. + * * Notes on naming conventions of derived operator classes: * Direct decendants of QMOperator should START with "QM", like QMPotential, QMSpin, * QMMomentum. Further decendants of QMPotential should END with "Potential", like @@ -53,13 +58,11 @@ */ namespace mrchem { -using Orbital = mrcpp::ComplexFunction; - class QMOperator { public: QMOperator() = default; virtual ~QMOperator() { - if (prec() > 0.0) MSG_ERROR("Operator not properly cleared"); + if (prec() > 0.0) MSG_ERROR("QMOperator not properly cleared"); } double prec() { return this->apply_prec; } diff --git a/src/qmoperators/QMPotential.cpp b/src/qmoperators/QMPotential.cpp index ada2860ef..0372b16b4 100644 --- a/src/qmoperators/QMPotential.cpp +++ b/src/qmoperators/QMPotential.cpp @@ -27,11 +27,11 @@ #include #include "QMPotential.h" +#include "qmfunctions/Orbital.h" #include "QMDerivative.h" #include "QMIdentity.h" #include "QMSpin.h" -#include "qmfunctions/Orbital.h" #include "utils/print_utils.h" using mrcpp::FunctionTree; @@ -47,19 +47,19 @@ namespace mrchem { * * @param adap: extra refinement in output * - * Initializes the mrcpp::ComplexFunction with NULL pointers for both real and imaginary part. + * Initializes the mrcpp::CompFunction<3> with NULL pointers for both real and imaginary part. * These must be computed in setup() of derived classes. The initial output grid * in application will be a copy of the input orbital but NOT a copy of the * potential grid. The argument sets how many extra refinement levels is allowed * beyond this initial refinement. */ QMPotential::QMPotential(int adap, bool shared) - : mrcpp::ComplexFunction(0, -1, -1, shared) + : mrcpp::CompFunction<3>(0, shared) , QMOperator() , adap_build(adap) {} QMPotential::QMPotential(const QMPotential &inp) - : mrcpp::ComplexFunction(0, -1, -1, inp.isShared()) + : mrcpp::CompFunction<3>(0, inp.isShared()) , QMOperator() , adap_build(inp.adap_build) {} @@ -73,14 +73,13 @@ QMPotential::QMPotential(const QMPotential &inp) Orbital QMPotential::apply(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); - Orbital out = inp.paramCopy(); - calcRealPart(out, inp, false); - calcImagPart(out, inp, false); + Orbital out; + calc(out, inp, false); return out; } -/** @brief apply complex cojugate potential +/** @brief apply complex conjugate potential * * @param inp: orbital on which to apply * @@ -91,9 +90,7 @@ Orbital QMPotential::dagger(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); Orbital out = inp.paramCopy(); - calcRealPart(out, inp, true); - calcImagPart(out, inp, true); - + calc(out, inp, true); return out; } @@ -105,18 +102,17 @@ QMOperatorVector QMPotential::apply(QMOperator_p &O) { if (I) { // O == identity: skip it auto V_out = std::make_shared(*this); - mrcpp::cplxfunc::deep_copy(*V_out, *this); + mrcpp::deep_copy(*V_out, *this); out.push_back(V_out); } else if (V_inp) { // O == potential: merge into single potential auto V_out = std::make_shared(*this); - calcRealPart(*V_out, *V_inp, false); - calcImagPart(*V_out, *V_inp, false); + calc(*V_out, *V_inp, false); out.push_back(V_out); } else { // fallback: treat as individual operators auto V_out = std::make_shared(*this); - mrcpp::cplxfunc::deep_copy(*V_out, *this); + mrcpp::deep_copy(*V_out, *this); out.push_back(O); out.push_back(V_out); } @@ -128,71 +124,21 @@ QMOperatorVector QMPotential::apply(QMOperator_p &O) { * @param inp: input orbital * @param dagger: apply complex conjugate potential * - * Computes the real part of the output orbital. The initial output grid is a - * copy of the input orbital grid but NOT a copy of the potential grid. - */ -void QMPotential::calcRealPart(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp, bool dagger) { - int adap = this->adap_build; - double prec = this->apply_prec; - - if (out.hasReal()) MSG_ABORT("Output not empty"); - if (out.isShared()) MSG_ABORT("Cannot share this function"); - - mrcpp::ComplexFunction &V = *this; - if (V.hasReal() and inp.hasReal()) { - double coef = 1.0; - mrcpp::ComplexFunction tmp(false); - tmp.alloc(NUMBER::Real); - mrcpp::copy_grid(tmp.real(), inp.real()); - mrcpp::multiply(prec, tmp.real(), coef, V.real(), inp.real(), adap); - out.add(1.0, tmp); - } - if (V.hasImag() and inp.hasImag()) { - double coef = -1.0; - if (dagger) coef *= -1.0; - if (inp.conjugate()) coef *= -1.0; - mrcpp::ComplexFunction tmp(false); - tmp.alloc(NUMBER::Real); - mrcpp::copy_grid(tmp.real(), inp.imag()); - mrcpp::multiply(prec, tmp.real(), coef, V.imag(), inp.imag(), adap); - out.add(1.0, tmp); - } -} - -/** @brief compute imaginary part of output - * - * @param inp: input orbital - * @param dagger: apply complex conjugate potential - * - * Computes the imaginary part of the output orbital. The initial output grid is a + * Multiplies the potential with the orbital. The initial output grid is a * copy of the input orbital grid but NOT a copy of the potential grid. */ -void QMPotential::calcImagPart(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp, bool dagger) { +void QMPotential::calc(mrcpp::CompFunction<3> &out, mrcpp::CompFunction<3> &inp, bool dagger) { int adap = this->adap_build; double prec = this->apply_prec; - - if (out.hasImag()) MSG_ABORT("Output not empty"); + if (out.Ncomp() > 0) MSG_ABORT("Output not empty"); if (out.isShared()) MSG_ABORT("Cannot share this function"); + if (dagger) MSG_ERROR("Not implemented"); + if (inp.conjugate()) MSG_ERROR("Not implemented"); - mrcpp::ComplexFunction &V = *this; - if (V.hasReal() and inp.hasImag()) { - double coef = 1.0; - if (inp.conjugate()) coef *= -1.0; - mrcpp::ComplexFunction tmp(false); - tmp.alloc(NUMBER::Imag); - mrcpp::copy_grid(tmp.imag(), inp.imag()); - mrcpp::multiply(prec, tmp.imag(), coef, V.real(), inp.imag(), adap); - out.add(1.0, tmp); - } - if (V.hasImag() and inp.hasReal()) { - double coef = 1.0; - if (dagger) coef *= -1.0; - mrcpp::ComplexFunction tmp(false); - tmp.alloc(NUMBER::Imag); - mrcpp::copy_grid(tmp.imag(), inp.real()); - mrcpp::multiply(prec, tmp.imag(), coef, V.imag(), inp.real(), adap); - out.add(1.0, tmp); - } + mrcpp::CompFunction<3> &V = *this; + double coef = 1.0; + mrcpp::copy_grid(out, inp); + mrcpp::multiply(prec, out, coef, inp, V, adap); } } // namespace mrchem diff --git a/src/qmoperators/QMPotential.h b/src/qmoperators/QMPotential.h index 130f6a221..c46e6dd20 100644 --- a/src/qmoperators/QMPotential.h +++ b/src/qmoperators/QMPotential.h @@ -33,7 +33,7 @@ * * @brief Operator defining a multiplicative potential * - * Inherits the general features of a complex function from mrcpp::ComplexFunction and + * Inherits the general features from mrcpp::CompFunction<3> and * implements the multiplication of this function with an Orbital. The actual * function representing the operator needs to be implemented in the derived * classes, where the *re and *im FunctionTree pointers should be assigned in @@ -43,7 +43,7 @@ namespace mrchem { -class QMPotential : public mrcpp::ComplexFunction, public QMOperator { +class QMPotential : public mrcpp::CompFunction<3>, public QMOperator { public: explicit QMPotential(int adap, bool shared = false); QMPotential(const QMPotential &pot); @@ -55,8 +55,8 @@ class QMPotential : public mrcpp::ComplexFunction, public QMOperator { ComplexDouble evalf(const mrcpp::Coord<3> &r) const override { ComplexDouble out(0.0, 0.0), i(0.0, 1.0); - if (this->hasReal()) out += this->real().evalf(r); - if (this->hasImag()) out += i * this->imag().evalf(r); + if (this->isreal()) out += this->real().evalf(r); + if (this->iscomplex()) out += this->complex().evalf(r); return out; } @@ -64,8 +64,7 @@ class QMPotential : public mrcpp::ComplexFunction, public QMOperator { Orbital dagger(Orbital inp) override; QMOperatorVector apply(std::shared_ptr &O) override; - void calcRealPart(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp, bool dagger); - void calcImagPart(mrcpp::ComplexFunction &out, mrcpp::ComplexFunction &inp, bool dagger); + void calc(mrcpp::CompFunction<3> &out, mrcpp::CompFunction<3> &inp, bool dagger); }; } // namespace mrchem diff --git a/src/qmoperators/QMSpin.cpp b/src/qmoperators/QMSpin.cpp index dec2d8755..141f304af 100644 --- a/src/qmoperators/QMSpin.cpp +++ b/src/qmoperators/QMSpin.cpp @@ -64,8 +64,8 @@ Orbital QMSpin::apply(Orbital inp) { MSG_ABORT("Cannot apply spin operator on paired orbital"); } - Orbital out = inp.paramCopy(); - mrcpp::cplxfunc::deep_copy(out, inp); + Orbital out; + mrcpp::deep_copy(out, inp); out.rescale(coef); // Flip spin for s_x and s_y @@ -106,7 +106,7 @@ Orbital QMAlpha::apply(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); Orbital out(SPIN::Alpha, 1, inp.getRank()); - if (inp.spin() == SPIN::Alpha || inp.spin() == SPIN::Paired) mrcpp::cplxfunc::deep_copy(out, inp); + if (inp.spin() == SPIN::Alpha || inp.spin() == SPIN::Paired) mrcpp::deep_copy(out, inp); return out; } @@ -115,7 +115,7 @@ Orbital QMAlpha::dagger(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); Orbital out(SPIN::Alpha, 1, inp.getRank()); - if (inp.spin() == SPIN::Alpha || inp.spin() == SPIN::Paired) mrcpp::cplxfunc::deep_copy(out, inp); + if (inp.spin() == SPIN::Alpha || inp.spin() == SPIN::Paired) mrcpp::deep_copy(out, inp); return out; } @@ -146,7 +146,7 @@ Orbital QMBeta::apply(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); Orbital out(SPIN::Beta, 1, inp.getRank()); - if (inp.spin() == SPIN::Beta || inp.spin() == SPIN::Paired) mrcpp::cplxfunc::deep_copy(out, inp); + if (inp.spin() == SPIN::Beta || inp.spin() == SPIN::Paired) mrcpp::deep_copy(out, inp); return out; } @@ -155,7 +155,7 @@ Orbital QMBeta::dagger(Orbital inp) { if (this->apply_prec < 0.0) MSG_ERROR("Uninitialized operator"); Orbital out(SPIN::Beta, 1, inp.getRank()); - if (inp.spin() == SPIN::Beta || inp.spin() == SPIN::Paired) mrcpp::cplxfunc::deep_copy(out, inp); + if (inp.spin() == SPIN::Beta || inp.spin() == SPIN::Paired) mrcpp::deep_copy(out, inp); return out; } diff --git a/src/qmoperators/QMSpin.h b/src/qmoperators/QMSpin.h index 9bda1a051..1f7513861 100644 --- a/src/qmoperators/QMSpin.h +++ b/src/qmoperators/QMSpin.h @@ -101,7 +101,7 @@ class QMAlpha final : public QMOperator { * @brief Spin beta operator * * Operator that acts as Identity when applied on beta (or paired) orbitals, - * and as Zero when applid on alpha orbitals. + * and as Zero when applied on alpha orbitals. * * Can be defined as: * diff --git a/src/qmoperators/one_electron/AZoraPotential.cpp b/src/qmoperators/one_electron/AZoraPotential.cpp index 3b2cb92ca..125f986dc 100644 --- a/src/qmoperators/one_electron/AZoraPotential.cpp +++ b/src/qmoperators/one_electron/AZoraPotential.cpp @@ -1,15 +1,15 @@ #include "AZoraPotential.h" -#include "mrchem.h" #include "chemistry/Molecule.h" #include "chemistry/Nucleus.h" -#include -#include -#include -#include -#include "utils/PolyInterpolator.h" +#include "mrchem.h" #include "qmoperators/QMOperator.h" #include "qmoperators/QMPotential.h" +#include "utils/PolyInterpolator.h" +#include +#include +#include +#include /** * @brief Read ZORA potential from file. Check if file exists and abort if it does not. @@ -17,8 +17,8 @@ * @param rGrid Vector containing the radial grid * @param vZora Vector containing the ZORA potential * @param kappa Vector containing the kappa parameter -*/ -void readZoraPotential(const std::string path, Eigen::VectorXd &rGrid, Eigen::VectorXd &vZora, Eigen::VectorXd &kappa){ + */ +void readZoraPotential(const std::string path, Eigen::VectorXd &rGrid, Eigen::VectorXd &vZora, Eigen::VectorXd &kappa) { std::vector r, v, k; bool file_exists = std::filesystem::exists(path); if (!file_exists) { @@ -40,60 +40,58 @@ void readZoraPotential(const std::string path, Eigen::VectorXd &rGrid, Eigen::Ve rGrid = Eigen::Map(r.data(), r.size()); vZora = Eigen::Map(v.data(), v.size()); kappa = Eigen::Map(k.data(), k.size()); - // The kappa function is half of what is defined in the paper Scalar + // The kappa function is half of what is defined in the paper Scalar // Relativistic Effects with Multiwavelets: Implementation and Benchmark // it is not used in the code, only the potential is used } namespace mrchem { - /** - * Initialize the azora potential based on the molecule. - * This method would typically setup the real and imaginary function trees - * representing the potential. - */ - void AZoraPotential::initAzoraPotential() { +/** + * Initialize the azora potential based on the molecule. + * This method would typically setup the real and imaginary function trees + * representing the potential. + */ +void AZoraPotential::initAzoraPotential() { - int n = nucs.size(); - Eigen::VectorXd rGrid, vZora, kappa; - atomicPotentials.clear(); + int n = nucs.size(); + Eigen::VectorXd rGrid, vZora, kappa; + atomicPotentials.clear(); - // std::vector atomicPotentials; + // std::vector atomicPotentials; - std::string element; - std::string filename; - for (int i = 0; i < n; i++) { - element = nucs[i].getElement().getSymbol(); - filename = this->azora_dir + '/' + element + ".txt"; - readZoraPotential(filename, rGrid, vZora, kappa); - interpolation_utils::PolyInterpolator potential_interpolator(rGrid, vZora); + std::string element; + std::string filename; + for (int i = 0; i < n; i++) { + element = nucs[i].getElement().getSymbol(); + filename = this->azora_dir + '/' + element + ".txt"; + readZoraPotential(filename, rGrid, vZora, kappa); + interpolation_utils::PolyInterpolator potential_interpolator(rGrid, vZora); - atomicPotentials.push_back(potential_interpolator); - } - // project(this->prec); + atomicPotentials.push_back(potential_interpolator); } + // project(this->prec); +} - void AZoraPotential::project(double proj_prec){ - if (isProjected) free(mrchem::NUMBER::Total); - mrcpp::ComplexFunction vtot; - this->prec = proj_prec; - auto chi_analytic = [this](const mrcpp::Coord<3>& r) { - return this->evalf_analytic(r); - }; - mrcpp::cplxfunc::project(vtot, chi_analytic, mrcpp::NUMBER::Real, proj_prec); - this->add(1.0, vtot); - isProjected = true; - } - - double AZoraPotential::evalf_analytic(const mrcpp::Coord<3>& r){ - double V = 0.0; - // Loop over all atoms: - for (int i = 0; i < this->atomicPotentials.size(); i++) { - mrcpp::Coord<3> r_i = nucs[i].getCoord(); - double rr = std::sqrt((r[0] - r_i[0]) * (r[0] - r_i[0]) + (r[1] - r_i[1]) * (r[1] - r_i[1]) + (r[2] - r_i[2]) * (r[2] - r_i[2])); - V += this->atomicPotentials[i].evalfLeftNoRightConstant(rr); - } - return 1 / (1 - V / (2.0 * c * c)) - 1; +void AZoraPotential::project(double proj_prec) { + if (isProjected) free(mrchem::NUMBER::Total); + mrcpp::CompFunction<3> vtot; + this->prec = proj_prec; + std::function &)> chi_analytic = [this](const mrcpp::Coord<3> &r) { return this->evalf_analytic(r); }; + mrcpp::project(vtot, chi_analytic, proj_prec); + this->add(1.0, vtot); + isProjected = true; +} + +double AZoraPotential::evalf_analytic(const mrcpp::Coord<3> &r) { + double V = 0.0; + // Loop over all atoms: + for (int i = 0; i < this->atomicPotentials.size(); i++) { + mrcpp::Coord<3> r_i = nucs[i].getCoord(); + double rr = std::sqrt((r[0] - r_i[0]) * (r[0] - r_i[0]) + (r[1] - r_i[1]) * (r[1] - r_i[1]) + (r[2] - r_i[2]) * (r[2] - r_i[2])); + V += this->atomicPotentials[i].evalfLeftNoRightConstant(rr); } + return 1 / (1 - V / (2.0 * c * c)) - 1; +} } // namespace mrchem diff --git a/src/qmoperators/one_electron/AZoraPotential.h b/src/qmoperators/one_electron/AZoraPotential.h index bb9dc7e16..f5df13eb4 100644 --- a/src/qmoperators/one_electron/AZoraPotential.h +++ b/src/qmoperators/one_electron/AZoraPotential.h @@ -1,9 +1,8 @@ #pragma once #include "chemistry/Nucleus.h" -#include -#include "utils/PolyInterpolator.h" #include "qmoperators/QMPotential.h" - +#include "utils/PolyInterpolator.h" +#include namespace mrchem { @@ -23,8 +22,8 @@ class AZoraPotential : public QMPotential { * @param adap Adaptive parameter from QMPotential. * @param shared Determines if the base potential is shared. */ - AZoraPotential(Nuclei nucs, int adap, std::string azora_dir, bool shared = false, double c = 137.035999084) - : QMPotential(adap, shared) { + AZoraPotential(Nuclei nucs, int adap, std::string azora_dir, bool shared = false, double c = 137.035999084) + : QMPotential(adap, shared) { this->nucs = nucs; this->c = c; this->azora_dir = azora_dir; @@ -35,8 +34,8 @@ class AZoraPotential : public QMPotential { * Copy constructor. * @param other The other instance to copy from. */ - AZoraPotential(const AZoraPotential& other) - : QMPotential(other) { + AZoraPotential(const AZoraPotential &other) + : QMPotential(other) { this->nucs = other.nucs; this->prec = other.prec; this->c = other.c; @@ -47,13 +46,13 @@ class AZoraPotential : public QMPotential { /** * Destructor. */ - virtual ~AZoraPotential(){ + virtual ~AZoraPotential() { free(mrchem::NUMBER::Total); isProjected = false; } // Delete copy assignment to prevent copying - AZoraPotential& operator=(const AZoraPotential&) = delete; + AZoraPotential &operator=(const AZoraPotential &) = delete; /** * Project the potential from the analytic function stored in this object. @@ -62,14 +61,14 @@ class AZoraPotential : public QMPotential { void project(double prec); protected: - Nuclei nucs; // The nuclei of the molecule - double prec; // The precision parameter - double c; // The speed of light + Nuclei nucs; // The nuclei of the molecule + double prec; // The precision parameter + double c; // The speed of light std::string azora_dir; // The directory containing the azora potential data std::vector atomicPotentials; bool isProjected = false; - double evalf_analytic(const mrcpp::Coord<3>& r); + double evalf_analytic(const mrcpp::Coord<3> &r); /** * Initialize the azora potential based on the molecule. diff --git a/src/qmoperators/one_electron/DeltaOperator.h b/src/qmoperators/one_electron/DeltaOperator.h index cd619bf17..c5d8e1bb3 100644 --- a/src/qmoperators/one_electron/DeltaOperator.h +++ b/src/qmoperators/one_electron/DeltaOperator.h @@ -53,7 +53,7 @@ class DeltaOperator final : public RankZeroOperator { // Project analytic potential auto delta = std::make_shared(1); - mrcpp::cplxfunc::project(*delta, f, NUMBER::Real, proj_prec); + mrcpp::project<3>(*delta, f, proj_prec); // Invoke operator= to assign *this operator RankZeroOperator &h = (*this); diff --git a/src/qmoperators/one_electron/DistanceOperator.h b/src/qmoperators/one_electron/DistanceOperator.h index f0851f5d6..aaa4a0e2a 100644 --- a/src/qmoperators/one_electron/DistanceOperator.h +++ b/src/qmoperators/one_electron/DistanceOperator.h @@ -57,7 +57,7 @@ class DistanceOperator final : public RankZeroOperator { // Project analytic potential, building grid for 1/r auto r_pow = std::make_shared(1); - r_pow->alloc(NUMBER::Real); + r_pow->alloc(1); mrcpp::build_grid(r_pow->real(), nuc_func); mrcpp::project<3>(proj_prec, r_pow->real(), f); diff --git a/src/qmoperators/one_electron/HessianOperator.h b/src/qmoperators/one_electron/HessianOperator.h index 2fc049d84..f08d6f50b 100644 --- a/src/qmoperators/one_electron/HessianOperator.h +++ b/src/qmoperators/one_electron/HessianOperator.h @@ -41,4 +41,4 @@ class HessianOperator final : public RankOneOperator<6> { } }; -} \ No newline at end of file +} // namespace mrchem \ No newline at end of file diff --git a/src/qmoperators/one_electron/MomentumOperator.h b/src/qmoperators/one_electron/MomentumOperator.h index b45ae0ad4..fc63726fa 100644 --- a/src/qmoperators/one_electron/MomentumOperator.h +++ b/src/qmoperators/one_electron/MomentumOperator.h @@ -34,14 +34,15 @@ namespace mrchem { class MomentumOperator final : public RankOneOperator<3> { public: MomentumOperator(std::shared_ptr> D) - : MomentumOperator(NablaOperator(D, true)) {} + : MomentumOperator(NablaOperator(D, true)) {} // 2.610296212006e+02 + // : MomentumOperator(NablaOperator(D, false)) {} //7.500000129099e-01 MomentumOperator(NablaOperator D) { // Invoke operator= to assign *this operator RankOneOperator<3> &p = (*this); - p[0] = -1.0*D[0]; - p[1] = -1.0*D[1]; - p[2] = -1.0*D[2]; + p[0] = -1.0 * D[0]; + p[1] = -1.0 * D[1]; + p[2] = -1.0 * D[2]; p[0].name() = "p[x]"; p[1].name() = "p[y]"; p[2].name() = "p[z]"; diff --git a/src/qmoperators/one_electron/NuclearGradientOperator.h b/src/qmoperators/one_electron/NuclearGradientOperator.h index 7a89425ba..c4b8e5439 100644 --- a/src/qmoperators/one_electron/NuclearGradientOperator.h +++ b/src/qmoperators/one_electron/NuclearGradientOperator.h @@ -55,9 +55,9 @@ class NuclearGradientOperator final : public RankOneOperator<3> { auto z_rm3 = std::make_shared(1); // Project analytic potential - mrcpp::cplxfunc::project(*x_rm3, f_x, NUMBER::Real, proj_prec); - mrcpp::cplxfunc::project(*y_rm3, f_y, NUMBER::Real, proj_prec); - mrcpp::cplxfunc::project(*z_rm3, f_z, NUMBER::Real, proj_prec); + mrcpp::project<3>(*x_rm3, f_x, proj_prec); + mrcpp::project<3>(*y_rm3, f_y, proj_prec); + mrcpp::project<3>(*z_rm3, f_z, proj_prec); // Invoke operator= to assign *this operator RankOneOperator &v = (*this); diff --git a/src/qmoperators/one_electron/NuclearOperator.cpp b/src/qmoperators/one_electron/NuclearOperator.cpp index c0dd46815..d77f82cf4 100644 --- a/src/qmoperators/one_electron/NuclearOperator.cpp +++ b/src/qmoperators/one_electron/NuclearOperator.cpp @@ -30,21 +30,20 @@ #include "NuclearOperator.h" -#include -#include -#include +#include +#include +#include +#include "analyticfunctions/FiniteNucleusGaussian.h" +#include "analyticfunctions/FiniteNucleusSphere.h" #include "analyticfunctions/PointNucleusHFYGB.h" -#include "analyticfunctions/PointNucleusParabola.h" #include "analyticfunctions/PointNucleusMinimum.h" -#include "analyticfunctions/FiniteNucleusSphere.h" -#include "analyticfunctions/FiniteNucleusGaussian.h" +#include "analyticfunctions/PointNucleusParabola.h" #include "chemistry/chemistry_utils.h" #include "qmfunctions/Density.h" #include "qmoperators/QMPotential.h" -#include "utils/print_utils.h" #include "utils/math_utils.h" - +#include "utils/print_utils.h" using mrcpp::Printer; using mrcpp::Timer; @@ -99,8 +98,8 @@ NuclearOperator::NuclearOperator(const Nuclei &nucs, double proj_prec, double sm loc_prec /= pow(vol, 1.0 / 6.0); // norm of 1/r over the box ~ root_6(Volume) // Project local potential - mrcpp::ComplexFunction V_loc(false); - mrcpp::cplxfunc::project(V_loc, *f_loc, NUMBER::Real, loc_prec); + mrcpp::CompFunction<3> V_loc(false); + mrcpp::project(V_loc, *f_loc, loc_prec); t_loc.stop(); mrcpp::print::separator(1, '-'); print_utils::qmfunction(1, "Local potential", V_loc, t_loc); @@ -162,7 +161,7 @@ void NuclearOperator::setupLocalPotential(NuclearFunction &f_loc, const Nuclei & } } -void NuclearOperator::allreducePotential(double prec, mrcpp::ComplexFunction &V_tot, mrcpp::ComplexFunction &V_loc) const { +void NuclearOperator::allreducePotential(double prec, mrcpp::CompFunction<3> &V_tot, mrcpp::CompFunction<3> &V_loc) const { // Add up local contributions into the grand master mrcpp::mpi::reduce_function(prec, V_loc, mrcpp::mpi::comm_wrk); if (mrcpp::mpi::grand_master()) { @@ -170,7 +169,7 @@ void NuclearOperator::allreducePotential(double prec, mrcpp::ComplexFunction &V_ if (mrcpp::mpi::numerically_exact) V_loc.crop(prec); } - if (not V_tot.hasReal()) V_tot.alloc(NUMBER::Real); + if (not V_tot.hasReal()) V_tot.alloc(1); if (V_tot.isShared()) { int tag = 3141; // MPI grand master distributes to shared masters diff --git a/src/qmoperators/one_electron/NuclearOperator.h b/src/qmoperators/one_electron/NuclearOperator.h index b16afd461..6e56d8c64 100644 --- a/src/qmoperators/one_electron/NuclearOperator.h +++ b/src/qmoperators/one_electron/NuclearOperator.h @@ -36,10 +36,10 @@ class NuclearOperator final : public RankZeroOperator { NuclearOperator(const Nuclei &nucs, double proj_prec, double smooth_prec = -1.0, bool mpi_share = false, const std::string &model = "point_like"); private: - mrcpp::ComplexFunction V_func; // The MW Function representation of the potential + mrcpp::CompFunction<3> V_func; // The MW Function representation of the potential void setupLocalPotential(NuclearFunction &f_loc, const Nuclei &nucs, double smooth_prec) const; - void allreducePotential(double prec, mrcpp::ComplexFunction &V_tot, mrcpp::ComplexFunction &V_loc) const; + void allreducePotential(double prec, mrcpp::CompFunction<3> &V_tot, mrcpp::CompFunction<3> &V_loc) const; }; } // namespace mrchem diff --git a/src/qmoperators/one_electron/PositionOperator.h b/src/qmoperators/one_electron/PositionOperator.h index ba301472a..b2ef63822 100644 --- a/src/qmoperators/one_electron/PositionOperator.h +++ b/src/qmoperators/one_electron/PositionOperator.h @@ -49,9 +49,10 @@ class PositionOperator : public RankOneOperator<3> { auto r_z = std::make_shared(1); // Project analytic potential (exact on root scale, thus no prec) - mrcpp::cplxfunc::project(*r_x, f_x, NUMBER::Real, -1.0); - mrcpp::cplxfunc::project(*r_y, f_y, NUMBER::Real, -1.0); - mrcpp::cplxfunc::project(*r_z, f_z, NUMBER::Real, -1.0); + // the cast is required, because otherwise the compiler is not smart enough to understand that it returns a double + mrcpp::project(*r_x, static_cast &)>>(f_x), -1.0); + mrcpp::project(*r_y, static_cast &)>>(f_y), -1.0); + mrcpp::project(*r_z, static_cast &)>>(f_z), -1.0); // Invoke operator= to assign *this operator RankOneOperator &r = (*this); diff --git a/src/qmoperators/one_electron/ZoraOperator.cpp b/src/qmoperators/one_electron/ZoraOperator.cpp index 1a28d8ea0..9c142548c 100644 --- a/src/qmoperators/one_electron/ZoraOperator.cpp +++ b/src/qmoperators/one_electron/ZoraOperator.cpp @@ -42,8 +42,7 @@ ZoraOperator::ZoraOperator(QMPotential &vz, double c, double proj_prec, bool inv double two_cc = 2.0 * c * c; std::shared_ptr k = std::make_shared(1); - mrcpp::cplxfunc::deep_copy(*k, vz); - + mrcpp::deep_copy(*k, vz); if (k->hasImag()) MSG_ERROR("Inverse of complex function in zora potential"); if (k->hasReal()) { mrcpp::refine_grid(k->real(), 1); @@ -70,7 +69,7 @@ ZoraOperator::ZoraOperator(QMPotential &vz, double c, double proj_prec, bool inv * @brief Constructor for ZoraOperator used to construct an atomic zora operator * @param relativisticDampening shared pointer to QMPotential that contains the precompouted kappa function * @param name name of the operator should be either "kappa" or "kappa_inv" -*/ + */ ZoraOperator::ZoraOperator(std::shared_ptr relativisticDampening, std::string name) { RankZeroOperator &kappa = (*this); kappa = relativisticDampening; diff --git a/src/qmoperators/one_electron/ZoraOperator.h b/src/qmoperators/one_electron/ZoraOperator.h index 239ad87ff..48d5f6ad7 100644 --- a/src/qmoperators/one_electron/ZoraOperator.h +++ b/src/qmoperators/one_electron/ZoraOperator.h @@ -51,7 +51,6 @@ class ZoraOperator final : public RankZeroOperator { ZoraOperator(QMPotential &vz, double c, double proj_prec, bool inverse = false); ZoraOperator(std::shared_ptr relativisticDampening, std::string name); - }; } // namespace mrchem diff --git a/src/qmoperators/qmoperator_utils.cpp b/src/qmoperators/qmoperator_utils.cpp index fb149bb77..e5fdd668d 100644 --- a/src/qmoperators/qmoperator_utils.cpp +++ b/src/qmoperators/qmoperator_utils.cpp @@ -129,7 +129,7 @@ ComplexMatrix qmoperator::calc_kinetic_matrix_component(int d, MomentumOperator OrbitalVector dKet = p[d](ket); nNodes += orbital::get_n_nodes(dKet); sNodes += orbital::get_size_nodes(dKet); - T = orbital::calc_overlap_matrix(dKet); + T = mrcpp::calc_overlap_matrix(dKet); } else { OrbitalVector dBra = p[d](bra); OrbitalVector dKet = p[d](ket); @@ -137,7 +137,7 @@ ComplexMatrix qmoperator::calc_kinetic_matrix_component(int d, MomentumOperator nNodes += orbital::get_n_nodes(dKet); sNodes += orbital::get_size_nodes(dBra); sNodes += orbital::get_size_nodes(dKet); - T = orbital::calc_overlap_matrix(dBra, dKet); + T = mrcpp::calc_overlap_matrix(dBra, dKet); } if (d == 0) mrcpp::print::tree(2, "", nNodes, sNodes, timer.elapsed()); if (d == 1) mrcpp::print::tree(2, "", nNodes, sNodes, timer.elapsed()); @@ -156,7 +156,7 @@ ComplexMatrix qmoperator::calc_kinetic_matrix_component_symmetrized(int d, Momen OrbitalVector dKet = (V * p[d])(ket); nNodes += orbital::get_n_nodes(dKet); sNodes += orbital::get_size_nodes(dKet); - T = orbital::calc_overlap_matrix(dKet, dKet); + T = mrcpp::calc_overlap_matrix(dKet, dKet); } else { OrbitalVector dBra = (V * p[d])(bra); OrbitalVector dKet = (V * p[d])(ket); @@ -164,7 +164,7 @@ ComplexMatrix qmoperator::calc_kinetic_matrix_component_symmetrized(int d, Momen nNodes += orbital::get_n_nodes(dKet); sNodes += orbital::get_size_nodes(dBra); sNodes += orbital::get_size_nodes(dKet); - T = orbital::calc_overlap_matrix(dBra, dKet); + T = mrcpp::calc_overlap_matrix(dBra, dKet); } if (d == 0) mrcpp::print::tree(2, "", nNodes, sNodes, timer.elapsed()); if (d == 1) mrcpp::print::tree(2, "", nNodes, sNodes, timer.elapsed()); diff --git a/src/qmoperators/two_electron/CoulombPotential.cpp b/src/qmoperators/two_electron/CoulombPotential.cpp index 26309f073..7bc73cac1 100644 --- a/src/qmoperators/two_electron/CoulombPotential.cpp +++ b/src/qmoperators/two_electron/CoulombPotential.cpp @@ -87,7 +87,7 @@ void CoulombPotential::setup(double prec) { // Keep each local contribution a bit // more precise than strictly necessary setupLocalDensity(0.1 * prec); - mrcpp::ComplexFunction V = setupLocalPotential(0.1 * prec); + mrcpp::CompFunction<3> V = setupLocalPotential(0.1 * prec); allreducePotential(0.1 * prec, V); } if (plevel == 2) print_utils::qmfunction(2, "Coulomb operator", *this, timer); @@ -100,9 +100,9 @@ void CoulombPotential::setup(double prec) { * The operator can now be reused after another setup. */ void CoulombPotential::clear() { - mrcpp::ComplexFunction::free(NUMBER::Total); // delete FunctionTree pointers - this->density.free(NUMBER::Total); // delete FunctionTree pointers - clearApplyPrec(); // apply_prec = -1 + mrcpp::CompFunction<3>::free(); // delete FunctionTree pointers + this->density.free(); // delete FunctionTree pointers + clearApplyPrec(); // apply_prec = -1 } /** @brief compute Coulomb potential @@ -116,18 +116,17 @@ void CoulombPotential::setupGlobalPotential(double prec) { if (this->poisson == nullptr) MSG_ERROR("Poisson operator not initialized"); PoissonOperator &P = *this->poisson; - mrcpp::ComplexFunction &V = *this; - mrcpp::ComplexFunction &rho = this->density; + mrcpp::CompFunction<3> &V = *this; + mrcpp::CompFunction<3> &rho = this->density; - if (V.hasReal()) MSG_ERROR("Potential not properly cleared"); - if (V.hasImag()) MSG_ERROR("Potential not properly cleared"); + if (V.getNNodes() > 8) MSG_ERROR("Potential not properly cleared"); // Adjust precision by system size double abs_prec = prec / rho.norm(); bool need_to_apply = not(V.isShared()) or mrcpp::mpi::share_master(); Timer timer; - V.alloc(NUMBER::Real); + V.alloc(1); if (need_to_apply) mrcpp::apply(abs_prec, V.real(), P, rho.real()); mrcpp::mpi::share_function(V, 0, 22445, mrcpp::mpi::comm_share); print_utils::qmfunction(3, "Compute global potential", V, timer); @@ -140,29 +139,29 @@ void CoulombPotential::setupGlobalPotential(double prec) { * This will compute the Coulomb potential by application o the Poisson operator * to the precomputed electron density. */ -mrcpp::ComplexFunction CoulombPotential::setupLocalPotential(double prec) { +mrcpp::CompFunction<3> CoulombPotential::setupLocalPotential(double prec) { if (this->poisson == nullptr) MSG_ERROR("Poisson operator not initialized"); PoissonOperator &P = *this->poisson; OrbitalVector &Phi = *this->orbitals; - mrcpp::ComplexFunction &rho = this->density; + mrcpp::CompFunction<3> &rho = this->density; // Adjust precision by system size double abs_prec = prec / orbital::get_electron_number(Phi); Timer timer; - mrcpp::ComplexFunction V(false); - V.alloc(NUMBER::Real); + mrcpp::CompFunction<3> V(false); + V.alloc(1); mrcpp::apply(abs_prec, V.real(), P, rho.real()); print_utils::qmfunction(3, "Compute local potential", V, timer); return V; } -void CoulombPotential::allreducePotential(double prec, mrcpp::ComplexFunction &V_loc) { +void CoulombPotential::allreducePotential(double prec, mrcpp::CompFunction<3> &V_loc) { Timer t_com; - mrcpp::ComplexFunction &V_tot = *this; + mrcpp::CompFunction<3> &V_tot = *this; OrbitalVector &Phi = *this->orbitals; double abs_prec = prec / orbital::get_electron_number(Phi); @@ -170,7 +169,7 @@ void CoulombPotential::allreducePotential(double prec, mrcpp::ComplexFunction &V // Add up local contributions into the grand master mrcpp::mpi::reduce_function(abs_prec, V_loc, mrcpp::mpi::comm_wrk); - if (not V_tot.hasReal()) V_tot.alloc(NUMBER::Real); + if (not V_tot.hasReal()) V_tot.alloc(1); if (V_tot.isShared()) { int tag = 3141; // MPI grand master distributes to shared masters diff --git a/src/qmoperators/two_electron/CoulombPotential.h b/src/qmoperators/two_electron/CoulombPotential.h index 5eb1157af..629275ad0 100644 --- a/src/qmoperators/two_electron/CoulombPotential.h +++ b/src/qmoperators/two_electron/CoulombPotential.h @@ -65,7 +65,7 @@ class CoulombPotential : public QMPotential { auto &getPoisson() { return this->poisson; } auto &getDensity() { return this->density; } - bool hasDensity() const { return (this->density.squaredNorm() < 0.0) ? false : true; } + bool hasDensity() const { return (this->density.getSquareNorm() <= 0.0) ? false : true; } void setup(double prec) override; void clear() override; @@ -74,8 +74,8 @@ class CoulombPotential : public QMPotential { virtual void setupLocalDensity(double prec) {} void setupGlobalPotential(double prec); - mrcpp::ComplexFunction setupLocalPotential(double prec); - void allreducePotential(double prec, mrcpp::ComplexFunction &V_loc); + mrcpp::CompFunction<3> setupLocalPotential(double prec); + void allreducePotential(double prec, mrcpp::CompFunction<3> &V_loc); }; } // namespace mrchem diff --git a/src/qmoperators/two_electron/ExchangePotential.cpp b/src/qmoperators/two_electron/ExchangePotential.cpp index 296ab00c2..676b094db 100644 --- a/src/qmoperators/two_electron/ExchangePotential.cpp +++ b/src/qmoperators/two_electron/ExchangePotential.cpp @@ -29,7 +29,6 @@ #include "ExchangePotential.h" #include "qmfunctions/Orbital.h" -#include "qmfunctions/OrbitalIterator.h" #include "qmfunctions/orbital_utils.h" #include "utils/print_utils.h" @@ -59,7 +58,7 @@ ExchangePotential::ExchangePotential(PoissonOperator_p P, OrbitalVector_p Phi, d */ void ExchangePotential::rotate(const ComplexMatrix &U) { if (this->exchange.size() == 0) return; - mrcpp::mpifuncvec::rotate(this->exchange, U, this->apply_prec); + mrcpp::rotate(this->exchange, U, this->apply_prec); // NOTE: The following MPI point is currently NOT implemented! // @@ -171,47 +170,48 @@ void ExchangePotential::calcExchange_kij(double prec, Orbital phi_k, Orbital phi // if the product is smaller than the target precision, // the result is expected to be negligible Timer timer_ij; - Orbital rho_ij = phi_i.paramCopy(); - mrcpp::cplxfunc::multiply(rho_ij, phi_i.dagger(), phi_j, prec_m1, true, true); + Orbital rho_ij = phi_i.paramCopy(true); + mrcpp::multiply(rho_ij, phi_i, phi_j, prec_m1, true, true, true); timer_ij.stop(); if (rho_ij.norm() < prec) return; - auto N_i = phi_i.getNNodes(NUMBER::Total); - auto N_j = phi_j.getNNodes(NUMBER::Total); - auto N_ij = rho_ij.getNNodes(NUMBER::Total); + auto N_i = phi_i.getNNodes(); + auto N_j = phi_j.getNNodes(); + auto N_ij = rho_ij.getNNodes(); auto norm_ij = rho_ij.norm(); + // For now we assume all phi are complex or all ar real. - // prepare vector used to steer precision of Poisson application - mrcpp::FunctionTreeVector<3> phi_opt_vec; - if (phi_k.hasReal()) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_k.real())); - if (phi_k.hasImag()) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_k.imag())); - - if (phi_j.hasReal() and &phi_j != &phi_k) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_j.real())); - if (phi_j.hasImag() and &phi_j != &phi_k) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_j.imag())); - - if (phi_i.hasReal() and &phi_i != &phi_k and &phi_i != &phi_j) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_i.real())); - if (phi_i.hasImag() and &phi_i != &phi_k and &phi_i != &phi_j) phi_opt_vec.push_back(std::make_tuple(1.0, &phi_i.imag())); + bool RealOrbitals = phi_i.isreal(); + // prepare vector used to steer precision of Poisson application + mrcpp::FunctionTreeVector<3, double> phi_opt_vec_real; + mrcpp::FunctionTreeVector<3, ComplexDouble> phi_opt_vec_cplx; + if (RealOrbitals) { + if (phi_k.isreal() and phi_k.getNNodes() > 0) phi_opt_vec_real.emplace_back(1.0, phi_k.CompD[0]); + if (phi_j.isreal() and &phi_j != &phi_k and phi_j.getNNodes() > 0) phi_opt_vec_real.emplace_back(1.0, phi_j.CompD[0]); + if (phi_i.isreal() and &phi_i != &phi_k and &phi_i != &phi_j and phi_i.getNNodes() > 0) phi_opt_vec_real.emplace_back(1.0, phi_i.CompD[0]); + } else { + if (phi_k.iscomplex()) phi_opt_vec_cplx.emplace_back(1.0, phi_k.CompC[0]); + if (phi_j.iscomplex() and &phi_j != &phi_k) phi_opt_vec_cplx.emplace_back(1.0, phi_j.CompC[0]); + if (phi_i.iscomplex() and &phi_i != &phi_k and &phi_i != &phi_j) phi_opt_vec_cplx.emplace_back(1.0, phi_i.CompC[0]); + } // compute V_ij = P[rho_ij] Timer timer_p; - Orbital V_ij = rho_ij.paramCopy(); - if (rho_ij.hasReal()) { - V_ij.alloc(NUMBER::Real); - mrcpp::apply(prec_p, V_ij.real(), P, rho_ij.real(), phi_opt_vec, -1, true); - } - if (rho_ij.hasImag()) { - V_ij.alloc(NUMBER::Imag); - mrcpp::apply(prec_p, V_ij.imag(), P, rho_ij.imag(), phi_opt_vec, -1, true); + Orbital V_ij = rho_ij.paramCopy(true); + if (RealOrbitals) { + mrcpp::apply(prec_p, *V_ij.CompD[0], P, *rho_ij.CompD[0], phi_opt_vec_real, -1, true); + } else { + mrcpp::apply(prec_p, *V_ij.CompC[0], P, *rho_ij.CompC[0], phi_opt_vec_cplx, -1, true); } - rho_ij.release(); + rho_ij.free(); timer_p.stop(); - auto N_p = V_ij.getNNodes(NUMBER::Total); + auto N_p = V_ij.getNNodes(); auto norm_p = V_ij.norm(); // compute out_kij = phi_k * V_ij Timer timer_kij; - mrcpp::cplxfunc::multiply(out_kij, phi_k, V_ij, prec_m2, true, true); - auto N_kij = out_kij.getNNodes(NUMBER::Total); + mrcpp::multiply(out_kij, phi_k, V_ij, prec_m2, true, true); + auto N_kij = out_kij.getNNodes(); auto norm_kij = out_kij.norm(); timer_kij.stop(); @@ -220,8 +220,8 @@ void ExchangePotential::calcExchange_kij(double prec, Orbital phi_k, Orbital phi auto N_jji = 0; auto norm_jji = 0.0; if (out_jji != nullptr) { - mrcpp::cplxfunc::multiply(*out_jji, phi_j, V_ij.dagger(), prec_m2, true, true); - N_jji = out_jji->getNNodes(NUMBER::Total); + mrcpp::multiply(*out_jji, V_ij, phi_j, prec_m2, true, true, true); + N_jji = out_jji->getNNodes(); norm_jji = out_jji->norm(); } timer_jji.stop(); diff --git a/src/qmoperators/two_electron/ExchangePotentialD1.cpp b/src/qmoperators/two_electron/ExchangePotentialD1.cpp index c77d20d1a..262899f0e 100644 --- a/src/qmoperators/two_electron/ExchangePotentialD1.cpp +++ b/src/qmoperators/two_electron/ExchangePotentialD1.cpp @@ -29,7 +29,6 @@ #include "ExchangePotentialD1.h" #include "qmfunctions/Orbital.h" -#include "qmfunctions/OrbitalIterator.h" #include "qmfunctions/orbital_utils.h" #include "utils/print_utils.h" @@ -59,7 +58,7 @@ void ExchangePotentialD1::setupBank() { mrcpp::mpi::barrier(mrcpp::mpi::comm_wrk); OrbitalVector &Phi = *this->orbitals; for (int i = 0; i < Phi.size(); i++) { - if (mrcpp::mpi::my_orb(i)) PhiBank.put_func(i, Phi[i]); + if (mrcpp::mpi::my_func(i)) PhiBank.put_func(i, Phi[i]); } mrcpp::mpi::barrier(mrcpp::mpi::comm_wrk); mrcpp::print::time(3, "Setting up exchange bank", timer); @@ -103,14 +102,14 @@ int ExchangePotentialD1::testInternal(Orbital phi_p) const { * particular exchange contribution has been precomputed. */ Orbital ExchangePotentialD1::apply(Orbital phi_p) { - Orbital out_p = phi_p.paramCopy(); + Orbital out_p = phi_p.paramCopy(true); if (this->apply_prec < 0.0) { MSG_ERROR("Uninitialized operator"); return out_p; } int i = testInternal(phi_p); if (i < 0) { - if (not mrcpp::mpi::my_orb(phi_p)) { + if (not mrcpp::mpi::my_func(phi_p)) { MSG_WARN("Not computing exchange contributions that are not mine"); return out_p; } @@ -158,7 +157,7 @@ void ExchangePotentialD1::setupInternal(double prec) { for (auto &phi_i : Phi) { Orbital ex_iii(phi_i.spin(), phi_i.occ(), phi_i.getRank()); t_calc.resume(); - if (mrcpp::mpi::my_orb(i)) calcExchange_kij(precf, phi_i, phi_i, phi_i, ex_iii); + if (mrcpp::mpi::my_func(i)) calcExchange_kij(precf, phi_i, phi_i, phi_i, ex_iii); t_calc.stop(); Ex.push_back(ex_iii); i++; @@ -242,7 +241,7 @@ void ExchangePotentialD1::setupInternal(double prec) { task = tasksMaster.next_task(); if (task < 0) break; // we fetch all required i (but only one j at a time) - OrbitalVector iorb_vec; + std::vector iorb_vec; int i0 = -1; for (int i = 0; i < itasks[task].size(); i++) { int iorb = itasks[task][i]; @@ -268,13 +267,13 @@ void ExchangePotentialD1::setupInternal(double prec) { } else phi_j = Phi[jorb]; t_orb.stop(); - std::vector iijfunc_vec; - ComplexVector coef_vec(N); + std::vector> iijfunc_vec; + std::vector coef_vec(N); for (int i = 0; i < iorb_vec.size(); i++) { int iorb = itasks[task][i]; Orbital &phi_i = iorb_vec[i]; - Orbital ex_jji = phi_i.paramCopy(); - Orbital ex_iij = phi_j.paramCopy(); + Orbital ex_jji = phi_i.paramCopy(true); + Orbital ex_iij = phi_j.paramCopy(true); // compute K_iij and K_jji in one operation double j_fac = getSpinFactor(phi_i, phi_j); @@ -293,7 +292,7 @@ void ExchangePotentialD1::setupInternal(double prec) { Ex[iorb].add(j_fac, ex_jji); Ex[jorb].add(j_fac, ex_iij); } - ex_jji.free(NUMBER::Total); + ex_jji.free(); t_snd.stop(); } Timer timerx; @@ -312,9 +311,9 @@ void ExchangePotentialD1::setupInternal(double prec) { } // add all contributions to ex_j, if (mrcpp::mpi::bank_size > 0 and iijfunc_vec.size() > 0) { - Orbital ex_j = phi_j.paramCopy(); + Orbital ex_j = phi_j.paramCopy(true); t_add.resume(); - mrcpp::cplxfunc::linear_combination(ex_j, coef_vec, iijfunc_vec, prec); + mrcpp::linear_combination(ex_j, coef_vec, iijfunc_vec, prec); t_add.stop(); // ex_j is sent to Bank if (ex_j.hasReal() or ex_j.hasImag()) { @@ -327,11 +326,11 @@ void ExchangePotentialD1::setupInternal(double prec) { tasksMaster.put_readytask(jorb, i0 + N); } t_snd.stop(); - ex_j.free(NUMBER::Total); + ex_j.free(); } else if (iijfunc_vec.size() > 0) { MSG_ERROR("Exchange exists but has no real and no Imag parts"); } - for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(NUMBER::Total); + for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(); } } } @@ -342,10 +341,10 @@ void ExchangePotentialD1::setupInternal(double prec) { t_wait.stop(); for (int j = 0; j < N; j++) { - if (not mrcpp::mpi::my_orb(j) or mrcpp::mpi::bank_size == 0) continue; // fetch only own j + if (not mrcpp::mpi::my_func(j) or mrcpp::mpi::bank_size == 0) continue; // fetch only own j std::vector iVec = tasksMaster.get_readytask(j, 1); - std::vector iijfunc_vec; - ComplexVector coef_vec(N); + std::vector> iijfunc_vec; + std::vector coef_vec(N); int tot = 0; int totmax = 2 * block_size; for (int i : iVec) { @@ -362,11 +361,11 @@ void ExchangePotentialD1::setupInternal(double prec) { if (tot >= totmax) { // we sum the contributions so far before fetching new ones t_add.resume(); - auto tmp_j = Ex[j].paramCopy(); - mrcpp::cplxfunc::linear_combination(tmp_j, coef_vec, iijfunc_vec, prec); + auto tmp_j = Ex[j].paramCopy(true); + mrcpp::linear_combination(tmp_j, coef_vec, iijfunc_vec, prec); Ex[j].add(1.0, tmp_j); - tmp_j.free(NUMBER::Total); - for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(NUMBER::Total); + tmp_j.free(); + for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(); iijfunc_vec.clear(); Ex[j].crop(prec); t_add.stop(); @@ -375,11 +374,11 @@ void ExchangePotentialD1::setupInternal(double prec) { } if (iijfunc_vec.size() > 0) { t_add.resume(); - auto tmp_j = Ex[j].paramCopy(); - mrcpp::cplxfunc::linear_combination(tmp_j, coef_vec, iijfunc_vec, prec); + auto tmp_j = Ex[j].paramCopy(true); + mrcpp::linear_combination(tmp_j, coef_vec, iijfunc_vec, prec); Ex[j].add(1.0, tmp_j); - tmp_j.free(NUMBER::Total); - for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(NUMBER::Total); + tmp_j.free(); + for (int jj = 0; jj < iijfunc_vec.size(); jj++) iijfunc_vec[jj].free(); Ex[j].crop(prec); t_add.stop(); } @@ -419,27 +418,27 @@ Orbital ExchangePotentialD1::calcExchange(Orbital phi_p) { // adjust precision since we sum over orbitals precf /= std::min(10.0, std::sqrt(1.0 * Phi.size())); - std::vector func_vec; + std::vector> func_vec; std::vector coef_vec; for (int i = 0; i < Phi.size(); i++) { - Orbital &phi_i = Phi[i]; - if (not mrcpp::mpi::my_orb(i)) PhiBank.get_func(i, phi_i, 1); + Orbital phi_i(Phi[i]); + if (not mrcpp::mpi::my_func(i)) PhiBank.get_func(i, phi_i, 1); double spin_fac = getSpinFactor(phi_i, phi_p); if (std::abs(spin_fac) >= mrcpp::MachineZero) { - Orbital ex_iip = phi_p.paramCopy(); + Orbital ex_iip = phi_p.paramCopy(true); calcExchange_kij(precf, phi_i, phi_i, phi_p, ex_iip); - coef_vec.push_back(spin_fac / phi_i.squaredNorm()); + coef_vec.push_back(spin_fac / phi_i.getSquareNorm()); func_vec.push_back(ex_iip); } - if (not mrcpp::mpi::my_orb(i)) phi_i.free(NUMBER::Total); + if (not mrcpp::mpi::my_func(i)) phi_i.free(); } // compute ex_p = sum_i c_i*ex_iip - Orbital ex_p = phi_p.paramCopy(); - Eigen::Map coefs(coef_vec.data(), coef_vec.size()); - mrcpp::cplxfunc::linear_combination(ex_p, coefs, func_vec, prec); + Orbital ex_p = phi_p.paramCopy(true); + // Eigen::Map coefs(coef_vec.data(), coef_vec.size()); + mrcpp::linear_combination(ex_p, coef_vec, func_vec, prec); print_utils::qmfunction(4, "Applied exchange", ex_p, timer); return ex_p; } diff --git a/src/qmoperators/two_electron/ExchangePotentialD2.cpp b/src/qmoperators/two_electron/ExchangePotentialD2.cpp index e263b7fe3..1fcb77b74 100644 --- a/src/qmoperators/two_electron/ExchangePotentialD2.cpp +++ b/src/qmoperators/two_electron/ExchangePotentialD2.cpp @@ -29,7 +29,6 @@ #include "ExchangePotentialD2.h" #include "qmfunctions/Orbital.h" -#include "qmfunctions/OrbitalIterator.h" #include "qmfunctions/orbital_utils.h" #include "utils/print_utils.h" @@ -63,15 +62,15 @@ void ExchangePotentialD2::setupBank() { mrcpp::mpi::barrier(mrcpp::mpi::comm_wrk); OrbitalVector &Phi = *this->orbitals; for (int i = 0; i < Phi.size(); i++) { - if (mrcpp::mpi::my_orb(Phi[i])) PhiBank.put_func(i, Phi[i]); + if (mrcpp::mpi::my_func(Phi[i])) PhiBank.put_func(i, Phi[i]); } OrbitalVector &X = *this->orbitals_x; for (int i = 0; i < X.size(); i++) { - if (mrcpp::mpi::my_orb(X[i])) XBank.put_func(i, X[i]); + if (mrcpp::mpi::my_func(X[i])) XBank.put_func(i, X[i]); } OrbitalVector &Y = *this->orbitals_y; for (int i = 0; i < Y.size(); i++) { - if (mrcpp::mpi::my_orb(Y[i])) YBank.put_func(i, Y[i]); + if (mrcpp::mpi::my_func(Y[i])) YBank.put_func(i, Y[i]); } mrcpp::mpi::barrier(mrcpp::mpi::comm_wrk); mrcpp::print::time(3, "Setting up exchange bank", timer); @@ -97,7 +96,7 @@ void ExchangePotentialD2::clearBank() { Orbital ExchangePotentialD2::apply(Orbital phi_p) { if (this->apply_prec < 0.0) { MSG_ERROR("Uninitialized operator"); - return phi_p.paramCopy(); + return phi_p.paramCopy(true); } Timer timer; @@ -111,37 +110,37 @@ Orbital ExchangePotentialD2::apply(Orbital phi_p) { // adjust precision since we sum over orbitals precf /= std::sqrt(1 * Phi.size()); - std::vector func_vec; + std::vector> func_vec; std::vector coef_vec; for (int i = 0; i < Phi.size(); i++) { - Orbital &phi_i = Phi[i]; - Orbital &x_i = X[i]; - Orbital &y_i = Y[i]; + Orbital phi_i(Phi[i]); + Orbital x_i(X[i]); + Orbital y_i(Y[i]); - if (not mrcpp::mpi::my_orb(phi_i)) PhiBank.get_func(i, phi_i, 1); - if (not mrcpp::mpi::my_orb(x_i)) XBank.get_func(i, x_i, 1); - if (not mrcpp::mpi::my_orb(y_i)) YBank.get_func(i, y_i, 1); + if (not mrcpp::mpi::my_func(phi_i)) PhiBank.get_func(i, phi_i, 1); + if (not mrcpp::mpi::my_func(x_i)) XBank.get_func(i, x_i, 1); + if (not mrcpp::mpi::my_func(y_i)) YBank.get_func(i, y_i, 1); double spin_fac = getSpinFactor(phi_i, phi_p); if (std::abs(spin_fac) >= mrcpp::MachineZero) { - Orbital ex_xip = phi_p.paramCopy(); - Orbital ex_iyp = phi_p.paramCopy(); + Orbital ex_xip = phi_p.paramCopy(true); + Orbital ex_iyp = phi_p.paramCopy(true); calcExchange_kij(precf, x_i, phi_i, phi_p, ex_xip); calcExchange_kij(precf, phi_i, y_i, phi_p, ex_iyp); func_vec.push_back(ex_xip); func_vec.push_back(ex_iyp); - coef_vec.push_back(spin_fac / phi_i.squaredNorm()); - coef_vec.push_back(spin_fac / phi_i.squaredNorm()); + coef_vec.push_back(spin_fac / phi_i.getSquareNorm()); + coef_vec.push_back(spin_fac / phi_i.getSquareNorm()); } - if (not mrcpp::mpi::my_orb(phi_i)) phi_i.free(NUMBER::Total); - if (not mrcpp::mpi::my_orb(x_i)) x_i.free(NUMBER::Total); - if (not mrcpp::mpi::my_orb(y_i)) y_i.free(NUMBER::Total); + if (not mrcpp::mpi::my_func(phi_i)) phi_i.free(); + if (not mrcpp::mpi::my_func(x_i)) x_i.free(); + if (not mrcpp::mpi::my_func(y_i)) y_i.free(); } // compute out_p = sum_i c_i*(ex_xip + ex_iyp) - Orbital out_p = phi_p.paramCopy(); - Eigen::Map coefs(coef_vec.data(), coef_vec.size()); - mrcpp::cplxfunc::linear_combination(out_p, coefs, func_vec, prec); + Orbital out_p = phi_p.paramCopy(true); + // Eigen::Map coefs(coef_vec.data(), coef_vec.size()); + mrcpp::linear_combination(out_p, coef_vec, func_vec, prec); print_utils::qmfunction(4, "Applied exchange", out_p, timer); return out_p; } @@ -156,7 +155,7 @@ Orbital ExchangePotentialD2::apply(Orbital phi_p) { Orbital ExchangePotentialD2::dagger(Orbital phi_p) { if (this->apply_prec < 0.0) { MSG_ERROR("Uninitialized operator"); - return phi_p.paramCopy(); + return phi_p.paramCopy(true); } Timer timer; @@ -170,37 +169,37 @@ Orbital ExchangePotentialD2::dagger(Orbital phi_p) { // adjust precision since we sum over orbitals precf /= std::min(10.0, std::sqrt(1.0 * Phi.size())); - std::vector func_vec; + std::vector> func_vec; std::vector coef_vec; for (int i = 0; i < Phi.size(); i++) { - Orbital &phi_i = Phi[i]; - Orbital &x_i = X[i]; - Orbital &y_i = Y[i]; + Orbital phi_i(Phi[i]); + Orbital x_i(X[i]); + Orbital y_i(Y[i]); - if (not mrcpp::mpi::my_orb(phi_i)) PhiBank.get_func(i, phi_i, 1); - if (not mrcpp::mpi::my_orb(x_i)) XBank.get_func(i, x_i, 1); - if (not mrcpp::mpi::my_orb(y_i)) YBank.get_func(i, y_i, 1); + if (not mrcpp::mpi::my_func(phi_i)) PhiBank.get_func(i, phi_i, 1); + if (not mrcpp::mpi::my_func(x_i)) XBank.get_func(i, x_i, 1); + if (not mrcpp::mpi::my_func(y_i)) YBank.get_func(i, y_i, 1); double spin_fac = getSpinFactor(phi_i, phi_p); if (std::abs(spin_fac) >= mrcpp::MachineZero) { - Orbital ex_ixp = phi_p.paramCopy(); - Orbital ex_yip = phi_p.paramCopy(); + Orbital ex_ixp = phi_p.paramCopy(true); + Orbital ex_yip = phi_p.paramCopy(true); calcExchange_kij(precf, phi_i, x_i, phi_p, ex_ixp); calcExchange_kij(precf, y_i, phi_i, phi_p, ex_yip); func_vec.push_back(ex_ixp); func_vec.push_back(ex_yip); - coef_vec.push_back(spin_fac / phi_i.squaredNorm()); - coef_vec.push_back(spin_fac / phi_i.squaredNorm()); + coef_vec.push_back(spin_fac / phi_i.getSquareNorm()); + coef_vec.push_back(spin_fac / phi_i.getSquareNorm()); } - if (not mrcpp::mpi::my_orb(phi_i)) phi_i.free(NUMBER::Total); - if (not mrcpp::mpi::my_orb(x_i)) x_i.free(NUMBER::Total); - if (not mrcpp::mpi::my_orb(y_i)) y_i.free(NUMBER::Total); + if (not mrcpp::mpi::my_func(phi_i)) phi_i.free(); + if (not mrcpp::mpi::my_func(x_i)) x_i.free(); + if (not mrcpp::mpi::my_func(y_i)) y_i.free(); } // compute ex_p = sum_i c_i*(ex_ixp + ex_yip) - Orbital ex_p = phi_p.paramCopy(); - Eigen::Map coefs(coef_vec.data(), coef_vec.size()); - mrcpp::cplxfunc::linear_combination(ex_p, coefs, func_vec, prec); + Orbital ex_p = phi_p.paramCopy(true); + // Eigen::Map coefs(coef_vec.data(), coef_vec.size()); + mrcpp::linear_combination(ex_p, coef_vec, func_vec, prec); print_utils::qmfunction(4, "Applied exchange", ex_p, timer); return ex_p; } diff --git a/src/qmoperators/two_electron/FockBuilder.cpp b/src/qmoperators/two_electron/FockBuilder.cpp index 450aa1abd..9c094de79 100644 --- a/src/qmoperators/two_electron/FockBuilder.cpp +++ b/src/qmoperators/two_electron/FockBuilder.cpp @@ -121,7 +121,7 @@ void FockBuilder::setup(double prec) { chiPot->project(prec); chiInvPot = std::make_shared(adap); - mrcpp::cplxfunc::deep_copy(*chiInvPot, *chiPot); + mrcpp::deep_copy(*chiInvPot, *chiPot); chiInvPot->real().map([](double val) { return 1.0 / (val + 1) - 1; }); @@ -276,7 +276,7 @@ OrbitalVector FockBuilder::buildHelmholtzArgument(double prec, OrbitalVector Phi /** * @brief Build the Helmholtz argument for the ZORA operator. Eq. 17 in J. Chem. Theory and Comput. 2024, 20, 728-737 -*/ + */ OrbitalVector FockBuilder::buildHelmholtzArgumentZORA(OrbitalVector &Phi, OrbitalVector &Psi, DoubleVector eps, double prec) { // Get necessary operators double c = getLightSpeed(); @@ -292,13 +292,13 @@ OrbitalVector FockBuilder::buildHelmholtzArgumentZORA(OrbitalVector &Phi, Orbita if (isZora()) { RankZeroOperator &V_zora = this->zora_base; operThreePtr = std::make_shared(V_zora * chi + V_zora); - } else if (isAZora()) { + } else if (isAZora()) { /* Note that V_z * kappa = 2 c^2 * (kappa - 1) With this trick, the expensive projection of the potential is avoided */ std::shared_ptr vTimesKappa = std::make_shared(0); - mrcpp::cplxfunc::deep_copy(*vTimesKappa, *chiPot); + mrcpp::deep_copy(*vTimesKappa, *chiPot); vTimesKappa->real().map([two_cc](double val) { return two_cc * (val); }); operThreePtr = std::make_shared(vTimesKappa); } else { @@ -324,7 +324,7 @@ OrbitalVector FockBuilder::buildHelmholtzArgumentZORA(OrbitalVector &Phi, Orbita Timer t_3; OrbitalVector epsPhi = orbital::deep_copy(Phi); for (int i = 0; i < epsPhi.size(); i++) { - if (not mrcpp::mpi::my_orb(epsPhi[i])) continue; + if (not mrcpp::mpi::my_func(epsPhi[i])) continue; epsPhi[i].rescale(eps[i] / two_cc); } OrbitalVector termThree = operThree(epsPhi); @@ -334,12 +334,11 @@ OrbitalVector FockBuilder::buildHelmholtzArgumentZORA(OrbitalVector &Phi, Orbita auto normsTwo = orbital::get_norms(termTwo); auto normsThree = orbital::get_norms(termThree); auto normsPsi = orbital::get_norms(Psi); - // Add up all the terms Timer t_add; OrbitalVector arg = orbital::deep_copy(termOne); for (int i = 0; i < arg.size(); i++) { - if (not mrcpp::mpi::my_orb(arg[i])) continue; + if (not mrcpp::mpi::my_func(arg[i])) continue; arg[i].add(1.0, termTwo[i]); arg[i].add(1.0, termThree[i]); arg[i].add(1.0, Psi[i]); @@ -352,7 +351,7 @@ OrbitalVector FockBuilder::buildHelmholtzArgumentZORA(OrbitalVector &Phi, Orbita Timer t_kappa; mrchem::OrbitalVector out = chi_m1(arg); for (int i = 0; i < arg.size(); i++) { - if (not mrcpp::mpi::my_orb(out[i])) continue; + if (not mrcpp::mpi::my_func(out[i])) continue; out[i].add(1.0, arg[i]); } mrcpp::print::time(2, "Applying kappa inverse", t_kappa); @@ -374,7 +373,7 @@ OrbitalVector FockBuilder::buildHelmholtzArgumentNREL(OrbitalVector &Phi, Orbita Timer t_add; OrbitalVector out = orbital::deep_copy(termOne); for (int i = 0; i < out.size(); i++) { - if (not mrcpp::mpi::my_orb(out[i])) continue; + if (not mrcpp::mpi::my_func(out[i])) continue; out[i].add(1.0, Psi[i]); }; mrcpp::print::time(2, "Adding contributions", t_add); diff --git a/src/qmoperators/two_electron/FockBuilder.h b/src/qmoperators/two_electron/FockBuilder.h index 0e3aa06b7..2415cfb3c 100644 --- a/src/qmoperators/two_electron/FockBuilder.h +++ b/src/qmoperators/two_electron/FockBuilder.h @@ -26,11 +26,11 @@ #pragma once +#include "chemistry/Nucleus.h" #include "qmoperators/QMPotential.h" #include "tensor/RankOneOperator.h" #include "tensor/RankZeroOperator.h" #include -#include "chemistry/Nucleus.h" /** @class FockOperator * @@ -84,8 +84,8 @@ class FockBuilder final { bool isAZora() const { return zora_is_azora; } bool isZora() const { return (zora_has_nuc || zora_has_coul || zora_has_xc); } void setZoraType(bool has_nuc, bool has_coul, bool has_xc, bool is_azora); - void setAZORADirectory(const std::string &dir) {azora_dir = dir;} - void setNucs(const Nuclei &nucs) { this->nucs = nucs;} + void setAZORADirectory(const std::string &dir) { azora_dir = dir; } + void setNucs(const Nuclei &nucs) { this->nucs = nucs; } SCFEnergy trace(OrbitalVector &Phi, const Nuclei &nucs); ComplexMatrix operator()(OrbitalVector &bra, OrbitalVector &ket); diff --git a/src/qmoperators/two_electron/ReactionPotential.cpp b/src/qmoperators/two_electron/ReactionPotential.cpp index 1a6b671c0..7fbfa180c 100644 --- a/src/qmoperators/two_electron/ReactionPotential.cpp +++ b/src/qmoperators/two_electron/ReactionPotential.cpp @@ -52,13 +52,13 @@ void ReactionPotential::setup(double prec) { mrcpp::print::value(3, "Threshold", thrs, "(abs)", 5); mrcpp::print::separator(3, '-'); auto potential = this->computePotential(prec); - mrcpp::cplxfunc::deep_copy(*this, potential); + mrcpp::deep_copy(*this, potential); if (plevel == 2) print_utils::qmfunction(2, "Reaction operator", *this, timer); mrcpp::print::footer(3, timer, 2); } void ReactionPotential::clear() { - mrcpp::ComplexFunction::free(NUMBER::Total); // delete FunctionTree pointers + mrcpp::CompFunction<3>::free(); // delete FunctionTree pointers clearApplyPrec(); this->solver->clear(); } diff --git a/src/qmoperators/two_electron/ReactionPotential.h b/src/qmoperators/two_electron/ReactionPotential.h index 6e37fc6ea..987208f83 100644 --- a/src/qmoperators/two_electron/ReactionPotential.h +++ b/src/qmoperators/two_electron/ReactionPotential.h @@ -63,7 +63,7 @@ class ReactionPotential : public QMPotential { void clear() override; private: - virtual mrcpp::ComplexFunction &computePotential(double prec) const = 0; + virtual mrcpp::CompFunction<3> &computePotential(double prec) const = 0; }; } // namespace mrchem diff --git a/src/qmoperators/two_electron/ReactionPotentialD1.cpp b/src/qmoperators/two_electron/ReactionPotentialD1.cpp index 2b12e30fd..8861f7b17 100644 --- a/src/qmoperators/two_electron/ReactionPotentialD1.cpp +++ b/src/qmoperators/two_electron/ReactionPotentialD1.cpp @@ -38,7 +38,7 @@ using PoissonOperator = mrcpp::PoissonOperator; using PoissonOperator_p = std::shared_ptr; namespace mrchem { -mrcpp::ComplexFunction &ReactionPotentialD1::computePotential(double prec) const { +mrcpp::CompFunction<3> &ReactionPotentialD1::computePotential(double prec) const { // construct electronic density from the orbitals OrbitalVector &Phi = *this->orbitals; Density rho_el(false); diff --git a/src/qmoperators/two_electron/ReactionPotentialD1.h b/src/qmoperators/two_electron/ReactionPotentialD1.h index e470fb170..844dbdd47 100644 --- a/src/qmoperators/two_electron/ReactionPotentialD1.h +++ b/src/qmoperators/two_electron/ReactionPotentialD1.h @@ -36,7 +36,7 @@ class ReactionPotentialD1 final : public ReactionPotential { : ReactionPotential(std::move(gpesolver), Phi, mpi_share) {} private: - mrcpp::ComplexFunction &computePotential(double prec) const override; + mrcpp::CompFunction<3> &computePotential(double prec) const override; }; } // namespace mrchem diff --git a/src/qmoperators/two_electron/ReactionPotentialD2.cpp b/src/qmoperators/two_electron/ReactionPotentialD2.cpp index 03328b0ed..1013c7fb7 100644 --- a/src/qmoperators/two_electron/ReactionPotentialD2.cpp +++ b/src/qmoperators/two_electron/ReactionPotentialD2.cpp @@ -35,7 +35,7 @@ using mrcpp::Printer; using mrcpp::Timer; namespace mrchem { -mrcpp::ComplexFunction &ReactionPotentialD2::computePotential(double prec) const { +mrcpp::CompFunction<3> &ReactionPotentialD2::computePotential(double prec) const { // construct perturbed density from the orbitals if (this->orbitals == nullptr) MSG_ERROR("Orbitals not initialized"); if (this->orbitals_x == nullptr) MSG_ERROR("Perturbed X orbitals not initialized"); diff --git a/src/qmoperators/two_electron/ReactionPotentialD2.h b/src/qmoperators/two_electron/ReactionPotentialD2.h index c77aafcbc..875792760 100644 --- a/src/qmoperators/two_electron/ReactionPotentialD2.h +++ b/src/qmoperators/two_electron/ReactionPotentialD2.h @@ -40,6 +40,6 @@ class ReactionPotentialD2 final : public ReactionPotential { std::shared_ptr orbitals_x; ///< Perturbed orbitals std::shared_ptr orbitals_y; ///< Perturbed orbitals - mrcpp::ComplexFunction &computePotential(double prec) const override; + mrcpp::CompFunction<3> &computePotential(double prec) const override; }; } // namespace mrchem diff --git a/src/qmoperators/two_electron/XCPotential.cpp b/src/qmoperators/two_electron/XCPotential.cpp index 6c79d6d59..47390afb4 100644 --- a/src/qmoperators/two_electron/XCPotential.cpp +++ b/src/qmoperators/two_electron/XCPotential.cpp @@ -85,7 +85,6 @@ void XCPotential::setup(double prec) { this->potentials.push_back(std::make_tuple(1.0, v_global)); } - if (plevel == 2) { int totNodes = 0; int totSize = 0; @@ -104,7 +103,7 @@ void XCPotential::setup(double prec) { /** @brief Clears all data in the XCPotential object */ void XCPotential::clear() { this->energy = 0.0; - for (auto &rho : this->densities) rho.free(NUMBER::Total); + for (auto &rho : this->densities) rho.free(); mrcpp::clear(this->potentials, true); clearApplyPrec(); } diff --git a/src/qmoperators/two_electron/XCPotential.h b/src/qmoperators/two_electron/XCPotential.h index f0ed0e3ac..a44cb648f 100644 --- a/src/qmoperators/two_electron/XCPotential.h +++ b/src/qmoperators/two_electron/XCPotential.h @@ -25,8 +25,8 @@ #pragma once -#include "qmoperators/QMPotential.h" #include "qmfunctions/Density.h" +#include "qmoperators/QMPotential.h" #include "mrdft/MRDFT.h" @@ -66,19 +66,17 @@ class XCPotential : public QMPotential { /** * @brief Get the XC potential. For unrestricted calculations, the potential is a vector of two functions. */ - std::shared_ptr> getPotentialVector() { - return std::make_shared>(potentials); - } + std::shared_ptr> getPotentialVector() { return std::make_shared>(potentials); } friend class XCOperator; protected: - double energy; ///< XC energy - std::vector densities; ///< XC densities (total or alpha/beta) - mrcpp::FunctionTreeVector<3> potentials; ///< XC Potential functions collected in a vector - std::shared_ptr> v_tot{nullptr}; ///< Total XC potential - std::shared_ptr orbitals; ///< External set of orbitals used to build the density - std::unique_ptr mrdft; ///< External XC functional to be used + double energy; ///< XC energy + std::vector densities; ///< XC densities (total or alpha/beta) + mrcpp::FunctionTreeVector<3> potentials; ///< XC Potential functions collected in a vector + std::shared_ptr> v_tot{nullptr}; ///< Total XC potential + std::shared_ptr orbitals; ///< External set of orbitals used to build the density + std::unique_ptr mrdft; ///< External XC functional to be used double getEnergy() const { return this->energy; } Density &getDensity(DensityType spin, int pert_idx); diff --git a/src/qmoperators/two_electron/XCPotentialD1.cpp b/src/qmoperators/two_electron/XCPotentialD1.cpp index da8b922f9..75a0d3aae 100644 --- a/src/qmoperators/two_electron/XCPotentialD1.cpp +++ b/src/qmoperators/two_electron/XCPotentialD1.cpp @@ -49,11 +49,12 @@ XCPotentialD1::XCPotentialD1(std::unique_ptr &F, std::shared_ptr XCPotentialD1::setupDensities(double prec, mrcpp::FunctionTree<3> &grid) { mrcpp::FunctionTreeVector<3> dens_vec; if (not this->mrdft->functional().isSpin()) { + { // Unperturbed total density Timer timer; Density &rho = getDensity(DensityType::Total, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Total); } @@ -64,8 +65,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD1::setupDensities(double prec, mrcpp::F { // Unperturbed alpha density Timer timer; Density &rho = getDensity(DensityType::Alpha, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Alpha); } @@ -75,8 +76,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD1::setupDensities(double prec, mrcpp::F { // Unperturbed beta density Timer timer; Density &rho = getDensity(DensityType::Beta, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Beta); } diff --git a/src/qmoperators/two_electron/XCPotentialD2.cpp b/src/qmoperators/two_electron/XCPotentialD2.cpp index 7c6fd1050..f45beb154 100644 --- a/src/qmoperators/two_electron/XCPotentialD2.cpp +++ b/src/qmoperators/two_electron/XCPotentialD2.cpp @@ -74,8 +74,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Unperturbed total density Timer timer; Density &rho = getDensity(DensityType::Total, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Total); } @@ -85,8 +85,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Perturbed total density Timer timer; Density &rho = getDensity(DensityType::Total, 1); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, *orbitals_x, *orbitals_y, DensityType::Total); } @@ -97,8 +97,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Unperturbed alpha density Timer timer; Density &rho = getDensity(DensityType::Alpha, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Alpha); } @@ -108,8 +108,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Unperturbed beta density Timer timer; Density &rho = getDensity(DensityType::Beta, 0); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, DensityType::Beta); } @@ -119,8 +119,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Perturbed alpha density Timer timer; Density &rho = getDensity(DensityType::Alpha, 1); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, *orbitals_x, *orbitals_y, DensityType::Alpha); } @@ -130,8 +130,8 @@ mrcpp::FunctionTreeVector<3> XCPotentialD2::setupDensities(double prec, mrcpp::F { // Perturbed beta density Timer timer; Density &rho = getDensity(DensityType::Beta, 1); - if (not rho.hasReal()) { - rho.alloc(NUMBER::Real); + if (rho.Ncomp() == 0) { + rho.alloc(1); mrcpp::copy_grid(rho.real(), grid); density::compute(prec, rho, *orbitals, *orbitals_x, *orbitals_y, DensityType::Beta); } diff --git a/src/scf_solver/Accelerator.cpp b/src/scf_solver/Accelerator.cpp index f63f2d67f..875da50cc 100644 --- a/src/scf_solver/Accelerator.cpp +++ b/src/scf_solver/Accelerator.cpp @@ -94,10 +94,10 @@ void Accelerator::rotate(const ComplexMatrix &U, bool all) { if (nOrbs <= 0) { return; } for (int i = 0; i < nOrbs; i++) { auto &Phi = this->orbitals[i]; - mrcpp::mpifuncvec::rotate(Phi, U); + mrcpp::rotate(Phi, U); auto &dPhi = this->dOrbitals[i]; - mrcpp::mpifuncvec::rotate(dPhi, U); + mrcpp::rotate(dPhi, U); } for (int i = 0; i < nFock; i++) { auto &F = this->fock[i]; @@ -162,11 +162,11 @@ bool Accelerator::verifyOverlap(OrbitalVector &Phi) { if (nHistory > 0) { for (int i = 0; i < nOrbs; i++) { auto &phi_i = Phi[i]; - if (mrcpp::mpi::my_orb(phi_i)) { + if (mrcpp::mpi::my_func(phi_i)) { auto &last_i = this->orbitals[nHistory][i]; - if (not mrcpp::mpi::my_orb(last_i)) MSG_ABORT("MPI rank mismatch"); - auto sqNorm = phi_i.squaredNorm(); - auto overlap = orbital::dot(phi_i, last_i); + if (not mrcpp::mpi::my_func(last_i)) MSG_ABORT("MPI rank mismatch"); + auto sqNorm = phi_i.getSquareNorm(); + auto overlap = mrcpp::dot(phi_i, last_i); if (std::abs(overlap) < 0.5 * sqNorm) { mrcpp::print::value(this->pl + 2, "Overlap not verified ", std::abs(overlap)); out(i) = 1; diff --git a/src/scf_solver/HelmholtzVector.cpp b/src/scf_solver/HelmholtzVector.cpp index 70a1a4073..2d8acf89b 100644 --- a/src/scf_solver/HelmholtzVector.cpp +++ b/src/scf_solver/HelmholtzVector.cpp @@ -75,7 +75,7 @@ OrbitalVector HelmholtzVector::operator()(OrbitalVector &Phi) const { int pprec = Printer::getPrecision(); OrbitalVector out = orbital::param_copy(Phi); for (int i = 0; i < Phi.size(); i++) { - if (not mrcpp::mpi::my_orb(out[i])) continue; + if (not mrcpp::mpi::my_func(out[i])) continue; t_lap.start(); out[i] = apply(i, Phi[i]); @@ -114,7 +114,7 @@ OrbitalVector HelmholtzVector::apply(RankZeroOperator &V, OrbitalVector &Phi, Or OrbitalVector out = orbital::param_copy(Phi); for (int i = 0; i < Phi.size(); i++) { - if (not mrcpp::mpi::my_orb(out[i])) continue; + if (not mrcpp::mpi::my_func(out[i])) continue; t_lap.start(); Orbital Vphi_i = V(Phi[i]); @@ -138,23 +138,24 @@ OrbitalVector HelmholtzVector::apply(RankZeroOperator &V, OrbitalVector &Phi, Or * * Computes output as: out_i = -2H_i[phi_i] */ -Orbital HelmholtzVector::apply(int i, Orbital &phi) const { +Orbital HelmholtzVector::apply(int i, const Orbital &phi) const { ComplexDouble mu_i = std::sqrt(-2.0 * this->lambda(i)); if (std::abs(mu_i.imag()) > mrcpp::MachineZero) MSG_ABORT("Mu cannot be complex"); mrcpp::HelmholtzOperator H(*MRA, mu_i.real(), this->prec); - Orbital out = phi.paramCopy(); - if (phi.hasReal()) { - out.alloc(NUMBER::Real); - mrcpp::apply(this->prec, out.real(), H, phi.real(), -1, true); // Absolute prec - out.real().rescale(-1.0 / (2.0 * mrcpp::pi)); - } - if (phi.hasImag()) { - out.alloc(NUMBER::Imag); - mrcpp::apply(this->prec, out.imag(), H, phi.imag(), -1, true); // Absolute prec - double sign = (phi.conjugate()) ? 1.0 : -1.0; - out.imag().rescale(sign / (2.0 * mrcpp::pi)); + Orbital out = phi.paramCopy(true); + ComplexDouble metric[4][4]; + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + if (i == j) + metric[i][j] = 1.0; + else + metric[i][j] = 0.0; + } } + mrcpp::apply(this->prec, out, H, phi, metric, -1, true); // Absolute prec + out.rescale(-1.0 / (2.0 * mrcpp::pi)); + return out; } } // namespace mrchem diff --git a/src/scf_solver/HelmholtzVector.h b/src/scf_solver/HelmholtzVector.h index 4eff81d22..c3ee3a0bd 100644 --- a/src/scf_solver/HelmholtzVector.h +++ b/src/scf_solver/HelmholtzVector.h @@ -52,7 +52,7 @@ class HelmholtzVector final { double prec; ///< Precision for construction and application of Helmholtz operators DoubleVector lambda; ///< Helmholtz parameter, mu_i = sqrt(-2.0*lambda_i) - Orbital apply(int i, Orbital &phi) const; + Orbital apply(int i, const Orbital &phi) const; }; } // namespace mrchem diff --git a/src/scf_solver/KAIN.cpp b/src/scf_solver/KAIN.cpp index 4317b149d..6629c89b5 100644 --- a/src/scf_solver/KAIN.cpp +++ b/src/scf_solver/KAIN.cpp @@ -61,23 +61,23 @@ void KAIN::setupLinearSystem() { auto &phi_m = this->orbitals[nHistory][n]; auto &fPhi_m = this->dOrbitals[nHistory][n]; - if (mrcpp::mpi::my_orb(phi_m)) { + if (mrcpp::mpi::my_func(phi_m)) { for (int i = 0; i < nHistory; i++) { auto &phi_i = this->orbitals[i][n]; - auto dPhi_im = phi_m.paramCopy(); - mrcpp::cplxfunc::add(dPhi_im, 1.0, phi_i, -1.0, phi_m, -1.0); + auto dPhi_im = phi_m.paramCopy(true); + mrcpp::add(dPhi_im, 1.0, phi_i, -1.0, phi_m, -1.0); for (int j = 0; j < nHistory; j++) { auto &fPhi_j = this->dOrbitals[j][n]; - auto dfPhi_jm = fPhi_m.paramCopy(); - mrcpp::cplxfunc::add(dfPhi_jm, 1.0, fPhi_j, -1.0, fPhi_m, -1.0); + auto dfPhi_jm = fPhi_m.paramCopy(true); + mrcpp::add(dfPhi_jm, 1.0, fPhi_j, -1.0, fPhi_m, -1.0); // Ref. Harrisons KAIN paper the following has the wrong sign, // but we define the updates (lowercase f) with opposite sign. - orbA(i, j) -= orbital::dot(dPhi_im, dfPhi_jm); + orbA(i, j) -= mrcpp::dot(dPhi_im, dfPhi_jm); } - orbB(i) += orbital::dot(dPhi_im, fPhi_m); + orbB(i) += mrcpp::dot(dPhi_im, fPhi_m); } } double alpha = (this->scaling.size() == nOrbitals) ? scaling[n] : 1.0; @@ -136,9 +136,9 @@ void KAIN::expandSolution(double prec, OrbitalVector &Phi, OrbitalVector &dPhi, int m = 0; for (int n = 0; n < nOrbitals; n++) { if (this->sepOrbitals) m = n; - if (mrcpp::mpi::my_orb(Phi[n])) { + if (mrcpp::mpi::my_func(Phi[n])) { std::vector totCoefs; - std::vector totOrbs; + std::vector> totOrbs; auto &phi_m = this->orbitals[nHistory][n]; auto &fPhi_m = this->dOrbitals[nHistory][n]; @@ -149,37 +149,36 @@ void KAIN::expandSolution(double prec, OrbitalVector &Phi, OrbitalVector &dPhi, // but we define the updates (lowercase f) with opposite sign // (but not the orbitals themselves). for (int j = 0; j < nHistory; j++) { - ComplexVector partCoefs(4); - std::vector partOrbs; + std::vector partCoefs(4); + std::vector> partOrbs; - partCoefs(0) = {1.0, 0.0}; + partCoefs[0] = {1.0, 0.0}; auto &phi_j = this->orbitals[j][n]; partOrbs.push_back(phi_j); - partCoefs(1) = {1.0, 0.0}; + partCoefs[1] = {1.0, 0.0}; auto &fPhi_j = this->dOrbitals[j][n]; partOrbs.push_back(fPhi_j); - partCoefs(2) = {-1.0, 0.0}; + partCoefs[2] = {-1.0, 0.0}; partOrbs.push_back(phi_m); - partCoefs(3) = {-1.0, 0.0}; + partCoefs[3] = {-1.0, 0.0}; partOrbs.push_back(fPhi_m); - auto partStep = phi_m.paramCopy(); - mrcpp::cplxfunc::linear_combination(partStep, partCoefs, partOrbs, prec); + auto partStep = phi_m.paramCopy(true); + mrcpp::linear_combination(partStep, partCoefs, partOrbs, prec); auto c_j = this->c[m](j); totCoefs.push_back(c_j); totOrbs.push_back(partStep); } - // std::vector -> ComplexVector - ComplexVector coefsVec(totCoefs.size()); - for (int i = 0; i < totCoefs.size(); i++) coefsVec(i) = totCoefs[i]; + std::vector coefsVec(totCoefs.size()); + for (int i = 0; i < totCoefs.size(); i++) coefsVec[i] = totCoefs[i]; - dPhi[n] = Phi[n].paramCopy(); - mrcpp::cplxfunc::linear_combination(dPhi[n], coefsVec, totOrbs, prec); + dPhi[n] = Phi[n].paramCopy(true); + mrcpp::linear_combination(dPhi[n], coefsVec, totOrbs, prec); } } diff --git a/src/scf_solver/LinearResponseSolver.cpp b/src/scf_solver/LinearResponseSolver.cpp index fc0f99038..4d0cd4bdb 100644 --- a/src/scf_solver/LinearResponseSolver.cpp +++ b/src/scf_solver/LinearResponseSolver.cpp @@ -76,7 +76,7 @@ json LinearResponseSolver::optimize(double omega, Molecule &mol, FockBuilder &F_ ComplexMatrix F_mat_y = F_mat_0 - omega * ComplexMatrix::Identity(Phi_0.size(), Phi_0.size()); RankZeroOperator V_0 = F_0.potential(); - RankZeroOperator V_1 = F_1.potential() + F_1.perturbation(); + RankZeroOperator V_1 = F_1.perturbation() + F_1.potential(); double err_o = 1.0; double err_t = 1.0; @@ -127,7 +127,7 @@ json LinearResponseSolver::optimize(double omega, Molecule &mol, FockBuilder &F_ mrcpp::print::time(2, "Applying V_1", t_lap); t_lap.start(); - mrcpp::mpifuncvec::orthogonalize(this->orth_prec, Psi_1, Phi_0); + mrcpp::orthogonalize(this->orth_prec, Psi_1, Phi_0); mrcpp::print::time(2, "Projecting (1 - rho_0)", t_lap); t_lap.start(); @@ -161,7 +161,7 @@ json LinearResponseSolver::optimize(double omega, Molecule &mol, FockBuilder &F_ kain_x.accelerate(orb_prec, X_n, dX_n); // Prepare for next iteration - X_n = orbital::add(1.0, X_n, 1.0, dX_n); + X_n = orbital::add(1.0, dX_n, 1.0, X_n); // The result inherits parameters from dX_n // Save checkpoint file if (this->checkpoint) orbital::save_orbitals(X_n, this->chkFileX); @@ -212,7 +212,7 @@ json LinearResponseSolver::optimize(double omega, Molecule &mol, FockBuilder &F_ kain_y.accelerate(orb_prec, Y_n, dY_n); // Prepare for next iteration - Y_n = orbital::add(1.0, Y_n, 1.0, dY_n); + Y_n = orbital::add(1.0, dY_n, 1.0, Y_n); // Save checkpoint file if (this->checkpoint) orbital::save_orbitals(Y_n, this->chkFileY); diff --git a/src/scf_solver/SCFSolver.cpp b/src/scf_solver/SCFSolver.cpp index 1dde77443..8ad2af6d8 100644 --- a/src/scf_solver/SCFSolver.cpp +++ b/src/scf_solver/SCFSolver.cpp @@ -197,8 +197,8 @@ void SCFSolver::printOrbitals(const DoubleVector &norms, const DoubleVector &err bool conv_i = (errors(i) < this->orbThrs) or (this->orbThrs < 0.0); std::stringstream o_row; o_row << std::setw(w1) << i; - o_row << std::setw(w2) << Phi[i].printSpin(); - o_row << std::setw(w3) << Phi[i].getNNodes(NUMBER::Total); + o_row << std::setw(w2) << Orbital(Phi[i]).printSpin(); + o_row << std::setw(w3) << Phi[i].getNNodes(); o_row << std::setw(w4) << std::setprecision(2 * pprec) << std::fixed << norms(i); o_row << std::setw(w6) << std::setprecision(pprec) << std::scientific << errors(i); o_row << std::setw(w5) << conv_i; diff --git a/src/surface_forces/LebedevData.cpp b/src/surface_forces/LebedevData.cpp index b6b2a9949..53211ce02 100644 --- a/src/surface_forces/LebedevData.cpp +++ b/src/surface_forces/LebedevData.cpp @@ -39,91 +39,85 @@ #include "detail/Lebedev_125_5294.hpp" #include "detail/Lebedev_131_5810.hpp" -auto -lebedev(size_t N) -> std::tuple -{ - std::array available = { - 6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, - 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810 - }; +auto lebedev(size_t N) -> std::tuple { + std::array available = {6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810}; - const auto lb = std::lower_bound(available.cbegin(), available.cend(), N); - auto closest = (lb == available.cend()) ? available.back() : *lb; + const auto lb = std::lower_bound(available.cbegin(), available.cend(), N); + auto closest = (lb == available.cend()) ? available.back() : *lb; - if (lb != available.cbegin()) { - auto prec = lb - 1; - if (std::abs(closest - N) > std::abs(*prec - N)) - closest = *prec; - } + if (lb != available.cbegin()) { + auto prec = lb - 1; + if (std::abs(closest - N) > std::abs(*prec - N)) closest = *prec; + } - switch (closest) { - case 6: - return detail::Lebedev_003_0006::quadrature(); - case 14: - return detail::Lebedev_005_0014::quadrature(); - case 26: - return detail::Lebedev_007_0026::quadrature(); - case 38: - return detail::Lebedev_009_0038::quadrature(); - case 50: - return detail::Lebedev_011_0050::quadrature(); - case 74: - return detail::Lebedev_013_0074::quadrature(); - case 86: - return detail::Lebedev_015_0086::quadrature(); - case 110: - return detail::Lebedev_017_0110::quadrature(); - case 146: - return detail::Lebedev_019_0146::quadrature(); - case 170: - return detail::Lebedev_021_0170::quadrature(); - case 194: - return detail::Lebedev_023_0194::quadrature(); - case 230: - return detail::Lebedev_025_0230::quadrature(); - case 266: - return detail::Lebedev_027_0266::quadrature(); - case 302: - return detail::Lebedev_029_0302::quadrature(); - case 350: - return detail::Lebedev_031_0350::quadrature(); - case 434: - return detail::Lebedev_035_0434::quadrature(); - case 590: - return detail::Lebedev_041_0590::quadrature(); - case 770: - return detail::Lebedev_047_0770::quadrature(); - case 974: - return detail::Lebedev_053_0974::quadrature(); - case 1202: - return detail::Lebedev_059_1202::quadrature(); - case 1454: - return detail::Lebedev_065_1454::quadrature(); - case 1730: - return detail::Lebedev_071_1730::quadrature(); - case 2030: - return detail::Lebedev_077_2030::quadrature(); - case 2354: - return detail::Lebedev_083_2354::quadrature(); - case 2702: - return detail::Lebedev_089_2702::quadrature(); - case 3074: - return detail::Lebedev_095_3074::quadrature(); - case 3470: - return detail::Lebedev_101_3470::quadrature(); - case 3890: - return detail::Lebedev_107_3890::quadrature(); - case 4334: - return detail::Lebedev_113_4334::quadrature(); - case 4802: - return detail::Lebedev_119_4802::quadrature(); - case 5294: - return detail::Lebedev_125_5294::quadrature(); - case 5810: - return detail::Lebedev_131_5810::quadrature(); + switch (closest) { + case 6: + return detail::Lebedev_003_0006::quadrature(); + case 14: + return detail::Lebedev_005_0014::quadrature(); + case 26: + return detail::Lebedev_007_0026::quadrature(); + case 38: + return detail::Lebedev_009_0038::quadrature(); + case 50: + return detail::Lebedev_011_0050::quadrature(); + case 74: + return detail::Lebedev_013_0074::quadrature(); + case 86: + return detail::Lebedev_015_0086::quadrature(); + case 110: + return detail::Lebedev_017_0110::quadrature(); + case 146: + return detail::Lebedev_019_0146::quadrature(); + case 170: + return detail::Lebedev_021_0170::quadrature(); + case 194: + return detail::Lebedev_023_0194::quadrature(); + case 230: + return detail::Lebedev_025_0230::quadrature(); + case 266: + return detail::Lebedev_027_0266::quadrature(); + case 302: + return detail::Lebedev_029_0302::quadrature(); + case 350: + return detail::Lebedev_031_0350::quadrature(); + case 434: + return detail::Lebedev_035_0434::quadrature(); + case 590: + return detail::Lebedev_041_0590::quadrature(); + case 770: + return detail::Lebedev_047_0770::quadrature(); + case 974: + return detail::Lebedev_053_0974::quadrature(); + case 1202: + return detail::Lebedev_059_1202::quadrature(); + case 1454: + return detail::Lebedev_065_1454::quadrature(); + case 1730: + return detail::Lebedev_071_1730::quadrature(); + case 2030: + return detail::Lebedev_077_2030::quadrature(); + case 2354: + return detail::Lebedev_083_2354::quadrature(); + case 2702: + return detail::Lebedev_089_2702::quadrature(); + case 3074: + return detail::Lebedev_095_3074::quadrature(); + case 3470: + return detail::Lebedev_101_3470::quadrature(); + case 3890: + return detail::Lebedev_107_3890::quadrature(); + case 4334: + return detail::Lebedev_113_4334::quadrature(); + case 4802: + return detail::Lebedev_119_4802::quadrature(); + case 5294: + return detail::Lebedev_125_5294::quadrature(); + case 5810: + return detail::Lebedev_131_5810::quadrature(); - default: - // FIXME error handling - std::abort(); - } + default: + // FIXME error handling + std::abort(); + } } \ No newline at end of file diff --git a/src/surface_forces/LebedevData.h b/src/surface_forces/LebedevData.h index eccc5e04e..0da0378d9 100644 --- a/src/surface_forces/LebedevData.h +++ b/src/surface_forces/LebedevData.h @@ -9,5 +9,4 @@ * @param[in] N * @return the weights and points. */ -auto -lebedev(size_t N) -> std::tuple; \ No newline at end of file +auto lebedev(size_t N) -> std::tuple; \ No newline at end of file diff --git a/src/surface_forces/SurfaceForce.cpp b/src/surface_forces/SurfaceForce.cpp index b3b9d8cbe..6afacf63a 100644 --- a/src/surface_forces/SurfaceForce.cpp +++ b/src/surface_forces/SurfaceForce.cpp @@ -10,8 +10,8 @@ #include "qmfunctions/orbital_utils.h" #include "qmoperators/one_electron/NablaOperator.h" -#include #include "qmoperators/one_electron/NuclearGradientOperator.h" +#include #include "chemistry/Molecule.h" #include "chemistry/Nucleus.h" @@ -20,19 +20,19 @@ #include #include "mrdft/Factory.h" +#include "mrdft/Functional.h" #include "mrdft/MRDFT.h" #include "mrdft/xc_utils.h" #include "qmoperators/two_electron/XCOperator.h" -#include "mrdft/Functional.h" #include "qmoperators/one_electron/HessianOperator.h" #include "tensor/RankOneOperator.h" #include "surface_forces/lebedev.h" #include "surface_forces/xcStress.h" -#include -#include #include +#include +#include #include @@ -50,7 +50,7 @@ namespace surface_force { * @param nucCharge The charges of the nuclei. Shape (nNuc,). * @param nucSmoothing The smoothing parameter for the nuclei. Shape (nNuc,). * @param gridPos The positions of the grid points where the field should be evaluated. Shape (nGrid, 3). -*/ + */ MatrixXd nuclearEfield(const MatrixXd &nucPos, const VectorXd &nucCharge, const VectorXd &nucSmoothing, const MatrixXd gridPos) { int nGrid = gridPos.rows(); int nNuc = nucPos.rows(); @@ -69,8 +69,7 @@ MatrixXd nuclearEfield(const MatrixXd &nucPos, const VectorXd &nucCharge, const c2 = c * c; c3 = c2 * c; c3_times_sqrt_pi_times_three = 3. * std::sqrt(M_PI) * c3; - for (int j = 0; j < nGrid; j++) - { + for (int j = 0; j < nGrid; j++) { r_vect = nucPos.row(i) - gridPos.row(j); r = r_vect.norm(); r2 = r * r; @@ -78,7 +77,7 @@ MatrixXd nuclearEfield(const MatrixXd &nucPos, const VectorXd &nucCharge, const Efield.row(j) += q * r_vect / r3; // This would compute the electric field for the finite point like nucleus. It does not improve accuracy since the integration speres // are large enough to not be affected by the finite point like nucleus. It is kept here for reference. - // Efield.row(j) += q * r_vect / r * (std::erf(r / c) / r2 - 2 * std::exp(-r2/c2)/(sqrt_pi * c * r) + 2.0 * r * std::exp(-r2 / c2) / c3_times_sqrt_pi_times_three + // Efield.row(j) += q * r_vect / r * (std::erf(r / c) / r2 - 2 * std::exp(-r2/c2)/(sqrt_pi * c * r) + 2.0 * r * std::exp(-r2 / c2) / c3_times_sqrt_pi_times_three // + 128.0 * r * std::exp(-4.0 * r2 / c2) / c3_times_sqrt_pi_times_three); } } @@ -87,9 +86,9 @@ MatrixXd nuclearEfield(const MatrixXd &nucPos, const VectorXd &nucCharge, const /** * @brief Calculates the coulomb potential due to the given density. -*/ -mrcpp::ComplexFunction calcPotential(Density &rho, mrcpp::PoissonOperator &poisson, double prec) { - mrcpp::ComplexFunction V(false); + */ +mrcpp::CompFunction<3> calcPotential(Density &rho, mrcpp::PoissonOperator &poisson, double prec) { + mrcpp::CompFunction<3> V(false); V.alloc(mrchem::NUMBER::Real); mrcpp::apply(prec, V.real(), poisson, rho.real()); return V; @@ -99,12 +98,11 @@ mrcpp::ComplexFunction calcPotential(Density &rho, mrcpp::PoissonOperator &poiss * @brief Calculates the electric field due to the electrons. * @param negEfield The negative gradient of the electric field. Shape (3,). * @param gridPos The positions of the grid points where the field should be evaluated. Shape (nGrid, 3). -*/ -MatrixXd electronicEfield(mrchem::OrbitalVector &negEfield, const MatrixXd &gridPos) { + */ +MatrixXd electronicEfield(std::vector &negEfield, const MatrixXd &gridPos) { int nGrid = gridPos.rows(); MatrixXd Efield = MatrixXd::Zero(nGrid, 3); - for (int i = 0; i < nGrid; i++) - { + for (int i = 0; i < nGrid; i++) { std::array pos = {gridPos(i, 0), gridPos(i, 1), gridPos(i, 2)}; Efield(i, 0) = -negEfield[0].real().evalf(pos); Efield(i, 1) = -negEfield[1].real().evalf(pos); @@ -119,23 +117,22 @@ MatrixXd electronicEfield(mrchem::OrbitalVector &negEfield, const MatrixXd &grid * @param negEfield Negative electric field (gradient of potential) * @param gridPos The positions of the grid points where the field should be evaluated. Shape (nGrid, 3). * @param prec The precision value used in the calculation. -*/ -std::vector maxwellStress(const Molecule &mol, mrchem::OrbitalVector &negEfield, const MatrixXd &gridPos, double prec){ + */ +std::vector maxwellStress(const Molecule &mol, std::vector &negEfield, const MatrixXd &gridPos, double prec) { int nGrid = gridPos.rows(); int nNuc = mol.getNNuclei(); Eigen::MatrixXd nucPos(nNuc, 3); Eigen::VectorXd nucCharge(nNuc); Eigen::VectorXd nucSmoothing(nNuc); - for (int i = 0; i < nNuc; i++) - { + for (int i = 0; i < nNuc; i++) { std::array coord = mol.getNuclei()[i].getCoord(); nucPos(i, 0) = coord[0]; nucPos(i, 1) = coord[1]; nucPos(i, 2) = coord[2]; nucCharge(i) = mol.getNuclei()[i].getCharge(); double tmp = 0.00435 * prec / std::pow(nucCharge(i), 5.0); - nucSmoothing(i) = std::cbrt(tmp); + nucSmoothing(i) = std::cbrt(tmp); } MatrixXd Efield = electronicEfield(negEfield, gridPos) + nuclearEfield(nucPos, nucCharge, nucSmoothing, gridPos); @@ -143,17 +140,11 @@ std::vector maxwellStress(const Molecule &mol, mrchem::OrbitalV std::vector stress(nGrid); for (int i = 0; i < nGrid; i++) { for (int i1 = 0; i1 < 3; i1++) { - for (int i2 = 0; i2 < 3; i2++) { - stress[i](i1, i2) = Efield(i, i1) * Efield(i, i2); - } + for (int i2 = 0; i2 < 3; i2++) { stress[i](i1, i2) = Efield(i, i1) * Efield(i, i2); } } - for (int i1 = 0; i1 < 3; i1++){ - stress[i](i1, i1) = stress[i](i1, i1) - 0.5 * (Efield(i, 0) * Efield(i, 0) + Efield(i, 1) * Efield(i, 1) + Efield(i, 2) * Efield(i, 2)); - } - for (int i1 = 0; i1 < 3; i1++){ - for (int i2 = 0; i2 < 3; i2++){ - stress[i](i1, i2) *= 1.0 / (4 * M_PI); - } + for (int i1 = 0; i1 < 3; i1++) { stress[i](i1, i1) = stress[i](i1, i1) - 0.5 * (Efield(i, 0) * Efield(i, 0) + Efield(i, 1) * Efield(i, 1) + Efield(i, 2) * Efield(i, 2)); } + for (int i1 = 0; i1 < 3; i1++) { + for (int i2 = 0; i2 < 3; i2++) { stress[i](i1, i2) *= 1.0 / (4 * M_PI); } } } return stress; @@ -161,9 +152,8 @@ std::vector maxwellStress(const Molecule &mol, mrchem::OrbitalV /** * @brief Calculates the kinetic stress tensor for the given molecule. See the function description for the formula. -*/ -std::vector kineticStress(const Molecule &mol, OrbitalVector &Phi, std::vector> &nablaPhi - , std::vector &hessRho, double prec, const MatrixXd &gridPos){ + */ +std::vector kineticStress(const Molecule &mol, OrbitalVector &Phi, std::vector> &nablaPhi, std::vector &hessRho, double prec, const MatrixXd &gridPos) { // original formula for kinetic stress: // sigma_ij = 0.5 \sum_k phi_k del_i del_j phi_k - (del_i phi_k) (del_j phi_k) @@ -183,26 +173,25 @@ std::vector kineticStress(const Molecule &mol, OrbitalVector &Phi, std std::array pos; double n1, n2, n3; - int occ; + double occ; for (int iOrb = 0; iOrb < Phi.size(); iOrb++) { occ = Phi[iOrb].occ(); - + for (int i = 0; i < nGrid; i++) { - if (mrcpp::mpi::my_orb(iOrb)) { - pos[0] = gridPos(i, 0); - pos[1] = gridPos(i, 1); - pos[2] = gridPos(i, 2); - n1 = nablaPhi[iOrb][0].real().evalf(pos); - n2 = nablaPhi[iOrb][1].real().evalf(pos); - n3 = nablaPhi[iOrb][2].real().evalf(pos); - voigtStress(i, 0) -= occ * n1 * n1; - voigtStress(i, 1) -= occ * n2 * n2; - voigtStress(i, 2) -= occ * n3 * n3; - voigtStress(i, 5) -= occ * n1 * n2; - voigtStress(i, 4) -= occ * n1 * n3; - voigtStress(i, 3) -= occ * n2 * n3; + if (mrcpp::mpi::my_func(iOrb)) { + pos[0] = gridPos(i, 0); + pos[1] = gridPos(i, 1); + pos[2] = gridPos(i, 2); + n1 = nablaPhi[iOrb][0].real().evalf(pos); + n2 = nablaPhi[iOrb][1].real().evalf(pos); + n3 = nablaPhi[iOrb][2].real().evalf(pos); + voigtStress(i, 0) -= occ * n1 * n1; + voigtStress(i, 1) -= occ * n2 * n2; + voigtStress(i, 2) -= occ * n3 * n3; + voigtStress(i, 5) -= occ * n1 * n2; + voigtStress(i, 4) -= occ * n1 * n3; + voigtStress(i, 3) -= occ * n2 * n3; } - } } mrcpp::mpi::allreduce_matrix(voigtStress, mrcpp::mpi::comm_wrk); @@ -219,9 +208,7 @@ std::vector kineticStress(const Molecule &mol, OrbitalVector &Phi, std } for (int i = 0; i < nGrid; i++) { - stress[i] << voigtStress(i, 0), voigtStress(i, 5), voigtStress(i, 4), - voigtStress(i, 5), voigtStress(i, 1), voigtStress(i, 3), - voigtStress(i, 4), voigtStress(i, 3), voigtStress(i, 2); + stress[i] << voigtStress(i, 0), voigtStress(i, 5), voigtStress(i, 4), voigtStress(i, 5), voigtStress(i, 1), voigtStress(i, 3), voigtStress(i, 4), voigtStress(i, 3), voigtStress(i, 2); } return stress; } @@ -232,21 +219,19 @@ std::vector kineticStress(const Molecule &mol, OrbitalVector &Phi, std * @param pos The matrix containing the positions of the points. Shape (nPoints, 3). * @return A vector containing the distances to the nearest neighbor for each point. */ -VectorXd distanceToNearestNeighbour(MatrixXd pos){ +VectorXd distanceToNearestNeighbour(MatrixXd pos) { int n = pos.rows(); VectorXd dist(n); double temp; - if (n == 1){ + if (n == 1) { dist(0) = 1.0; } else { - for (int i = 0; i < n; i++){ + for (int i = 0; i < n; i++) { dist(i) = (pos.row(i) - pos.row((i + 1) % n)).norm(); - for (int j = 0; j < n; j++){ - if (i != j){ + for (int j = 0; j < n; j++) { + if (i != j) { temp = (pos.row(i) - pos.row(j)).norm(); - if (temp < dist(i)){ - dist(i) = temp; - } + if (temp < dist(i)) { dist(i) = temp; } } } } @@ -263,12 +248,9 @@ VectorXd distanceToNearestNeighbour(MatrixXd pos){ * @param json_fock The JSON object containing the Fock matrix settings. * @return The matrix of forces, shape (nAtoms, 3). */ -Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi, double prec, const json &json_fock - , std::string leb_prec, double radius_factor) { +Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi, double prec, const json &json_fock, std::string leb_prec, double radius_factor) { - if (radius_factor > 0.95 && radius_factor < 0.05){ - MSG_ABORT("Invalid value of radius_factor") - } + if (radius_factor > 0.95 && radius_factor < 0.05) { MSG_ABORT("Invalid value of radius_factor") } // setup density mrchem::Density rho(false); @@ -283,8 +265,8 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi mrchem::NablaOperator nabla(mrcd); nabla.setup(prec); double abs_prec = prec / mrchem::orbital::get_electron_number(Phi); - mrcpp::ComplexFunction pot = calcPotential(rho, poisson_op, abs_prec); - mrchem::OrbitalVector negEfield = nabla(pot); + mrcpp::CompFunction<3> pot = calcPotential(rho, poisson_op, abs_prec); + std::vector negEfield = nabla(pot); // set up operators for kinetic stress: int derivOrder1 = 1; @@ -297,9 +279,7 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi std::vector> nablaPhi(Phi.size()); std::vector hessRho = hess(rho); for (int i = 0; i < Phi.size(); i++) { - if (mrcpp::mpi::my_orb(i)) { - nablaPhi[i] = nabla(Phi[i]); - } + if (mrcpp::mpi::my_func(i)) { nablaPhi[i] = nabla(Phi[i]); } } // setup xc stuff: int order = 0; @@ -309,7 +289,7 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi auto xc_cutoff = json_xcfunc["cutoff"]; auto xc_funcs = json_xcfunc["functionals"]; auto xc_order = order + 1; - auto funcVectorShared = std::make_shared(Phi); + auto funcVectorShared = std::make_shared(Phi); mrdft::Factory xc_factory(*MRA); xc_factory.setSpin(xc_spin); @@ -355,14 +335,11 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi int nTinyPoints = 1; if (leb_prec == "low") { nLebPoints = 194; - } - else if (leb_prec == "medium"){ + } else if (leb_prec == "medium") { nLebPoints = 434; - } - else if (leb_prec == "high") { + } else if (leb_prec == "high") { nLebPoints = 770; - } - else { + } else { MSG_ABORT("Invalid lebedev precision"); } @@ -379,14 +356,12 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi MatrixXd gridPos = integrator.getPoints(); VectorXd weights = integrator.getWeights(); MatrixXd normals = integrator.getNormals(); - std::vector xcStress = getXCStress(mrdft_p, *xc_pot_vector, std::make_shared(Phi), - std::make_shared(nabla), gridPos, xc_spin, prec); - - + std::vector xcStress = getXCStress(mrdft_p, *xc_pot_vector, std::make_shared(Phi), std::make_shared(nabla), gridPos, xc_spin, prec); + std::vector kstress = kineticStress(mol, Phi, nablaPhi, hessRho, prec, gridPos); std::vector mstress = maxwellStress(mol, negEfield, gridPos, prec); std::vector stress(integrator.n); - for (int i = 0; i < integrator.n; i++){ + for (int i = 0; i < integrator.n; i++) { stress[i] = xcStress[i] + kstress[i] + mstress[i]; forces.row(iAtom) -= stress[i] * normals.row(i).transpose() * weights(i); } diff --git a/src/surface_forces/SurfaceForce.h b/src/surface_forces/SurfaceForce.h index 00c570c1d..93cee4337 100644 --- a/src/surface_forces/SurfaceForce.h +++ b/src/surface_forces/SurfaceForce.h @@ -1,20 +1,18 @@ #ifndef SURFACEFORCE_H #define SURFACEFORCE_H -#include -#include "qmfunctions/Orbital.h" #include "chemistry/Molecule.h" -#include +#include "qmfunctions/Orbital.h" #include +#include #include +#include namespace surface_force { // Function declaration -Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi, double prec - , const json &json_fock, std::string leb_prec, double radius_factor); +Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi, double prec, const json &json_fock, std::string leb_prec, double radius_factor); } // namespace surface_force #endif // SURFACEFORCE_H - diff --git a/src/surface_forces/detail/lebedev_utils.cpp b/src/surface_forces/detail/lebedev_utils.cpp index cf231d5a5..2811ba5e6 100644 --- a/src/surface_forces/detail/lebedev_utils.cpp +++ b/src/surface_forces/detail/lebedev_utils.cpp @@ -6,167 +6,141 @@ #include namespace detail { -auto -a1(double w) -> std::tuple, Eigen::Matrix> -{ - auto a = 1.0; +auto a1(double w) -> std::tuple, Eigen::Matrix> { + auto a = 1.0; - Eigen::Matrix xs{ { +a, -a, 0.0, 0.0, 0.0, 0.0 }, - { 0.0, 0.0, +a, -a, 0.0, 0.0 }, - { 0.0, 0.0, 0.0, 0.0, +a, -a } }; + Eigen::Matrix xs{{+a, -a, 0.0, 0.0, 0.0, 0.0}, {0.0, 0.0, +a, -a, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0, +a, -a}}; - return { Eigen::Matrix::Constant(w), xs }; + return {Eigen::Matrix::Constant(w), xs}; } -auto -a2(double w) -> std::tuple, Eigen::Matrix> -{ - auto a = 1.0 / std::sqrt(2); +auto a2(double w) -> std::tuple, Eigen::Matrix> { + auto a = 1.0 / std::sqrt(2); - Eigen::Matrix xs{ { +a, +a, -a, -a, +a, +a, -a, -a, 0., 0., 0., 0. }, - { +a, -a, +a, -a, 0., 0., 0., 0., +a, +a, -a, -a }, - { 0., 0., 0., 0., +a, -a, +a, -a, +a, -a, +a, -a } }; + Eigen::Matrix xs{{+a, +a, -a, -a, +a, +a, -a, -a, 0., 0., 0., 0.}, {+a, -a, +a, -a, 0., 0., 0., 0., +a, +a, -a, -a}, {0., 0., 0., 0., +a, -a, +a, -a, +a, -a, +a, -a}}; - return { Eigen::Matrix::Constant(w), xs }; + return {Eigen::Matrix::Constant(w), xs}; } -auto -a3(double w) -> std::tuple, Eigen::Matrix> -{ - auto a = 1.0 / std::sqrt(3); +auto a3(double w) -> std::tuple, Eigen::Matrix> { + auto a = 1.0 / std::sqrt(3); - Eigen::Matrix xs{ { +a, +a, +a, +a, -a, -a, -a, -a }, - { +a, +a, -a, -a, +a, +a, -a, -a }, - { +a, -a, +a, -a, +a, -a, +a, -a } }; + Eigen::Matrix xs{{+a, +a, +a, +a, -a, -a, -a, -a}, {+a, +a, -a, -a, +a, +a, -a, -a}, {+a, -a, +a, -a, +a, -a, +a, -a}}; - return { Eigen::Matrix::Constant(w), xs }; + return {Eigen::Matrix::Constant(w), xs}; } -auto -pq0(double w, double x) -> std::tuple, Eigen::Matrix> -{ - auto a = std::sin(x * M_PI); - auto b = std::cos(x * M_PI); +auto pq0(double w, double x) -> std::tuple, Eigen::Matrix> { + auto a = std::sin(x * M_PI); + auto b = std::cos(x * M_PI); - Eigen::Matrix xs{ - { +a, -a, -a, +a, +b, -b, -b, +b, +a, -a, -a, +a, +b, -b, -b, +b, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, - { +b, +b, -b, -b, +a, +a, -a, -a, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, +a, -a, -a, +a, +b, -b, -b, +b }, - { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, +b, +b, -b, -b, +a, +a, -a, -a, +b, +b, -b, -b, +a, +a, -a, -a } - }; + Eigen::Matrix xs{{+a, -a, -a, +a, +b, -b, -b, +b, +a, -a, -a, +a, +b, -b, -b, +b, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, + {+b, +b, -b, -b, +a, +a, -a, -a, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, +a, -a, -a, +a, +b, -b, -b, +b}, + {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, +b, +b, -b, -b, +a, +a, -a, -a, +b, +b, -b, -b, +a, +a, -a, -a}}; - return { Eigen::Matrix::Constant(w), xs }; + return {Eigen::Matrix::Constant(w), xs}; } -auto -llm(double w, double x) -> std::tuple, Eigen::Matrix> -{ - auto a = std::sin(x * M_PI) / std::sqrt(2); - auto b = std::cos(x * M_PI); +auto llm(double w, double x) -> std::tuple, Eigen::Matrix> { + auto a = std::sin(x * M_PI) / std::sqrt(2); + auto b = std::cos(x * M_PI); - Eigen::Matrix xs{ - { +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +b, +b, +b, +b, -b, -b, -b, -b }, - { +a, +a, -a, -a, +a, +a, -a, -a, +b, +b, +b, +b, -b, -b, -b, -b, +a, -a, +a, -a, +a, -a, +a, -a }, - { +b, +b, +b, +b, -b, -b, -b, -b, +a, +a, -a, -a, +a, +a, -a, -a, +a, +a, -a, -a, +a, +a, -a, -a } - }; + Eigen::Matrix xs{{+a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +a, -a, +b, +b, +b, +b, -b, -b, -b, -b}, + {+a, +a, -a, -a, +a, +a, -a, -a, +b, +b, +b, +b, -b, -b, -b, -b, +a, -a, +a, -a, +a, -a, +a, -a}, + {+b, +b, +b, +b, -b, -b, -b, -b, +a, +a, -a, -a, +a, +a, -a, -a, +a, +a, -a, -a, +a, +a, -a, -a}}; - return { Eigen::Matrix::Constant(w), xs }; + return {Eigen::Matrix::Constant(w), xs}; } -auto -rsw(double w, double x, double y) -> std::tuple, Eigen::Matrix> -{ - auto sinx = std::sin(x * M_PI); - auto siny = std::sin(y * M_PI); - auto cosx = std::cos(x * M_PI); - auto cosy = std::cos(y * M_PI); - - auto a = sinx * cosy; - auto b = sinx * siny; - auto c = cosx; - - Eigen::Matrix xs{ - { +a, +c, +b, +b, +c, +a, -a, +c, +b, +b, +c, -a, +a, +c, -b, -b, +c, +a, +a, -c, +b, +b, -c, +a, - -a, +c, -b, -b, +c, -a, -a, -c, +b, +b, -c, -a, +a, -c, -b, -b, -c, +a, -a, -c, -b, -b, -c, -a }, - { +b, +a, +c, +a, +b, +c, +b, -a, +c, -a, +b, +c, -b, +a, +c, +a, -b, +c, +b, +a, -c, +a, +b, -c, - -b, -a, +c, -a, -b, +c, +b, -a, -c, -a, +b, -c, -b, +a, -c, +a, -b, -c, -b, -a, -c, -a, -b, -c }, - { +c, +b, +a, +c, +a, +b, +c, +b, -a, +c, -a, +b, +c, -b, +a, +c, +a, -b, -c, +b, +a, -c, +a, +b, - +c, -b, -a, +c, -a, -b, -c, +b, -a, -c, -a, +b, -c, -b, +a, -c, +a, -b, -c, -b, -a, -c, -a, -b } - }; - - return { Eigen::Matrix::Constant(w), xs }; +auto rsw(double w, double x, double y) -> std::tuple, Eigen::Matrix> { + auto sinx = std::sin(x * M_PI); + auto siny = std::sin(y * M_PI); + auto cosx = std::cos(x * M_PI); + auto cosy = std::cos(y * M_PI); + + auto a = sinx * cosy; + auto b = sinx * siny; + auto c = cosx; + + Eigen::Matrix xs{{+a, +c, +b, +b, +c, +a, -a, +c, +b, +b, +c, -a, +a, +c, -b, -b, +c, +a, +a, -c, +b, +b, -c, +a, + -a, +c, -b, -b, +c, -a, -a, -c, +b, +b, -c, -a, +a, -c, -b, -b, -c, +a, -a, -c, -b, -b, -c, -a}, + {+b, +a, +c, +a, +b, +c, +b, -a, +c, -a, +b, +c, -b, +a, +c, +a, -b, +c, +b, +a, -c, +a, +b, -c, + -b, -a, +c, -a, -b, +c, +b, -a, -c, -a, +b, -c, -b, +a, -c, +a, -b, -c, -b, -a, -c, -a, -b, -c}, + {+c, +b, +a, +c, +a, +b, +c, +b, -a, +c, -a, +b, +c, -b, +a, +c, +a, -b, -c, +b, +a, -c, +a, +b, + +c, -b, -a, +c, -a, -b, -c, +b, -a, -c, -a, +b, -c, -b, +a, -c, +a, -b, -c, -b, -a, -c, -a, -b}}; + + return {Eigen::Matrix::Constant(w), xs}; } -auto -n_points_to_degree(size_t N) -> size_t -{ - switch (N) { - case 6: - return 3; - case 14: - return 5; - case 26: - return 7; - case 38: - return 9; - case 50: - return 11; - case 74: - return 13; - case 86: - return 15; - case 110: - return 17; - case 146: - return 19; - case 170: - return 21; - case 194: - return 23; - case 230: - return 25; - case 266: - return 27; - case 302: - return 39; - case 350: - return 31; - case 434: - return 35; - case 590: - return 41; - case 770: - return 47; - case 974: - return 53; - case 1202: - return 59; - case 1454: - return 65; - case 1730: - return 71; - case 2030: - return 77; - case 2354: - return 83; - case 2702: - return 89; - case 3074: - return 95; - case 3470: - return 101; - case 3890: - return 107; - case 4334: - return 113; - case 4802: - return 119; - case 5294: - return 125; - case 5810: - return 131; - default: - // FIXME error handling - std::abort(); - } +auto n_points_to_degree(size_t N) -> size_t { + switch (N) { + case 6: + return 3; + case 14: + return 5; + case 26: + return 7; + case 38: + return 9; + case 50: + return 11; + case 74: + return 13; + case 86: + return 15; + case 110: + return 17; + case 146: + return 19; + case 170: + return 21; + case 194: + return 23; + case 230: + return 25; + case 266: + return 27; + case 302: + return 39; + case 350: + return 31; + case 434: + return 35; + case 590: + return 41; + case 770: + return 47; + case 974: + return 53; + case 1202: + return 59; + case 1454: + return 65; + case 1730: + return 71; + case 2030: + return 77; + case 2354: + return 83; + case 2702: + return 89; + case 3074: + return 95; + case 3470: + return 101; + case 3890: + return 107; + case 4334: + return 113; + case 4802: + return 119; + case 5294: + return 125; + case 5810: + return 131; + default: + // FIXME error handling + std::abort(); + } } } // namespace detail diff --git a/src/surface_forces/lebedev.cpp b/src/surface_forces/lebedev.cpp index 61acd2239..c6111c54f 100644 --- a/src/surface_forces/lebedev.cpp +++ b/src/surface_forces/lebedev.cpp @@ -4,103 +4,102 @@ */ #include "lebedev.h" -#include +#include "surface_forces/LebedevData.h" +#include +#include #include +#include #include #include -#include -#include -#include "surface_forces/LebedevData.h" +/** + * @brief Constructor for the LebedevIntegrator class. + * @param filename The name of the file containing the Lebedev grid data. + * @param radius The radius of the sphere. + * @param center Center of the sphere. + */ +LebedevIntegrator::LebedevIntegrator(int nPoints, double radius, const Eigen::Vector3d ¢er) { + getLebedevData(nPoints); + calculateCartesianPoints(radius, center); +} - /** - * @brief Constructor for the LebedevIntegrator class. - * @param filename The name of the file containing the Lebedev grid data. - * @param radius The radius of the sphere. - * @param center Center of the sphere. - */ - LebedevIntegrator::LebedevIntegrator(int nPoints, double radius, const Eigen::Vector3d& center) { - getLebedevData(nPoints); - calculateCartesianPoints(radius, center); - } +/** + * @brief Get the Cartesian coordinates of the Lebedev grid points. + * @return A matrix containing the Cartesian coordinates of the Lebedev grid points. + */ +Eigen::MatrixXd LebedevIntegrator::getPoints() const { + return points; +} - /** - * @brief Get the Cartesian coordinates of the Lebedev grid points. - * @return A matrix containing the Cartesian coordinates of the Lebedev grid points. - */ - Eigen::MatrixXd LebedevIntegrator::getPoints() const { return points; } - - /** - * @brief Get the weights associated with each Lebedev grid point. - * @return A vector containing the weights associated with each Lebedev grid point. - */ - Eigen::VectorXd LebedevIntegrator::getWeights() const { return weights; } - - /** - * @brief Get the normal vectors at each Lebedev grid point. - * @return A matrix containing the normal vectors at each Lebedev grid point. - */ - Eigen::MatrixXd LebedevIntegrator::getNormals() const { return normals; } - - /** - * @brief Read the Lebedev grid data from a file. - * @param filename The name of the file containing the Lebedev grid data. - * @throw std::runtime_error if the file cannot be opened. - */ - void LebedevIntegrator::readLebedevFile(const std::string& filename) { - std::ifstream file(filename); - if (!file.is_open()) { - throw std::runtime_error("Could not open the lebedev data file."); - } - std::string line; - std::vector thetaVec, phiVec, weightVec; +/** + * @brief Get the weights associated with each Lebedev grid point. + * @return A vector containing the weights associated with each Lebedev grid point. + */ +Eigen::VectorXd LebedevIntegrator::getWeights() const { + return weights; +} - while (getline(file, line)) { - double theta, phi, weight; - std::istringstream iss(line); - if (!(iss >> theta >> phi >> weight)) { break; } // error +/** + * @brief Get the normal vectors at each Lebedev grid point. + * @return A matrix containing the normal vectors at each Lebedev grid point. + */ +Eigen::MatrixXd LebedevIntegrator::getNormals() const { + return normals; +} - thetaVec.push_back(theta * M_PI / 180.0); - phiVec.push_back(phi * M_PI / 180.0); - weightVec.push_back(weight); - } +/** + * @brief Read the Lebedev grid data from a file. + * @param filename The name of the file containing the Lebedev grid data. + * @throw std::runtime_error if the file cannot be opened. + */ +void LebedevIntegrator::readLebedevFile(const std::string &filename) { + std::ifstream file(filename); + if (!file.is_open()) { throw std::runtime_error("Could not open the lebedev data file."); } + std::string line; + std::vector thetaVec, phiVec, weightVec; + + while (getline(file, line)) { + double theta, phi, weight; + std::istringstream iss(line); + if (!(iss >> theta >> phi >> weight)) { break; } // error + + thetaVec.push_back(theta * M_PI / 180.0); + phiVec.push_back(phi * M_PI / 180.0); + weightVec.push_back(weight); + } - n = thetaVec.size(); - points = Eigen::MatrixXd(n, 3); - weights = Eigen::VectorXd(n); - normals = Eigen::MatrixXd(n, 3); + n = thetaVec.size(); + points = Eigen::MatrixXd(n, 3); + weights = Eigen::VectorXd(n); + normals = Eigen::MatrixXd(n, 3); - for (int i = 0; i < n; ++i) { - weights[i] = weightVec[i]; - normals.row(i) << cos(thetaVec[i]) * sin(phiVec[i]), sin(thetaVec[i]) * sin(phiVec[i]), cos(phiVec[i]); - } + for (int i = 0; i < n; ++i) { + weights[i] = weightVec[i]; + normals.row(i) << cos(thetaVec[i]) * sin(phiVec[i]), sin(thetaVec[i]) * sin(phiVec[i]), cos(phiVec[i]); } +} - /** - * @brief Get the Lebedev data for a given number of grid points. - * @param n The number of Lebedev grid points. - */ - void LebedevIntegrator::getLebedevData(int nPoints) { - std::tuple dat = lebedev(nPoints); - weights = std::get<0>(dat); - n = weights.size(); - normals = std::get<1>(dat).transpose(); - points = Eigen::MatrixXd(n, 3); - } - - - /** - * @brief Calculate the Cartesian coordinates of the Lebedev grid points. - * @param radius The radius of the sphere. - * @param center Center of the sphere. - */ - void LebedevIntegrator::calculateCartesianPoints(double radius, const Eigen::Vector3d ¢er) { - for (int i = 0; i < n; ++i) { - points.row(i) = radius * normals.row(i) + center.transpose(); - } - weights *= 4.0 * M_PI * radius * radius; - } +/** + * @brief Get the Lebedev data for a given number of grid points. + * @param n The number of Lebedev grid points. + */ +void LebedevIntegrator::getLebedevData(int nPoints) { + std::tuple dat = lebedev(nPoints); + weights = std::get<0>(dat); + n = weights.size(); + normals = std::get<1>(dat).transpose(); + points = Eigen::MatrixXd(n, 3); +} +/** + * @brief Calculate the Cartesian coordinates of the Lebedev grid points. + * @param radius The radius of the sphere. + * @param center Center of the sphere. + */ +void LebedevIntegrator::calculateCartesianPoints(double radius, const Eigen::Vector3d ¢er) { + for (int i = 0; i < n; ++i) { points.row(i) = radius * normals.row(i) + center.transpose(); } + weights *= 4.0 * M_PI * radius * radius; +} /* This can be used for testing the LebedevIntegrator class. @@ -122,7 +121,7 @@ int main() { { fields.row(i) = fields.row(i) / (fields.row(i).norm() * fields.row(i).norm() * fields.row(i).norm()); } - + double integral = 0.0; for (int i = 0; i < integrator.n; i++) { @@ -135,7 +134,7 @@ int main() { pots = pots.cwiseProduct(pots); double potIntegral = integrator.getWeights().dot(pots); std::cout << "Potential Integral: " << potIntegral << " Reference 1 " << 1 << std::endl; - + } catch (const std::exception& e) { std::cerr << "Exception: " << e.what() << std::endl; diff --git a/src/surface_forces/lebedev.h b/src/surface_forces/lebedev.h index 5a93bca9c..e25d14f0c 100644 --- a/src/surface_forces/lebedev.h +++ b/src/surface_forces/lebedev.h @@ -6,19 +6,19 @@ class LebedevIntegrator { public: - Eigen::MatrixXd points; /**< Matrix storing the Cartesian coordinates of the Lebedev grid points. */ + Eigen::MatrixXd points; /**< Matrix storing the Cartesian coordinates of the Lebedev grid points. */ Eigen::VectorXd weights; /**< Vector storing the weights associated with each Lebedev grid point. */ Eigen::MatrixXd normals; /**< Matrix storing the normal vectors (to the integration sphere) at each Lebedev grid point. */ - int n; /**< Number of Lebedev grid points. */ + int n; /**< Number of Lebedev grid points. */ - - LebedevIntegrator(int nPoints, double radius, const Eigen::Vector3d& center); + LebedevIntegrator(int nPoints, double radius, const Eigen::Vector3d ¢er); Eigen::MatrixXd getPoints() const; Eigen::VectorXd getWeights() const; Eigen::MatrixXd getNormals() const; + private: void getLebedevData(int nPoints); - void readLebedevFile(const std::string& filename); + void readLebedevFile(const std::string &filename); void calculateCartesianPoints(double radius, const Eigen::Vector3d ¢er); }; diff --git a/src/surface_forces/xcStress.cpp b/src/surface_forces/xcStress.cpp index c5ce74041..200abd205 100644 --- a/src/surface_forces/xcStress.cpp +++ b/src/surface_forces/xcStress.cpp @@ -1,9 +1,8 @@ #include "surface_forces/xcStress.h" -#include "qmfunctions/Density.h" -#include "qmfunctions/Orbital.h" #include "mrdft/MRDFT.h" #include "qmfunctions/Density.h" +#include "qmfunctions/Orbital.h" #include "qmfunctions/density_utils.h" #include "qmoperators/one_electron/NablaOperator.h" @@ -11,37 +10,35 @@ using namespace Eigen; using namespace mrchem; using namespace std; -namespace surface_force{ +namespace surface_force { /** * @brief Compute the exchange-correlation stress tensor for LDA functional - * + * * @param mrdft_p MRDFT object * @param rhoGrid MatrixXd with density values, shape (nGrid, 1) * @return std::vector vector of 3x3 matrices with stress tensor at each grid point */ -std::vector xcLDAStress(unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid){ +std::vector xcLDAStress(unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid) { int nGrid = rhoGrid.rows(); std::vector out(nGrid); - Eigen::MatrixXd xcOUT = mrdft_p->functional().evaluate_transposed(rhoGrid); + Eigen::MatrixXd xcOUT = mrdft_p->functional().evaluate_transposed(rhoGrid); for (int i = 0; i < nGrid; i++) { out[i] = Matrix3d::Zero(); - for (int j = 0; j < 3; j++) { - out[i](j, j) = xcOUT(i, 0) - xcOUT(i, 1) * rhoGrid(i); - } + for (int j = 0; j < 3; j++) { out[i](j, j) = xcOUT(i, 0) - xcOUT(i, 1) * rhoGrid(i); } } return out; } /** * @brief Compute the exchange-correlation stress tensor for LDA functional for open shell systems - * + * * @param mrdft_p MRDFT object * @param rhoGridAlpha MatrixXd with alpha density values, shape (nGrid, 1) * @param rhoGridBeta MatrixXd with beta density values, shape (nGrid, 1) * @return std::vector vector of 3x3 matrices with stress tensor at each grid point */ -std::vector xcLDASpinStress(unique_ptr &mrdft_p, MatrixXd &rhoGridAlpha, MatrixXd &rhoGridBeta){ +std::vector xcLDASpinStress(unique_ptr &mrdft_p, MatrixXd &rhoGridAlpha, MatrixXd &rhoGridBeta) { int nGrid = rhoGridAlpha.rows(); Eigen::MatrixXd inp(rhoGridAlpha.rows(), 2); std::vector out = std::vector(nGrid); @@ -50,29 +47,27 @@ std::vector xcLDASpinStress(unique_ptr &mrdft_p, MatrixX Eigen::MatrixXd xc = mrdft_p->functional().evaluate_transposed(inp); for (int i = 0; i < rhoGridAlpha.rows(); i++) { out[i] = Matrix3d::Zero(); - for (int j = 0; j < 3; j++) { - out[i](j, j) = xc(i, 0) - xc(i, 1) * rhoGridAlpha(i) - xc(i, 2) * rhoGridBeta(i); - } + for (int j = 0; j < 3; j++) { out[i](j, j) = xc(i, 0) - xc(i, 1) * rhoGridAlpha(i) - xc(i, 2) * rhoGridBeta(i); } } return out; } /** * @brief Compute the exchange-correlation stress tensor for GGA functional - * + * * @param mrdft_p MRDFT object * @param rhoGrid MatrixXd with density values, shape (nGrid, 1) * @param nablaRhoGrid MatrixXd with gradient of density values, shape (nGrid, 3) * @return std::vector vector of 3x3 matrices with stress tensor at each grid point */ -std::vector xcGGAStress(unique_ptr &mrdft_p, mrcpp::FunctionTreeVector<3> &xc_pots, MatrixXd &rhoGrid, MatrixXd &nablaRhoGrid, Eigen::MatrixXd &gridPos){ +std::vector xcGGAStress(unique_ptr &mrdft_p, mrcpp::FunctionTreeVector<3> &xc_pots, MatrixXd &rhoGrid, MatrixXd &nablaRhoGrid, Eigen::MatrixXd &gridPos) { int nGrid = rhoGrid.rows(); Eigen::MatrixXd inp(rhoGrid.rows(), 4); inp.col(0) = rhoGrid.col(0); inp.col(1) = nablaRhoGrid.col(0); inp.col(2) = nablaRhoGrid.col(1); inp.col(3) = nablaRhoGrid.col(2); - Eigen::MatrixXd xcOUT = mrdft_p->functional().evaluate_transposed(inp); + Eigen::MatrixXd xcOUT = mrdft_p->functional().evaluate_transposed(inp); std::vector out(nGrid); std::array pos; for (int i = 0; i < rhoGrid.rows(); i++) { @@ -80,13 +75,9 @@ std::vector xcGGAStress(unique_ptr &mrdft_p, mrcpp::Func pos[0] = gridPos(i, 0); pos[1] = gridPos(i, 1); pos[2] = gridPos(i, 2); - for (int j = 0; j < 3; j++) { - out[i](j, j) = xcOUT(i, 0) - rhoGrid(i) * std::get<1>(xc_pots[0])->evalf(pos); - } + for (int j = 0; j < 3; j++) { out[i](j, j) = xcOUT(i, 0) - rhoGrid(i) * std::get<1>(xc_pots[0])->evalf(pos); } for (int j1 = 0; j1 < 3; j1++) { - for (int j2 = 0; j2 < 3; j2++) { - out[i](j1, j2) = out[i](j1, j2) - xcOUT(i, 2 + j1) * nablaRhoGrid(i, j2); - } + for (int j2 = 0; j2 < 3; j2++) { out[i](j1, j2) = out[i](j1, j2) - xcOUT(i, 2 + j1) * nablaRhoGrid(i, j2); } } } return out; @@ -94,7 +85,7 @@ std::vector xcGGAStress(unique_ptr &mrdft_p, mrcpp::Func /** * @brief Compute the exchange-correlation stress tensor for GGA functional for open shell systems - * + * * @param mrdft_p MRDFT object * @param rhoGridAlpha MatrixXd with alpha density values, shape (nGrid, 1) * @param rhoGridBeta MatrixXd with beta density values, shape (nGrid, 1) @@ -102,7 +93,13 @@ std::vector xcGGAStress(unique_ptr &mrdft_p, mrcpp::Func * @param nablaRhoGridBeta MatrixXd with gradient of beta density values, shape (nGrid, 3) * @return std::vector vector of 3x3 matrices with stress tensor at each grid point */ -std::vector xcGGASpinStress(unique_ptr &mrdft_p, mrcpp::FunctionTreeVector<3> &xc_pots, MatrixXd &rhoGridAlpha, MatrixXd &rhoGridBeta, MatrixXd &nablaRhoGridAlpha, MatrixXd &nablaRhoGridBeta, Eigen::MatrixXd &gridPos){ +std::vector xcGGASpinStress(unique_ptr &mrdft_p, + mrcpp::FunctionTreeVector<3> &xc_pots, + MatrixXd &rhoGridAlpha, + MatrixXd &rhoGridBeta, + MatrixXd &nablaRhoGridAlpha, + MatrixXd &nablaRhoGridBeta, + Eigen::MatrixXd &gridPos) { int nGrid = rhoGridAlpha.rows(); Eigen::MatrixXd inp(rhoGridAlpha.rows(), 8); std::vector out = std::vector(nGrid); @@ -121,14 +118,9 @@ std::vector xcGGASpinStress(unique_ptr &mrdft_p, mrcpp:: pos[0] = gridPos(i, 0); pos[1] = gridPos(i, 1); pos[2] = gridPos(i, 2); - for (int j = 0; j < 3; j++) { - out[i](j, j) = xc(i, 0) - std::get<1>(xc_pots[0])->evalf(pos) * rhoGridAlpha(i) - std::get<1>(xc_pots[1])->evalf(pos) * rhoGridBeta(i); - } + for (int j = 0; j < 3; j++) { out[i](j, j) = xc(i, 0) - std::get<1>(xc_pots[0])->evalf(pos) * rhoGridAlpha(i) - std::get<1>(xc_pots[1])->evalf(pos) * rhoGridBeta(i); } for (int j1 = 0; j1 < 3; j1++) { - for (int j2 = 0; j2 < 3; j2++) { - out[i](j1, j2) = out[i](j1, j2) - - xc(i, 3 + j1) * nablaRhoGridAlpha(i, j2) - xc(i, 6 + j1) * nablaRhoGridBeta(i, j2); - } + for (int j2 = 0; j2 < 3; j2++) { out[i](j1, j2) = out[i](j1, j2) - xc(i, 3 + j1) * nablaRhoGridAlpha(i, j2) - xc(i, 6 + j1) * nablaRhoGridBeta(i, j2); } } } return out; @@ -136,7 +128,7 @@ std::vector xcGGASpinStress(unique_ptr &mrdft_p, mrcpp:: /** * @brief Compute the exchange-correlation stress tensor on a grid - * + * * @param mrdft_p MRDFT object * @param phi OrbitalVector * @param nabla NablaOperator (must be set up prior to calling this function) @@ -144,14 +136,17 @@ std::vector xcGGASpinStress(unique_ptr &mrdft_p, mrcpp:: * @param isOpenShell bool, true if open shell calculation * @param prec precision to use in density representation */ -std::vector getXCStress(unique_ptr &mrdft_p, mrcpp::FunctionTreeVector<3> &xc_pots, std::shared_ptr phi, - std::shared_ptr nabla, MatrixXd &gridPos, bool isOpenShell, double prec){ +std::vector getXCStress(unique_ptr &mrdft_p, + mrcpp::FunctionTreeVector<3> &xc_pots, + std::shared_ptr phi, + std::shared_ptr nabla, + MatrixXd &gridPos, + bool isOpenShell, + double prec) { bool isGGA = mrdft_p->functional().isGGA(); bool isHybrid = mrdft_p->functional().isHybrid(); - if (isHybrid) { - MSG_ABORT("Exact exchange is not implemented for forces computed with surface integrals"); - } + if (isHybrid) { MSG_ABORT("Exact exchange is not implemented for forces computed with surface integrals"); } std::array pos; int nGrid = gridPos.rows(); diff --git a/src/surface_forces/xcStress.h b/src/surface_forces/xcStress.h index 5eb19d892..101cbb06e 100644 --- a/src/surface_forces/xcStress.h +++ b/src/surface_forces/xcStress.h @@ -1,19 +1,29 @@ #pragma once #include "mrchem.h" -#include +#include "mrdft/MRDFT.h" #include "qmfunctions/Density.h" #include "qmfunctions/Orbital.h" -#include "mrdft/MRDFT.h" -#include #include "qmoperators/one_electron/NablaOperator.h" +#include +#include namespace surface_force { std::vector xcLDAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid); std::vector xcLDASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta); std::vector xcGGAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid, Eigen::MatrixXd &nablaRhoGrid); -std::vector xcGGASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta, Eigen::MatrixXd &nablaRhoGridAlpha, Eigen::MatrixXd &nablaRhoGridBeta); -std::vector getXCStress(std::unique_ptr &mrdft_p, mrcpp::FunctionTreeVector<3> &xc_pots, std::shared_ptr phi, std::shared_ptr nabla, Eigen::MatrixXd &gridPos, bool isOpenShell, double prec); +std::vector xcGGASpinStress(std::unique_ptr &mrdft_p, + Eigen::MatrixXd &rhoGridAlpha, + Eigen::MatrixXd &rhoGridBeta, + Eigen::MatrixXd &nablaRhoGridAlpha, + Eigen::MatrixXd &nablaRhoGridBeta); +std::vector getXCStress(std::unique_ptr &mrdft_p, + mrcpp::FunctionTreeVector<3> &xc_pots, + std::shared_ptr phi, + std::shared_ptr nabla, + Eigen::MatrixXd &gridPos, + bool isOpenShell, + double prec); } // namespace surface_force diff --git a/src/tensor/RankOneOperator.cpp b/src/tensor/RankOneOperator.cpp index f55bf61a1..4b16c2e6a 100644 --- a/src/tensor/RankOneOperator.cpp +++ b/src/tensor/RankOneOperator.cpp @@ -37,9 +37,9 @@ template RankOneOperator RankOneOperator::operator()(RankZeroOpera return out; } -template OrbitalVector RankOneOperator::operator()(Orbital phi) { +template std::vector RankOneOperator::operator()(Orbital phi) { RankOneOperator &O = *this; - OrbitalVector out; + std::vector out; for (int i = 0; i < I; i++) out.push_back(O[i](phi)); return out; } diff --git a/src/tensor/RankOneOperator.h b/src/tensor/RankOneOperator.h index 84273bbe2..6f4eeefdc 100644 --- a/src/tensor/RankOneOperator.h +++ b/src/tensor/RankOneOperator.h @@ -30,8 +30,6 @@ namespace mrchem { -using Orbital = mrcpp::ComplexFunction; - /** @class RankOneOperator * * @brief Vector of RankZeroOperator @@ -44,7 +42,7 @@ using Orbital = mrcpp::ComplexFunction; template class RankOneOperator : public TensorOperator { public: RankOneOperator operator()(RankZeroOperator B); - OrbitalVector operator()(Orbital phi); + std::vector operator()(Orbital phi); // NB: not an "OrbitalVector", because is not related to MPI ComplexVector operator()(Orbital bra, Orbital ket); ComplexVector trace(OrbitalVector &phi); ComplexVector trace(OrbitalVector &phi, OrbitalVector &x, OrbitalVector &y); diff --git a/src/tensor/RankTwoOperator.h b/src/tensor/RankTwoOperator.h index e067f0d16..65581affe 100644 --- a/src/tensor/RankTwoOperator.h +++ b/src/tensor/RankTwoOperator.h @@ -30,8 +30,6 @@ namespace mrchem { -using Orbital = mrcpp::ComplexFunction; - /** @class RankTwoOperator * * @brief Matrix of RankZeroOperator diff --git a/src/tensor/RankZeroOperator.cpp b/src/tensor/RankZeroOperator.cpp index fa23dfef1..1ab03c3cb 100644 --- a/src/tensor/RankZeroOperator.cpp +++ b/src/tensor/RankZeroOperator.cpp @@ -23,9 +23,9 @@ * */ +#include #include #include -#include #include "RankZeroOperator.h" @@ -43,10 +43,10 @@ namespace mrchem { * * Converts std::vector > to Eigen::VectorXcd */ -ComplexVector RankZeroOperator::getCoefVector() const { +std::vector RankZeroOperator::getCoefVector() const { int nCoefs = this->coef_exp.size(); - ComplexVector out(nCoefs); - for (int i = 0; i < nCoefs; i++) out(i) = this->coef_exp[i]; + std::vector out(nCoefs); + for (int i = 0; i < nCoefs; i++) out[i] = this->coef_exp[i]; return out; } @@ -200,8 +200,7 @@ RankZeroOperator &RankZeroOperator::operator-=(const RankZeroOperator &O) { */ void RankZeroOperator::setup(double prec) { for (auto &i : this->oper_exp) { - for (int j = 0; j < i.size(); j++) { - i[j]->setup(prec); } + for (int j = 0; j < i.size(); j++) { i[j]->setup(prec); } } } @@ -239,19 +238,20 @@ ComplexDouble RankZeroOperator::dagger(const mrcpp::Coord<3> &r) const { * Applies each term of the operator expansion to the input orbital. First all * components of each term are applied consecutively, then the output of each term * is added upp with the corresponding coefficient. + * NB: the result is put at the same location as the input (out and inp trees are the same tree) */ Orbital RankZeroOperator::operator()(Orbital inp) { - if (inp.getNNodes(NUMBER::Total) == 0) return inp.paramCopy(); + if (inp.getNNodes() == 0) return inp.paramCopy(false); RankZeroOperator &O = *this; - std::vector func_vec; - ComplexVector coef_vec = getCoefVector(); + std::vector> func_vec; + std::vector coef_vec = getCoefVector(); for (int n = 0; n < O.size(); n++) { Orbital out_n = O.applyOperTerm(n, inp); func_vec.push_back(out_n); } - Orbital out = inp.paramCopy(); - mrcpp::cplxfunc::linear_combination(out, coef_vec, func_vec, -1.0); + Orbital out = inp.paramCopy(true); + mrcpp::linear_combination(out, coef_vec, func_vec, -1.0); return out; } @@ -262,17 +262,17 @@ Orbital RankZeroOperator::operator()(Orbital inp) { * NOT IMPLEMENTED */ Orbital RankZeroOperator::dagger(Orbital inp) { - if (inp.getNNodes(NUMBER::Total) == 0) return inp.paramCopy(); + if (inp.getNNodes() == 0) return inp.paramCopy(false); RankZeroOperator &O = *this; - std::vector func_vec; - ComplexVector coef_vec = getCoefVector(); + std::vector> func_vec; + std::vector coef_vec = getCoefVector(); for (int n = 0; n < O.size(); n++) { Orbital out_n = O.daggerOperTerm(n, inp); func_vec.push_back(out_n); } - Orbital out = inp.paramCopy(); - mrcpp::cplxfunc::linear_combination(out, coef_vec, func_vec, -1.0); + Orbital out = inp.paramCopy(true); + mrcpp::linear_combination(out, coef_vec, func_vec, -1.0); return out; } @@ -288,7 +288,12 @@ OrbitalVector RankZeroOperator::operator()(OrbitalVector &inp) { OrbitalVector out; for (auto i = 0; i < inp.size(); i++) { Timer t1; - Orbital out_i = O(inp[i]); + Orbital out_i; + if (mrcpp::mpi::my_func(inp[i])) { + out_i = O(inp[i]); + } else { + out_i = inp[i].paramCopy(false); + } out.push_back(out_i); std::stringstream o_name; o_name << O.name() << "|" << i << ">"; @@ -308,7 +313,12 @@ OrbitalVector RankZeroOperator::dagger(OrbitalVector &inp) { OrbitalVector out; for (auto i = 0; i < inp.size(); i++) { Timer t1; - Orbital out_i = O.dagger(inp[i]); + Orbital out_i; + if (mrcpp::mpi::my_func(inp[i])) { + out_i = O.dagger(inp[i]); + } else { + out_i = inp[i].paramCopy(false); + } out.push_back(out_i); std::stringstream o_name; o_name << O.name() << "^dagger|" << i << ">"; @@ -329,7 +339,7 @@ OrbitalVector RankZeroOperator::dagger(OrbitalVector &inp) { ComplexDouble RankZeroOperator::operator()(Orbital bra, Orbital ket) { RankZeroOperator &O = *this; Orbital Oket = O(ket); - ComplexDouble out = orbital::dot(bra, Oket); + ComplexDouble out = mrcpp::dot(bra, Oket); return out; } @@ -343,7 +353,7 @@ ComplexDouble RankZeroOperator::operator()(Orbital bra, Orbital ket) { ComplexDouble RankZeroOperator::dagger(Orbital bra, Orbital ket) { RankZeroOperator &O = *this; Orbital Oket = O.dagger(ket); - ComplexDouble out = orbital::dot(bra, Oket); + ComplexDouble out = mrcpp::dot(bra, Oket); return out; } @@ -399,8 +409,15 @@ ComplexDouble RankZeroOperator::trace(OrbitalVector &Phi) { Timer t1; RankZeroOperator &O = *this; OrbitalVector OPhi = O(Phi); - ComplexVector eta = orbital::get_occupations(Phi).cast(); - ComplexVector phi_vec = orbital::dot(Phi, OPhi); + std::vector eta(Phi.size()); + std::vector phi_vec(Phi.size()); + auto phiOPhi = mrcpp::dot(Phi, OPhi); + ComplexDouble out = 0.0; + for (int i = 0; i < Phi.size(); i++) { + eta[i] = Phi[i].occ(); + phi_vec[i] = phiOPhi[i]; + out += eta[i] * phi_vec[i]; + } std::stringstream o_name; o_name << "Trace " << O.name() << "(rho)"; @@ -408,7 +425,7 @@ ComplexDouble RankZeroOperator::trace(OrbitalVector &Phi) { auto n_size = orbital::get_size_nodes(OPhi); mrcpp::print::tree(2, o_name.str(), n_nodes, n_size, t1.elapsed()); - return eta.dot(phi_vec); + return out; } /** @brief compute trace of operator expansion @@ -429,13 +446,13 @@ ComplexDouble RankZeroOperator::trace(OrbitalVector &Phi, OrbitalVector &X, Orbi OrbitalVector OPhi = O(Phi); auto y_nodes = orbital::get_n_nodes(OPhi); auto y_size = orbital::get_size_nodes(OPhi); - auto y_vec = orbital::dot(Y, OPhi); + auto y_vec = mrcpp::dot(Y, OPhi); OPhi.clear(); OrbitalVector OX = O(X); auto x_nodes = orbital::get_n_nodes(OX); auto x_size = orbital::get_size_nodes(OX); - auto x_vec = orbital::dot(Phi, OX); + auto x_vec = mrcpp::dot(Phi, OX); OX.clear(); std::stringstream o_name; @@ -449,10 +466,9 @@ ComplexDouble RankZeroOperator::trace(OrbitalVector &Phi, OrbitalVector &X, Orbi ComplexDouble RankZeroOperator::trace(const Nuclei &nucs) { Timer t1; RankZeroOperator &O = *this; - ComplexVector coef_vec = getCoefVector(); + std::vector coef_vec = getCoefVector(); ComplexDouble out = 0.0; for (int n = 0; n < O.size(); n++) out += coef_vec[n] * O.traceOperTerm(n, nucs); - std::stringstream o_name; o_name << "Trace " << O.name() << "(nucs)"; mrcpp::print::tree(2, o_name.str(), 0, 0, t1.elapsed()); @@ -468,11 +484,13 @@ ComplexDouble RankZeroOperator::trace(const Nuclei &nucs) { * This consecutively applies all components of a particular term of the operator * expansion to the input orbital. */ -Orbital RankZeroOperator::applyOperTerm(int n, Orbital inp) { +Orbital RankZeroOperator::applyOperTerm(int n, const Orbital &inp) { if (n >= this->oper_exp.size()) MSG_ABORT("Invalid oper term"); - if (inp.getNNodes(NUMBER::Total) == 0) return inp.paramCopy(); + Orbital out; + mrcpp::deep_copy(out, inp); - Orbital out = inp; + if (inp.getNNodes() == 0) return out; + int i = 0; for (auto O_nm : this->oper_exp[n]) { if (O_nm == nullptr) MSG_ABORT("Invalid oper term"); out = O_nm->apply(out); @@ -480,11 +498,12 @@ Orbital RankZeroOperator::applyOperTerm(int n, Orbital inp) { return out; } -Orbital RankZeroOperator::daggerOperTerm(int n, Orbital inp) { +Orbital RankZeroOperator::daggerOperTerm(int n, const Orbital &inp) { if (n >= this->oper_exp.size()) MSG_ABORT("Invalid oper term"); - if (inp.getNNodes(NUMBER::Total) == 0) return inp.paramCopy(); + Orbital out; + mrcpp::deep_copy(out, inp); + if (inp.getNNodes() == 0) return out; - Orbital out = inp; for (int i = this->oper_exp[n].size() - 1; i >= 0; i--) { auto O_nm = this->oper_exp[n][i]; if (O_nm == nullptr) MSG_ABORT("Invalid oper term"); diff --git a/src/tensor/RankZeroOperator.h b/src/tensor/RankZeroOperator.h index 62fca176b..bdb70f461 100644 --- a/src/tensor/RankZeroOperator.h +++ b/src/tensor/RankZeroOperator.h @@ -110,6 +110,7 @@ class RankZeroOperator { RankZeroOperator &operator-=(const RankZeroOperator &O); friend RankZeroOperator operator*(ComplexDouble a, RankZeroOperator A); + friend RankZeroOperator operator*(double a, RankZeroOperator A); friend RankZeroOperator operator*(RankZeroOperator A, RankZeroOperator B); friend RankZeroOperator operator+(RankZeroOperator A, RankZeroOperator B); friend RankZeroOperator operator-(RankZeroOperator A, RankZeroOperator B); @@ -119,13 +120,13 @@ class RankZeroOperator { std::vector coef_exp; std::vector oper_exp; - Orbital applyOperTerm(int n, Orbital inp); - Orbital daggerOperTerm(int n, Orbital inp); + Orbital applyOperTerm(int n, const Orbital &inp); + Orbital daggerOperTerm(int n, const Orbital &inp); ComplexDouble traceOperTerm(int n, const Nuclei &nucs); - ComplexVector getCoefVector() const; + std::vector getCoefVector() const; }; -inline RankZeroOperator operator*(ComplexDouble a, RankZeroOperator A) { +inline RankZeroOperator operator*(double a, RankZeroOperator A) { RankZeroOperator out; out.name() = A.name(); for (int i = 0; i < A.oper_exp.size(); i++) { diff --git a/src/utils/MolPlotter.h b/src/utils/MolPlotter.h index 15fcaec8b..481901221 100644 --- a/src/utils/MolPlotter.h +++ b/src/utils/MolPlotter.h @@ -39,15 +39,15 @@ class MolPlotter final : public mrcpp::Plotter<3> { : mrcpp::Plotter<3>(o) , molecule(&mol) {} - void linePlot(const std::array &npts, mrcpp::ComplexFunction &func, const std::string &fname) { + void linePlot(const std::array &npts, const mrcpp::CompFunction<3> &func, const std::string &fname) { if (func.hasReal()) linePlot(npts, func.real(), fname + "_re"); if (func.hasImag()) linePlot(npts, func.imag(), fname + "_im"); } - void surfPlot(const std::array &npts, mrcpp::ComplexFunction &func, const std::string &fname) { + void surfPlot(const std::array &npts, const mrcpp::CompFunction<3> &func, const std::string &fname) { if (func.hasReal()) surfPlot(npts, func.real(), fname + "_re"); if (func.hasImag()) surfPlot(npts, func.imag(), fname + "_im"); } - void cubePlot(const std::array &npts, mrcpp::ComplexFunction &func, const std::string &fname) { + void cubePlot(const std::array &npts, const mrcpp::CompFunction<3> &func, const std::string &fname) { if (func.hasReal()) cubePlot(npts, func.real(), fname + "_re"); if (func.hasImag()) cubePlot(npts, func.imag(), fname + "_im"); } diff --git a/src/utils/NonlinearMaximizer.cpp b/src/utils/NonlinearMaximizer.cpp index ae3c65533..60fe6a050 100644 --- a/src/utils/NonlinearMaximizer.cpp +++ b/src/utils/NonlinearMaximizer.cpp @@ -25,6 +25,7 @@ #include +#include "MRCPP/Parallel" #include "MRCPP/Printer" #include diff --git a/src/utils/PolyInterpolator.cpp b/src/utils/PolyInterpolator.cpp index 02dcd829a..c6817f496 100644 --- a/src/utils/PolyInterpolator.cpp +++ b/src/utils/PolyInterpolator.cpp @@ -1,8 +1,8 @@ -#include #include "PolyInterpolator.h" +#include -namespace interpolation_utils{ -double polynomialInterpolate5(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in, double x){ +namespace interpolation_utils { +double polynomialInterpolate5(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in, double x) { double xm2 = x_in(0); double xm1 = x_in(1); double x00 = x_in(2); @@ -14,18 +14,19 @@ double polynomialInterpolate5(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in, doub double y00 = y_in(2); double yp1 = y_in(3); double yp2 = y_in(4); - return ym2 + (x - xm2)*((ym1 - ym2)/(xm1 - xm2) + - (x - xm1)*(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2) + - (x - x00)*((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1) + - ((x - xp1)*(-((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/ - (-xm2 + xp1)) + (-(((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/ - (-xm1 + xp1)) + ((-y00 + yp1)/(x00 - xp1) + (yp1 - yp2)/(xp1 - xp2))/(-x00 + xp2))/ - (-xm1 + xp2)))/(-xm2 + xp2)))); + return ym2 + + (x - xm2) * + ((ym1 - ym2) / (xm1 - xm2) + + (x - xm1) * + (((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2) + + (x - x00) * + ((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1) + + ((x - xp1) * + (-((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1)) + + (-(((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) + ((-y00 + yp1) / (x00 - xp1) + (yp1 - yp2) / (xp1 - xp2)) / (-x00 + xp2)) / (-xm1 + xp2))) / + (-xm2 + xp2)))); } - double polynomialInterpolate5_deriv(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in, double x) { double xm2 = x_in(0); double xm1 = x_in(1); @@ -39,30 +40,30 @@ double polynomialInterpolate5_deriv(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in double yp1 = y_in(3); double yp2 = y_in(4); - return (ym1 - ym2)/(xm1 - xm2) + (x - xm1)*(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2) + - (x - x00)*((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1) + - ((x - xp1)*(-((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1)) + - (-(((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1)) + - ((-y00 + yp1)/(x00 - xp1) + (yp1 - yp2)/(xp1 - xp2))/(-x00 + xp2))/(-xm1 + xp2)))/(-xm2 + xp2))) + - (x - xm2)*(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2) + - (x - x00)*((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1) + - ((x - xp1)*(-((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1)) + - (-(((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1)) + - ((-y00 + yp1)/(x00 - xp1) + (yp1 - yp2)/(xp1 - xp2))/(-x00 + xp2))/(-xm1 + xp2)))/(-xm2 + xp2)) + - (x - xm1)*((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1) + - ((x - x00)*(-((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1)) + - (-(((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1)) + - ((-y00 + yp1)/(x00 - xp1) + (yp1 - yp2)/(xp1 - xp2))/(-x00 + xp2))/(-xm1 + xp2)))/(-xm2 + xp2) + - ((x - xp1)*(-((-(((y00 - ym1)/(x00 - xm1) + (-ym1 + ym2)/(xm1 - xm2))/(x00 - xm2)) + - ((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1))/(-xm2 + xp1)) + - (-(((-y00 + ym1)/(x00 - xm1) + (y00 - yp1)/(x00 - xp1))/(-xm1 + xp1)) + - ((-y00 + yp1)/(x00 - xp1) + (yp1 - yp2)/(xp1 - xp2))/(-x00 + xp2))/(-xm1 + xp2)))/(-xm2 + xp2))); + return (ym1 - ym2) / (xm1 - xm2) + + (x - xm1) * + (((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2) + + (x - x00) * ((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1) + + ((x - xp1) * + (-((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1)) + + (-(((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) + ((-y00 + yp1) / (x00 - xp1) + (yp1 - yp2) / (xp1 - xp2)) / (-x00 + xp2)) / (-xm1 + xp2))) / + (-xm2 + xp2))) + + (x - xm2) * + (((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2) + + (x - x00) * ((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1) + + ((x - xp1) * + (-((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1)) + + (-(((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) + ((-y00 + yp1) / (x00 - xp1) + (yp1 - yp2) / (xp1 - xp2)) / (-x00 + xp2)) / (-xm1 + xp2))) / + (-xm2 + xp2)) + + (x - xm1) * ((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1) + + ((x - x00) * + (-((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1)) + + (-(((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) + ((-y00 + yp1) / (x00 - xp1) + (yp1 - yp2) / (xp1 - xp2)) / (-x00 + xp2)) / (-xm1 + xp2))) / + (-xm2 + xp2) + + ((x - xp1) * + (-((-(((y00 - ym1) / (x00 - xm1) + (-ym1 + ym2) / (xm1 - xm2)) / (x00 - xm2)) + ((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) / (-xm2 + xp1)) + + (-(((-y00 + ym1) / (x00 - xm1) + (y00 - yp1) / (x00 - xp1)) / (-xm1 + xp1)) + ((-y00 + yp1) / (x00 - xp1) + (yp1 - yp2) / (xp1 - xp2)) / (-x00 + xp2)) / (-xm1 + xp2))) / + (-xm2 + xp2))); } int binarySearch(const Eigen::VectorXd &x, const double &x0) { @@ -70,7 +71,7 @@ int binarySearch(const Eigen::VectorXd &x, const double &x0) { int j = x.size() - 1; int k; while (j - i > 1) { - k = (i + j)/2; + k = (i + j) / 2; if (x0 < x(k)) { j = k; } else { diff --git a/src/utils/PolyInterpolator.h b/src/utils/PolyInterpolator.h index aa00162d3..a200f3932 100644 --- a/src/utils/PolyInterpolator.h +++ b/src/utils/PolyInterpolator.h @@ -1,12 +1,12 @@ #pragma once -#include #include -#include -#include #include +#include #include +#include +#include -namespace interpolation_utils{ +namespace interpolation_utils { /** * @brief Interpolate a 5th order polynomial through 5 points and evaluate at x. @@ -50,13 +50,13 @@ class PolyInterpolator { */ double ypxmin; - public: +public: /** * @brief Constructor * @param x_in x values of the points to interpolate * @param y_in y values of the points to interpolate */ - PolyInterpolator(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in){ + PolyInterpolator(Eigen::VectorXd &x_in, Eigen::VectorXd &y_in) { x = x_in; y = y_in; n = x_in.size(); @@ -77,17 +77,17 @@ class PolyInterpolator { } ypxmin = polynomialInterpolate5_deriv(x_in_poly, y_in_poly, xmin); } - + /** - * @brief Evaluate the interpolated function at x. + * @brief Evaluate the interpolated function at x. * No extrapolation for x < xmin (meaning that the polynomial is evaluated at x < xmin), linear extrapolation for x > xmax. * Useful when the logarithm of the density is interpolated. * @param x x value at which to evaluate the function */ - double evalfLeftNoRightLinear(const double &xval) const{ + double evalfLeftNoRightLinear(const double &xval) const { double y; if (xval > xmax) { // linear extrapolation - y = this->y(n - 1) + ypxmax*(xval - xmax); + y = this->y(n - 1) + ypxmax * (xval - xmax); return y; } @@ -107,7 +107,7 @@ class PolyInterpolator { * Useful when the density is interpolated. * @param x x value at which to evaluate the function */ - double evalfLeftNoRightZero(const double &xval) const{ + double evalfLeftNoRightZero(const double &xval) const { double y; if (xval > xmax) { // constant y = 0.0; @@ -146,7 +146,7 @@ class PolyInterpolator { return y; } - private: +private: int adjustIndexToBoundaries(int i) const { int j = i; if (i == 0) j = 2; @@ -155,5 +155,5 @@ class PolyInterpolator { if (i == n - 2) j = n - 3; return j; } -}; +}; } // namespace interpolation_utils \ No newline at end of file diff --git a/src/utils/RRMaximizer.cpp b/src/utils/RRMaximizer.cpp index abcf73eb5..d6e1e2873 100644 --- a/src/utils/RRMaximizer.cpp +++ b/src/utils/RRMaximizer.cpp @@ -30,7 +30,6 @@ #include "utils/math_utils.h" #include "qmfunctions/Orbital.h" -#include "qmfunctions/OrbitalIterator.h" #include "qmfunctions/orbital_utils.h" #include "qmoperators/one_electron/PositionOperator.h" @@ -64,24 +63,24 @@ RRMaximizer::RRMaximizer(double prec, OrbitalVector &Phi) { r_x.clear(); R_x = orbital::calc_overlap_matrix(Phi, xPhi_Vec); for (int i = 0; i < Phi.size(); i++) { - if(!mrcpp::mpi::my_orb(i)) continue; - xPhi_Vec[i].free(NUMBER::Total); + if (!mrcpp::mpi::my_func(i)) continue; + xPhi_Vec[i].free(); } OrbitalVector yPhi_Vec = r_y(Phi); r_y.clear(); R_y = orbital::calc_overlap_matrix(Phi, yPhi_Vec); for (int i = 0; i < Phi.size(); i++) { - if(!mrcpp::mpi::my_orb(i)) continue; - yPhi_Vec[i].free(NUMBER::Total); + if (!mrcpp::mpi::my_func(i)) continue; + yPhi_Vec[i].free(); } OrbitalVector zPhi_Vec = r_z(Phi); r_z.clear(); R_z = orbital::calc_overlap_matrix(Phi, zPhi_Vec); for (int i = 0; i < Phi.size(); i++) { - if(!mrcpp::mpi::my_orb(i)) continue; - zPhi_Vec[i].free(NUMBER::Total); + if (!mrcpp::mpi::my_func(i)) continue; + zPhi_Vec[i].free(); } for (int i = 0; i < this->N; i++) { diff --git a/src/utils/math_utils.cpp b/src/utils/math_utils.cpp index bc9ee4fd1..fcf502221 100644 --- a/src/utils/math_utils.cpp +++ b/src/utils/math_utils.cpp @@ -175,7 +175,7 @@ void diagonalize_block(ComplexMatrix &A, ComplexMatrix &U, int nstart, int nsize * Numerically stable for large and small x. * @param x Vector of values where the logsumexp is to be computed. */ -double logsumexp(const Eigen::VectorXd &x){ +double logsumexp(const Eigen::VectorXd &x) { double max = x.maxCoeff(); return max + std::log((x.array() - max).exp().sum()); } diff --git a/src/utils/print_utils.cpp b/src/utils/print_utils.cpp index ddcc7b3e9..e07108de0 100644 --- a/src/utils/print_utils.cpp +++ b/src/utils/print_utils.cpp @@ -243,9 +243,9 @@ void print_utils::matrix(int level, const std::string &txt, const DoubleMatrix & printout(level, o.str()); } -void print_utils::qmfunction(int level, const std::string &txt, const mrcpp::ComplexFunction &func, mrcpp::Timer &timer) { - auto nodes = func.getNNodes(NUMBER::Total); - auto memory = func.getSizeNodes(NUMBER::Total); +void print_utils::qmfunction(int level, const std::string &txt, const mrcpp::CompFunction<3> &func, mrcpp::Timer &timer) { + auto nodes = func.getNNodes(); + auto memory = func.getSizeNodes(); auto time = timer.elapsed(); mrcpp::print::tree(level, txt, nodes, memory, time); } diff --git a/src/utils/print_utils.h b/src/utils/print_utils.h index dd8046552..b2629121c 100644 --- a/src/utils/print_utils.h +++ b/src/utils/print_utils.h @@ -41,7 +41,7 @@ void coord(int level, const std::string &txt, const mrcpp::Coord<3> &val, int p void scalar(int level, const std::string &txt, double val, const std::string &unit = "", int p = -1, bool s = false); void vector(int level, const std::string &txt, const DoubleVector &val, int p = -1, bool s = false); void matrix(int level, const std::string &txt, const DoubleMatrix &val, int p = -1, bool s = false); -void qmfunction(int level, const std::string &txt, const mrcpp::ComplexFunction &func, mrcpp::Timer &t); +void qmfunction(int level, const std::string &txt, const mrcpp::CompFunction<3> &func, mrcpp::Timer &t); std::string dbl_to_str(double d, int p, bool sci); std::vector eigen_to_vector(const DoubleVector &inp, double thrs); std::vector eigen_to_vector(const DoubleMatrix &inpm, double thrs); diff --git a/tests/h2_mag_lda/reference/h2.json b/tests/h2_mag_lda/reference/h2.json index d25ed8898..724176033 100644 --- a/tests/h2_mag_lda/reference/h2.json +++ b/tests/h2_mag_lda/reference/h2.json @@ -1,16 +1,31 @@ { "input": { "constants": { + "N_a": 6.02214076e+23, "angstrom2bohrs": 1.8897261246257702, + "boltzmann_constant": 1.380649e-23, "dipmom_au2debye": 2.5417464739297717, + "e0": 8.8541878128e-12, "electron_g_factor": -2.00231930436256, + "elementary_charge": 1.602176634e-19, "fine_structure_constant": 0.0072973525693, "hartree2ev": 27.211386245988, "hartree2kcalmol": 627.5094740630558, "hartree2kjmol": 2625.4996394798254, "hartree2simagnetizability": 78.9451185, "hartree2wavenumbers": 219474.6313632, - "light_speed": 137.035999084 + "light_speed": 137.035999084, + "meter2bohr": 18897261246.2577 + }, + "geom_opt": { + "init_step_size": -0.5, + "max_force_component": 0.005, + "max_history_length": 10, + "max_iter": 100, + "minimal_step_size": 0.01, + "run": false, + "subspace_tolerance": 0.001, + "use_previous_guess": false }, "molecule": { "charge": 0, @@ -37,9 +52,12 @@ "multiplicity": 1 }, "mpi": { + "bank_per_node": -1, "bank_size": -1, "numerically_exact": true, - "shared_memory_size": 10000 + "omp_threads": -1, + "shared_memory_size": 10000, + "use_omp_num_threads": false }, "mra": { "basis_order": 5, @@ -60,7 +78,7 @@ "printer": { "file_name": "h2", "print_constants": false, - "print_level": 0, + "print_level": 3, "print_mpi": false, "print_prec": 6, "print_width": 75 @@ -302,6 +320,7 @@ "prec": 0.001, "relativity": "None", "restricted": false, + "rotate": true, "screen": 12.0, "type": "gto", "zeta": 0 @@ -328,12 +347,12 @@ "center_of_mass": [ 0.0, 0.0, - 0.0 + 2.544077373851441e-17 ], "charge": 0, "dipole_moment": { "dip-1": { - "magnitude": 2.3125524128433424e-05, + "magnitude": 2.3125524059541666e-05, "r_O": [ 0.0, 0.0, @@ -342,12 +361,12 @@ "vector": [ 0.0, 0.0, - 2.312552412843342e-05 + 2.3125524059541666e-05 ], "vector_el": [ 0.0, 0.0, - 2.3125524068259332e-05 + 2.312552406986674e-05 ], "vector_nuc": [ 0.0, @@ -384,7 +403,7 @@ 0.0 ], "tensor": [ - -0.8858098671165622, + -0.8853652898096424, 0.0, 0.0, null, @@ -395,18 +414,18 @@ null ], "tensor_dia": [ - -0.913111252055222, + -0.9131112520552285, 0.0, 0.0, 0.0, - -0.9131112520552314, + -0.9131112520552256, 0.0, 0.0, 0.0, - -0.7722102648042788 + -0.7722102648042813 ], "tensor_para": [ - 0.0273013849386598, + 0.02774596224558616, 0.0, 0.0, null, @@ -439,9 +458,9 @@ 0.0 ], "tensor": [ - 26.07747616835781, + 26.07177129827233, 0.0, - 1.3677196201292798e-12, + -2.176802989165496e-12, null, null, null, @@ -450,20 +469,20 @@ null ], "tensor_dia": [ - 25.527087632399677, + 25.527087632399784, 0.0, 0.0, 0.0, - 25.52708763239979, + 25.527087632399873, 0.0, 0.0, 0.0, - 26.74753488502477 + 26.747534885024933 ], "tensor_para": [ - 0.5503885359581321, + 0.5446836658725474, 0.0, - 1.418610741934619e-12, + -2.1599154820087435e-12, null, null, null, @@ -475,8 +494,8 @@ }, "orbital_energies": { "energy": [ - -0.3452839682920535, - -0.34528396829205393 + -0.34528396829204916, + -0.34528396829204916 ], "occupation": [ 1.0, @@ -486,20 +505,20 @@ "a", "b" ], - "sum_occupied": -0.6905679365841074 + "sum_occupied": -0.6905679365840983 }, "scf_energy": { - "E_ee": 1.328363917977608, + "E_ee": 1.328363917977612, "E_eext": 0.0, - "E_el": -1.8186520280662704, - "E_en": -3.5666315558595887, - "E_kin": 1.0734860652323053, + "E_el": -1.8186520280675076, + "E_en": -3.566631555859595, + "E_kin": 1.0734860652323075, "E_next": 0.0, "E_nn": 0.7141392859689609, "E_nuc": 0.7141392859689609, - "E_tot": -1.1045127420973095, + "E_tot": -1.1045127420985468, "E_x": 0.0, - "E_xc": -0.6538704554165949, + "E_xc": -0.6538704554178323, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -521,25 +540,25 @@ "converged": true, "cycles": [ { - "mo_residual": 0.08780898201504643, - "property_update": -0.020433596780801602, - "symmetric_property": -0.020433596780801602, - "wall_time": 1.80950626 + "mo_residual": 0.08780898201504735, + "property_update": -0.020433596780802, + "symmetric_property": -0.020433596780802, + "wall_time": 2.6607969 }, { - "mo_residual": 0.02040507065870614, - "property_update": -0.006635248970956756, - "symmetric_property": -0.027068845751758358, - "wall_time": 2.602521863 + "mo_residual": 0.02238388037118895, + "property_update": -0.007206813758708675, + "symmetric_property": -0.027640410539510676, + "wall_time": 2.883167341 }, { - "mo_residual": 0.0006574223357317515, - "property_update": -0.0002325391869014426, - "symmetric_property": -0.0273013849386598, - "wall_time": 2.454146546 + "mo_residual": 0.0003591406835642252, + "property_update": -0.00010555170607548514, + "symmetric_property": -0.02774596224558616, + "wall_time": 2.795603449 } ], - "wall_time": 6.866252376 + "wall_time": 8.339723138 } }, null, @@ -552,17 +571,17 @@ }, "scf_calculation": { "initial_energy": { - "E_ee": 1.328363917977608, + "E_ee": 1.328363917977612, "E_eext": 0.0, - "E_el": -1.8186520280662704, - "E_en": -3.5666315558595887, - "E_kin": 1.0734860652323053, + "E_el": -1.8186520280675076, + "E_en": -3.566631555859595, + "E_kin": 1.0734860652323075, "E_next": 0.0, "E_nn": 0.7141392859689609, "E_nuc": 0.7141392859689609, - "E_tot": -1.1045127420973095, + "E_tot": -1.1045127420985468, "E_x": 0.0, - "E_xc": -0.6538704554165949, + "E_xc": -0.6538704554178323, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 diff --git a/tests/h2_mag_lda/reference/h2.out b/tests/h2_mag_lda/reference/h2.out index cbb774a46..6efefdf06 100644 --- a/tests/h2_mag_lda/reference/h2.out +++ b/tests/h2_mag_lda/reference/h2.out @@ -11,10 +11,10 @@ *** *** *** VERSION 1.2.0-alpha *** *** *** -*** Git branch fix/magnetic *** -*** Git commit hash 220bd385634b1c9c4f48-dirty *** -*** Git commit author Stig Rune Jensen *** -*** Git commit date Tue Jan 16 16:41:39 2024 +0100 *** +*** Git branch text *** +*** Git commit hash 424eb54bef32d3a65379-dirty *** +*** Git commit author gitpeterwind *** +*** Git commit date Tue Mar 11 11:40:04 2025 +0100 *** *** *** *** Contact: luca.frediani@uit.no *** *** *** @@ -47,13 +47,13 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- MRCPP version : 1.6.0-alpha - Git branch : HEAD - Git commit hash : f8def0a086da6410e5dd - Git commit author : Peter Wind - Git commit date : Sat Oct 21 13:32:25 2023 +0200 + Git branch : merge + Git commit hash : 0eccd59fbfa419dc6a65-dirty + Git commit author : gitpeterwind + Git commit date : Mon Mar 10 14:49:47 2025 +0100 Linear algebra : EIGEN v3.4.0 - Parallelization : OpenMP (8 threads) + Parallelization : MPI/OpenMP (8 threads) --------------------------------------------------------------------------- @@ -98,6 +98,21 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== +=========================================================================== + Projecting nuclear potential (point-like HFYGB) +--------------------------------------------------------------------------- + N Atom Charge Precision Smoothing +--------------------------------------------------------------------------- + 0 H 1.000000e+00 1.000000e-03 1.632412e-02 + 1 H 1.000000e+00 1.000000e-03 1.632412e-02 +--------------------------------------------------------------------------- + Local potential 712 nds 9.39 MB 0.04 sec + Allreduce potential 712 nds 9.39 MB 4.19 ms +--------------------------------------------------------------------------- + Wall time: 4.58133e-02 sec +=========================================================================== + + *************************************************************************** *** *** @@ -117,6 +132,36 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=========================================================================== + GTO Initial Guess +--------------------------------------------------------------------------- + n Norm Nodes Size Time +--------------------------------------------------------------------------- + 0 9.999999e-01 328 nds 4.32 MB 0.03 sec +--------------------------------------------------------------------------- + Reading AO basis (sec) 6.21450e-05 + Reading MO matrix (sec) 5.78590e-05 + Projecting GTO MOs (sec) 3.24968e-02 +--------------------------------------------------------------------------- + Wall time: 3.26456e-02 sec +=========================================================================== + + +=========================================================================== + GTO Initial Guess +--------------------------------------------------------------------------- + n Norm Nodes Size Time +--------------------------------------------------------------------------- + 0 9.999999e-01 328 nds 4.32 MB 0.01 sec +--------------------------------------------------------------------------- + Reading AO basis (sec) 6.92640e-05 + Reading MO matrix (sec) 9.94120e-05 + Projecting GTO MOs (sec) 1.38295e-02 +--------------------------------------------------------------------------- + Wall time: 1.40143e-02 sec +=========================================================================== + + =========================================================================== Molecular Orbitals --------------------------------------------------------------------------- @@ -128,6 +173,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- 0 1 a : 9.999999041879e-01 1 1 b : 9.999999041879e-01 +--------------------------------------------------------------------------- + Total MO nodes : 656 + Total MO memory : (MB) 8.65 =========================================================================== @@ -142,6 +190,75 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=========================================================================== + Building Coulomb operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute global density 392 nds 5.17 MB 0.04 sec + Compute global potential 8 nds 108.00 kB 0.02 sec +--------------------------------------------------------------------------- + Wall time: 5.95198e-02 sec +=========================================================================== + + +=========================================================================== + Building XC operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute rho (alpha) 392 nds 5.17 MB 0.01 sec + Compute rho (beta) 392 nds 5.17 MB 0.04 sec + Make potential 784 nds 10.34 MB 0.56 sec +--------------------------------------------------------------------------- + Wall time: 6.15906e-01 sec +=========================================================================== + + +=========================================================================== + Computing Fock matrix +--------------------------------------------------------------------------- + 1168 nds 15.40 MB 0.02 sec + 1168 nds 15.40 MB 0.03 sec + 1168 nds 15.40 MB 0.03 sec + 784 nds 10.34 MB 0.08 sec +--------------------------------------------------------------------------- + Wall time: 1.58194e-01 sec +=========================================================================== + + +=========================================================================== + Computing molecular energy +--------------------------------------------------------------------------- + Trace V_nuc(rho) 784 nds 10.34 MB 0.04 sec + Trace J(rho) 656 nds 8.65 MB 0.02 sec +--------------------------------------------------------------------------- + Wall time: 9.61517e-02 sec +=========================================================================== + + +=========================================================================== + Digonalizing Fock matrix +--------------------------------------------------------------------------- + Computing overlap matrix (sec) 1.15640e-03 + Computing Lowdin matrix (sec) 1.50660e-05 + Diagonalizing matrix (sec) 2.49700e-06 + Rotating orbitals (sec) 5.22805e-03 +--------------------------------------------------------------------------- + Wall time: 6.45756e-03 sec +=========================================================================== + + +=========================================================================== + Computing orbital energies +--------------------------------------------------------------------------- + Diagonalize Fock matrix (alpha) (sec) 1.40900e-06 + Diagonalize Fock matrix (beta) (sec) 6.22000e-07 +--------------------------------------------------------------------------- + Wall time: 1.31140e-05 sec +=========================================================================== + + =========================================================================== Molecular Energy (initial) --------------------------------------------------------------------------- @@ -149,16 +266,16 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s E-N energy : (au) -3.566631555860 Coulomb energy : (au) 1.328363917978 Exchange energy : (au) 0.000000000000 - X-C energy : (au) -0.653870455417 + X-C energy : (au) -0.653870455418 N-N energy : (au) 0.714139285969 --------------------------------------------------------------------------- - Electronic energy : (au) -1.818652028066 + Electronic energy : (au) -1.818652028068 Nuclear energy : (au) 0.714139285969 --------------------------------------------------------------------------- - Total energy : (au) -1.104512742097e+00 - : (kcal/mol) -6.930922098894e+02 - : (kJ/mol) -2.899897806177e+03 - : (eV) -3.005532283883e+01 + Total energy : (au) -1.104512742099e+00 + : (kcal/mol) -6.930922098902e+02 + : (kJ/mol) -2.899897806181e+03 + : (eV) -3.005532283886e+01 =========================================================================== @@ -174,6 +291,20 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== +=========================================================================== + Computing dipole moment +--------------------------------------------------------------------------- + Trace h_E_dip[x](nucs) 0 nds 0.00 kB 0.01 ms + Trace h_E_dip[y](nucs) 0 nds 0.00 kB 0.01 ms + Trace h_E_dip[z](nucs) 0 nds 0.00 kB 0.01 ms + Trace h_E_dip[x](rho) 656 nds 8.65 MB 0.02 sec + Trace h_E_dip[y](rho) 656 nds 8.65 MB 0.04 sec + Trace h_E_dip[z](rho) 656 nds 8.65 MB 0.02 sec +--------------------------------------------------------------------------- + Wall time: 8.39128e-02 sec +=========================================================================== + + *************************************************************************** *** *** @@ -182,6 +313,92 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *************************************************************************** +=========================================================================== + Digonalizing Fock matrix +--------------------------------------------------------------------------- + Computing overlap matrix (sec) 1.26299e-03 + Computing Lowdin matrix (sec) 8.23900e-06 + Diagonalizing matrix (sec) 2.02200e-06 + Rotating orbitals (sec) 5.98208e-03 +--------------------------------------------------------------------------- + Wall time: 7.30894e-03 sec +=========================================================================== + + +=========================================================================== + Projecting nuclear potential (point-like HFYGB) +--------------------------------------------------------------------------- + N Atom Charge Precision Smoothing +--------------------------------------------------------------------------- + 0 H 1.000000e+00 1.000000e-03 1.632412e-02 + 1 H 1.000000e+00 1.000000e-03 1.632412e-02 +--------------------------------------------------------------------------- + Local potential 712 nds 9.39 MB 0.04 sec + Allreduce potential 712 nds 9.39 MB 3.65 ms +--------------------------------------------------------------------------- + Wall time: 4.22543e-02 sec +=========================================================================== + + +=========================================================================== + Building Coulomb operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute global density 392 nds 5.17 MB 0.04 sec + Compute global potential 8 nds 108.00 kB 0.03 sec +--------------------------------------------------------------------------- + Wall time: 6.57630e-02 sec +=========================================================================== + + +=========================================================================== + Building XC operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute rho (alpha) 392 nds 5.17 MB 0.02 sec + Compute rho (beta) 392 nds 5.17 MB 0.04 sec + Make potential 784 nds 10.34 MB 0.57 sec +--------------------------------------------------------------------------- + Wall time: 6.25870e-01 sec +=========================================================================== + + +=========================================================================== + Computing magnetizability (dia) +--------------------------------------------------------------------------- + Trace h_BB_dia[x,x](rho) 656 nds 8.65 MB 0.05 sec + Trace h_BB_dia[x,y](rho) 656 nds 8.65 MB 0.03 sec + Trace h_BB_dia[x,z](rho) 656 nds 8.65 MB 0.03 sec + Trace h_BB_dia[y,x](rho) 656 nds 8.65 MB 0.03 sec + Trace h_BB_dia[y,y](rho) 656 nds 8.65 MB 0.04 sec + Trace h_BB_dia[y,z](rho) 656 nds 8.65 MB 0.04 sec + Trace h_BB_dia[z,x](rho) 656 nds 8.65 MB 0.02 sec + Trace h_BB_dia[z,y](rho) 656 nds 8.65 MB 0.03 sec + Trace h_BB_dia[z,z](rho) 656 nds 8.65 MB 0.07 sec +--------------------------------------------------------------------------- + Wall time: 3.38403e-01 sec +=========================================================================== + + +=========================================================================== + Computing NMR shielding (dia) +--------------------------------------------------------------------------- + Trace h_BM_dia[x,x](rho) 784 nds 10.34 MB 0.06 sec + Trace h_BM_dia[x,y](rho) 784 nds 10.34 MB 0.02 sec + Trace h_BM_dia[x,z](rho) 720 nds 9.49 MB 0.04 sec + Trace h_BM_dia[y,x](rho) 784 nds 10.34 MB 0.03 sec + Trace h_BM_dia[y,y](rho) 784 nds 10.34 MB 0.05 sec + Trace h_BM_dia[y,z](rho) 720 nds 9.49 MB 0.02 sec + Trace h_BM_dia[z,x](rho) 784 nds 10.34 MB 0.04 sec + Trace h_BM_dia[z,y](rho) 784 nds 10.34 MB 0.03 sec + Trace h_BM_dia[z,z](rho) 784 nds 10.34 MB 0.06 sec +--------------------------------------------------------------------------- + Wall time: 7.94120e-01 sec +=========================================================================== + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Calculation : Compute initial orbitals Method : Zero guess @@ -197,8 +414,11 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Norm --------------------------------------------------------------------------- - 0 1 a : -1.000000000000e+00 - 1 1 b : -1.000000000000e+00 + 0 1 a : 0.000000000000e+00 + 1 1 b : 0.000000000000e+00 +--------------------------------------------------------------------------- + Total MO nodes : 0 + Total MO memory : (MB) 0.00 =========================================================================== @@ -219,18 +439,424 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +########################################################################### + SCF cycle 1 +--------------------------------------------------------------------------- + + +=========================================================================== + Current precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Orbital threshold (abs) 1.00000e-02 + Property threshold (abs) -1.00000e+00 +=========================================================================== + + +=========================================================================== + Building Coulomb operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute global density 8 nds 108.00 kB 0.50 ms + Compute global potential 8 nds 108.00 kB 1.66 ms +--------------------------------------------------------------------------- + Wall time: 2.18704e-03 sec +=========================================================================== + + +=========================================================================== + Building XC operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute rho_0 (alpha) 392 nds 5.17 MB 0.01 sec + Compute rho_0 (beta) 392 nds 5.17 MB 0.01 sec + Compute rho_1 (alpha) 8 nds 108.00 kB 0.39 ms + Compute rho_1 (beta) 8 nds 108.00 kB 0.35 ms + Make potential 784 nds 10.34 MB 1.69 sec +--------------------------------------------------------------------------- + Wall time: 1.73368e+00 sec +=========================================================================== + + +=========================================================================== + Computing Helmholtz argument +--------------------------------------------------------------------------- + Applying V_1 (sec) 1.28066e-01 + Projecting (1 - rho_0) (sec) 6.02781e-03 + Rotating orbitals (sec) 2.75494e-04 +--------------------------------------------------------------------------- + Wall time: 1.38219e-01 sec +=========================================================================== + + +=========================================================================== + Applying Helmholtz operators +--------------------------------------------------------------------------- + 0 6.209033e-02 264 nds 3.48 MB 0.32 sec + 1 6.209033e-02 264 nds 3.48 MB 0.33 sec +--------------------------------------------------------------------------- + Wall time: 6.47704e-01 sec +=========================================================================== + + +=========================================================================== + Projecting occupied space +--------------------------------------------------------------------------- + Projecting (1 - rho_0) (sec) 5.03388e-03 +--------------------------------------------------------------------------- + Wall time: 5.05532e-03 sec +=========================================================================== + + +=========================================================================== + Iterative subspace accelerator +--------------------------------------------------------------------------- + Push back orbitals (sec) 2.37724e-03 +--------------------------------------------------------------------------- + Orbital sizes 16 nds 216.00 kB 0.00 ms + Update sizes 528 nds 6.96 MB 0.00 ms +--------------------------------------------------------------------------- + Wall time: 2.41985e-03 sec +=========================================================================== + + +=========================================================================== + Computing symmetric property +--------------------------------------------------------------------------- + Trace h_B_dip[x](rho_1) 784 nds 10.34 MB 0.13 sec +--------------------------------------------------------------------------- + Wall time: 1.26434e-01 sec +=========================================================================== + + +=========================================================================== + n Spin Nodes Norm Residual Done +--------------------------------------------------------------------------- + 0 a 264 0.062090326632 6.209033e-02 0 + 1 b 264 0.062090326632 6.209033e-02 0 +--------------------------------------------------------------------------- + Total residual 8.780898e-02 0 +=========================================================================== + + +=========================================================================== + Value Update Done +--------------------------------------------------------------------------- + Symmetric property -0.020433596781 -2.043360e-02 1 +=========================================================================== + + +=========================================================================== + Memory usage +--------------------------------------------------------------------------- + Total memory current process (GB) 1.13 + Maximum memory process (GB) 1.13 + Minimum memory process (GB) 1.13 + Average memory process (GB) 1.13 +=========================================================================== + + +--------------------------------------------------------------------------- + Wall time: 2.66080e+00 sec +########################################################################### + + + + + +########################################################################### + SCF cycle 2 +--------------------------------------------------------------------------- + + +=========================================================================== + Current precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Orbital threshold (abs) 1.00000e-02 + Property threshold (abs) -1.00000e+00 +=========================================================================== + + +=========================================================================== + Building Coulomb operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute global density 328 nds 4.32 MB 0.04 sec + Compute global potential 136 nds 1.79 MB 0.08 sec +--------------------------------------------------------------------------- + Wall time: 1.14309e-01 sec +=========================================================================== + + +=========================================================================== + Building XC operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute rho_0 (alpha) 392 nds 5.17 MB 0.04 sec + Compute rho_0 (beta) 392 nds 5.17 MB 0.02 sec + Compute rho_1 (alpha) 328 nds 4.32 MB 0.01 sec + Compute rho_1 (beta) 328 nds 4.32 MB 9.89 ms + Make potential 784 nds 10.34 MB 1.67 sec +--------------------------------------------------------------------------- + Wall time: 1.75268e+00 sec +=========================================================================== + + +=========================================================================== + Computing Helmholtz argument +--------------------------------------------------------------------------- + Applying V_1 (sec) 1.21347e-01 + Projecting (1 - rho_0) (sec) 5.08685e-03 + Rotating orbitals (sec) 5.70097e-03 +--------------------------------------------------------------------------- + Wall time: 1.35696e-01 sec +=========================================================================== + + +=========================================================================== + Applying Helmholtz operators +--------------------------------------------------------------------------- + 0 7.787493e-02 264 nds 3.48 MB 0.36 sec + 1 7.787493e-02 264 nds 3.48 MB 0.37 sec +--------------------------------------------------------------------------- + Wall time: 7.31017e-01 sec +=========================================================================== + + +=========================================================================== + Projecting occupied space +--------------------------------------------------------------------------- + Projecting (1 - rho_0) (sec) 3.56600e-03 +--------------------------------------------------------------------------- + Wall time: 3.58378e-03 sec +=========================================================================== + + +=========================================================================== + Iterative subspace accelerator +--------------------------------------------------------------------------- + Push back orbitals (sec) 4.01204e-03 + Setup linear system (sec) 8.44316e-03 + Solve linear system (sec) 4.42200e-06 + Expand solution (sec) 5.12466e-03 +--------------------------------------------------------------------------- + Orbital sizes 544 nds 7.17 MB 0.00 ms + Update sizes 1056 nds 13.92 MB 0.00 ms +--------------------------------------------------------------------------- + Wall time: 1.76822e-02 sec +=========================================================================== + + +=========================================================================== + Computing symmetric property +--------------------------------------------------------------------------- + Trace h_B_dip[x](rho_1) 784 nds 10.34 MB 0.12 sec +--------------------------------------------------------------------------- + Wall time: 1.21769e-01 sec +=========================================================================== + + +=========================================================================== + n Spin Nodes Norm Residual Done +--------------------------------------------------------------------------- + 0 a 328 0.083254268325 1.582779e-02 0 + 1 b 328 0.083254268325 1.582779e-02 0 +--------------------------------------------------------------------------- + Total residual 2.238388e-02 0 +=========================================================================== + + +=========================================================================== + Value Update Done +--------------------------------------------------------------------------- + Symmetric property -0.027640410540 -7.206814e-03 1 +=========================================================================== + + +=========================================================================== + Memory usage +--------------------------------------------------------------------------- + Total memory current process (GB) 1.29 + Maximum memory process (GB) 1.29 + Minimum memory process (GB) 1.29 + Average memory process (GB) 1.29 +=========================================================================== + + +--------------------------------------------------------------------------- + Wall time: 2.88317e+00 sec +########################################################################### + + + + + +########################################################################### + SCF cycle 3 +--------------------------------------------------------------------------- + + +=========================================================================== + Current precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Orbital threshold (abs) 1.00000e-02 + Property threshold (abs) -1.00000e+00 +=========================================================================== + + +=========================================================================== + Building Coulomb operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute global density 328 nds 4.32 MB 0.02 sec + Compute global potential 136 nds 1.79 MB 0.08 sec +--------------------------------------------------------------------------- + Wall time: 9.46194e-02 sec +=========================================================================== + + +=========================================================================== + Building XC operator +--------------------------------------------------------------------------- + Precision (rel) 1.00000e-03 +--------------------------------------------------------------------------- + Compute rho_0 (alpha) 392 nds 5.17 MB 0.01 sec + Compute rho_0 (beta) 392 nds 5.17 MB 0.03 sec + Compute rho_1 (alpha) 328 nds 4.32 MB 0.02 sec + Compute rho_1 (beta) 328 nds 4.32 MB 0.01 sec + Make potential 784 nds 10.34 MB 1.54 sec +--------------------------------------------------------------------------- + Wall time: 1.62320e+00 sec +=========================================================================== + + +=========================================================================== + Computing Helmholtz argument +--------------------------------------------------------------------------- + Applying V_1 (sec) 1.01916e-01 + Projecting (1 - rho_0) (sec) 9.01413e-03 + Rotating orbitals (sec) 7.64307e-03 +--------------------------------------------------------------------------- + Wall time: 1.22287e-01 sec +=========================================================================== + + +=========================================================================== + Applying Helmholtz operators +--------------------------------------------------------------------------- + 0 8.337564e-02 264 nds 3.48 MB 0.37 sec + 1 8.337564e-02 264 nds 3.48 MB 0.40 sec +--------------------------------------------------------------------------- + Wall time: 7.67873e-01 sec +=========================================================================== + + +=========================================================================== + Projecting occupied space +--------------------------------------------------------------------------- + Projecting (1 - rho_0) (sec) 4.47162e-03 +--------------------------------------------------------------------------- + Wall time: 4.49441e-03 sec +=========================================================================== + + +=========================================================================== + Iterative subspace accelerator +--------------------------------------------------------------------------- + Push back orbitals (sec) 7.64264e-03 + Setup linear system (sec) 3.15701e-02 + Solve linear system (sec) 7.60300e-06 + Expand solution (sec) 9.03710e-03 +--------------------------------------------------------------------------- + Orbital sizes 1200 nds 15.82 MB 0.00 ms + Update sizes 1712 nds 22.57 MB 0.00 ms +--------------------------------------------------------------------------- + Wall time: 4.83645e-02 sec +=========================================================================== + + +=========================================================================== + Computing symmetric property +--------------------------------------------------------------------------- + Trace h_B_dip[x](rho_1) 784 nds 10.34 MB 0.13 sec +--------------------------------------------------------------------------- + Wall time: 1.25648e-01 sec +=========================================================================== + + +=========================================================================== + n Spin Nodes Norm Residual Done +--------------------------------------------------------------------------- + 0 a 328 0.083438065984 2.539508e-04 1 + 1 b 328 0.083438065984 2.539508e-04 1 +--------------------------------------------------------------------------- + Total residual 3.591407e-04 1 +=========================================================================== + + +=========================================================================== + Value Update Done +--------------------------------------------------------------------------- + Symmetric property -0.027745962246 -1.055517e-04 1 +=========================================================================== + + +=========================================================================== + Memory usage +--------------------------------------------------------------------------- + Total memory current process (GB) 1.38 + Maximum memory process (GB) 1.38 + Minimum memory process (GB) 1.38 + Average memory process (GB) 1.38 +=========================================================================== + + +--------------------------------------------------------------------------- + Wall time: 2.79560e+00 sec +########################################################################### + + + + + =========================================================================== Iter MO residual Symmetric property Update --------------------------------------------------------------------------- 0 1.000000e+00 0.000000000000 0.000000e+00 1 8.780898e-02 -0.020433596781 -2.043360e-02 - 2 2.040507e-02 -0.027068845752 -6.635249e-03 - 3 6.574223e-04 -0.027301384939 -2.325392e-04 + 2 2.238388e-02 -0.027640410540 -7.206814e-03 + 3 3.591407e-04 -0.027745962246 -1.055517e-04 --------------------------------------------------------------------------- SCF converged in 3 iterations! =========================================================================== +=========================================================================== + Computing magnetizability (para) +--------------------------------------------------------------------------- + Trace h_B_dip[x](rho_1) 784 nds 10.34 MB 0.12 sec + Trace h_B_dip[y](rho_1) 784 nds 10.34 MB 0.12 sec + Trace h_B_dip[z](rho_1) 656 nds 8.65 MB 0.11 sec +--------------------------------------------------------------------------- + Wall time: 3.51185e-01 sec +=========================================================================== + + +=========================================================================== + Computing NMR shielding (para) +--------------------------------------------------------------------------- + Trace h_M_pso[x](rho_1) 848 nds 11.18 MB 0.14 sec + Trace h_M_pso[y](rho_1) 848 nds 11.18 MB 0.14 sec + Trace h_M_pso[z](rho_1) 784 nds 10.34 MB 0.14 sec +--------------------------------------------------------------------------- + Wall time: 4.82220e-01 sec +=========================================================================== + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Calculation : Compute initial orbitals Method : Zero guess @@ -246,8 +872,11 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Norm --------------------------------------------------------------------------- - 0 1 a : -1.000000000000e+00 - 1 1 b : -1.000000000000e+00 + 0 1 a : 0.000000000000e+00 + 1 1 b : 0.000000000000e+00 +--------------------------------------------------------------------------- + Total MO nodes : 0 + Total MO memory : (MB) 0.00 =========================================================================== @@ -266,8 +895,11 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Norm --------------------------------------------------------------------------- - 0 1 a : -1.000000000000e+00 - 1 1 b : -1.000000000000e+00 + 0 1 a : 0.000000000000e+00 + 1 1 b : 0.000000000000e+00 +--------------------------------------------------------------------------- + Total MO nodes : 0 + Total MO memory : (MB) 0.00 =========================================================================== @@ -301,16 +933,16 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s E-N energy : (au) -3.566631555860 Coulomb energy : (au) 1.328363917978 Exchange energy : (au) 0.000000000000 - X-C energy : (au) -0.653870455417 + X-C energy : (au) -0.653870455418 N-N energy : (au) 0.714139285969 --------------------------------------------------------------------------- - Electronic energy : (au) -1.818652028066 + Electronic energy : (au) -1.818652028068 Nuclear energy : (au) 0.714139285969 --------------------------------------------------------------------------- - Total energy : (au) -1.104512742097e+00 - : (kcal/mol) -6.930922098894e+02 - : (kJ/mol) -2.899897806177e+03 - : (eV) -3.005532283883e+01 + Total energy : (au) -1.104512742099e+00 + : (kcal/mol) -6.930922098902e+02 + : (kJ/mol) -2.899897806181e+03 + : (eV) -3.005532283886e+01 =========================================================================== @@ -335,7 +967,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s Magnitude : (au) 0.000023 : (Debye) 0.000059 --------------------------------------------------------------------------- - Nuclear vector : 0.000000 0.000000 0.000000 + Nuclear vector : 0.000000 0.000000 -0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 --------------------------------------------------------------------------- @@ -352,19 +984,19 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s : (cm-1) 0.000000 r_O : 0.000000 0.000000 0.000000 --------------------------------------------------------------------------- - Diamagnetic : -0.913111 -0.000000 0.000000 - : -0.000000 -0.913111 0.000000 - : 0.000000 0.000000 -0.772210 + Diamagnetic : -0.913111 0.000000 0.000000 + : 0.000000 -0.913111 -0.000000 + : 0.000000 -0.000000 -0.772210 Isotropic average : (au) -0.866144 : (SI) -68.377861 --------------------------------------------------------------------------- - Paramagnetic : 0.027301 0.000000 -0.000000 + Paramagnetic : 0.027746 0.000000 0.000000 : N/A N/A N/A : N/A N/A N/A Isotropic average : (au) N/A : (SI) N/A --------------------------------------------------------------------------- - Total tensor : -0.885810 0.000000 -0.000000 + Total tensor : -0.885365 0.000000 0.000000 : N/A N/A N/A : N/A N/A N/A Isotropic average : (au) N/A @@ -378,15 +1010,15 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s r_O : 0.000000 0.000000 0.000000 r_K : 0.000000 0.000000 -0.700144 --------------------------------------------------------------------------- - Diamagnetic : 25.527088 -0.000000 -0.000000 - : 0.000000 25.527088 -0.000000 - : -0.000000 -0.000000 26.747535 + Diamagnetic : 25.527088 0.000000 -0.000000 + : 0.000000 25.527088 0.000000 + : -0.000000 0.000000 26.747535 --------------------------------------------------------------------------- - Paramagnetic : 0.550389 -0.000000 0.000000 + Paramagnetic : 0.544684 0.000000 -0.000000 : N/A N/A N/A : N/A N/A N/A --------------------------------------------------------------------------- - Total tensor : 26.077476 -0.000000 0.000000 + Total tensor : 26.071771 0.000000 -0.000000 : N/A N/A N/A : N/A N/A N/A --------------------------------------------------------------------------- @@ -402,7 +1034,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *** *** *** Exiting MRChem *** *** *** -*** Wall time : 0h 0m 9s *** +*** Wall time : 0h 0m 12s *** *** *** *************************************************************************** diff --git a/tests/h2_scf_cube/reference/h2.json b/tests/h2_scf_cube/reference/h2.json index bac91d9d3..5732d52ce 100644 --- a/tests/h2_scf_cube/reference/h2.json +++ b/tests/h2_scf_cube/reference/h2.json @@ -1,22 +1,38 @@ { "input": { "constants": { + "N_a": 6.02214076e+23, "angstrom2bohrs": 1.8897261246257702, + "boltzmann_constant": 1.380649e-23, "dipmom_au2debye": 2.5417464739297717, + "e0": 8.8541878128e-12, "electron_g_factor": -2.00231930436256, + "elementary_charge": 1.602176634e-19, "fine_structure_constant": 0.0072973525693, "hartree2ev": 27.211386245988, "hartree2kcalmol": 627.5094740630558, "hartree2kjmol": 2625.4996394798254, "hartree2simagnetizability": 78.9451185, "hartree2wavenumbers": 219474.6313632, - "light_speed": 137.035999084 + "light_speed": 137.035999084, + "meter2bohr": 18897261246.2577 + }, + "geom_opt": { + "init_step_size": -0.5, + "max_force_component": 0.005, + "max_history_length": 10, + "max_iter": 100, + "minimal_step_size": 0.01, + "run": false, + "subspace_tolerance": 0.001, + "use_previous_guess": false }, "molecule": { "charge": 0, "coords": [ { "atom": "h", + "r_rms": 2.6569547399e-05, "xyz": [ 0.0, 0.0, @@ -25,6 +41,7 @@ }, { "atom": "h", + "r_rms": 2.6569547399e-05, "xyz": [ 0.0, 0.0, @@ -35,9 +52,12 @@ "multiplicity": 1 }, "mpi": { + "bank_per_node": -1, "bank_size": -1, "numerically_exact": true, - "shared_memory_size": 10000 + "omp_threads": -1, + "shared_memory_size": 10000, + "use_omp_num_threads": false }, "mra": { "basis_order": 7, @@ -78,6 +98,7 @@ "derivative": "abgv_55" }, "nuclear_operator": { + "nuclear_model": "point_like", "proj_prec": 0.001, "shared_memory": false, "smooth_prec": 0.001 @@ -102,6 +123,7 @@ "prec": 0.001, "relativity": "None", "restricted": true, + "rotate": true, "screen": 12.0, "type": "cube", "zeta": 0 @@ -145,26 +167,26 @@ "center_of_mass": [ 0.0, 0.0, - 0.0 + -1.0790011801500128e-17 ], "charge": 0, "dipole_moment": { "dip-1": { - "magnitude": 0.00012102753578936309, + "magnitude": 0.00012092406391447963, "r_O": [ 0.0, 0.0, 0.0 ], "vector": [ - 8.55475075913613e-05, - 8.554750760505124e-05, - -3.303378076340241e-06 + 8.547430783368667e-05, + 8.547430783737533e-05, + -3.30373026546085e-06 ], "vector_el": [ - 8.554750693863842e-05, - 8.55475069398344e-05, - -3.303378077894553e-06 + 8.547430717730367e-05, + 8.547430717487773e-05, + -3.3037302634624487e-06 ], "vector_nuc": [ 0.0, @@ -194,7 +216,7 @@ "multiplicity": 1, "orbital_energies": { "energy": [ - -0.6041439916486521 + -0.6040968973290005 ], "occupation": [ 2.0 @@ -202,19 +224,19 @@ "spin": [ "p" ], - "sum_occupied": -1.2082879832973041 + "sum_occupied": -1.208193794658001 }, "scf_energy": { - "E_ee": 1.336599781488902, + "E_ee": 1.3367894596221979, "E_eext": 0.0, - "E_el": -1.8765903594447302, - "E_en": -3.6996424251152353, - "E_kin": 1.1547496895230769, + "E_el": -1.8765910088977398, + "E_en": -3.7001047171356194, + "E_kin": 1.155116493998143, "E_next": 0.0, "E_nn": 0.7431319742935788, "E_nuc": 0.7431319742935788, - "E_tot": -1.1334583851511515, - "E_x": -0.6682974053414734, + "E_tot": -1.133459034604161, + "E_x": -0.6683922453824612, "E_xc": 0.0, "Er_el": 0.0, "Er_nuc": 0.0, @@ -232,16 +254,16 @@ "rsp_calculations": null, "scf_calculation": { "initial_energy": { - "E_ee": 1.3538226445895374, + "E_ee": 1.353822648870343, "E_eext": 0.0, - "E_el": -1.8275794505669825, - "E_en": -3.737803179434459, - "E_kin": 1.2333096343690937, + "E_el": -1.8288574942268974, + "E_en": -3.7378031794343007, + "E_kin": 1.2333096343690924, "E_next": 0.0, "E_nn": 0.7431319742935788, "E_nuc": 0.7431319742935788, - "E_tot": -1.0844474762734038, - "E_x": -0.6769085500911546, + "E_tot": -1.0857255199333187, + "E_x": -0.6781865980320322, "E_xc": 0.0, "Er_el": 0.0, "Er_nuc": 0.0, @@ -252,50 +274,50 @@ "cycles": [ { "energy_terms": { - "E_ee": 1.3334650996810284, + "E_ee": 1.334102156803025, "E_eext": 0.0, - "E_el": -1.8760091767528069, - "E_en": -3.6909547785327312, - "E_kin": 1.1482104628294079, + "E_el": -1.8760154161322915, + "E_en": -3.6924635391293887, + "E_kin": 1.1493944585501088, "E_next": 0.0, "E_nn": 0.7431319742935788, "E_nuc": 0.7431319742935788, - "E_tot": -1.1328772024592282, - "E_x": -0.6667299607305119, + "E_tot": -1.1328834418387128, + "E_x": -0.6670484923560364, "E_xc": 0.0, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -1.1328772024592282, - "energy_update": 0.04842972618582442, - "mo_residual": 0.048367387481250995, - "wall_time": 0.705733583 + "energy_total": -1.1328834418387128, + "energy_update": 0.04715792190539414, + "mo_residual": 0.048072947749071754, + "wall_time": 1.35335435 }, { "energy_terms": { - "E_ee": 1.336599781488902, + "E_ee": 1.3367894596221979, "E_eext": 0.0, - "E_el": -1.8765903594447302, - "E_en": -3.6996424251152353, - "E_kin": 1.1547496895230769, + "E_el": -1.8765910088977398, + "E_en": -3.7001047171356194, + "E_kin": 1.155116493998143, "E_next": 0.0, "E_nn": 0.7431319742935788, "E_nuc": 0.7431319742935788, - "E_tot": -1.1334583851511515, - "E_x": -0.6682974053414734, + "E_tot": -1.133459034604161, + "E_x": -0.6683922453824612, "E_xc": 0.0, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -1.1334583851511515, - "energy_update": 0.0005811826919233098, - "mo_residual": 0.00932449268671754, - "wall_time": 0.74150425 + "energy_total": -1.133459034604161, + "energy_update": 0.000575592765448274, + "mo_residual": 0.009349602054305949, + "wall_time": 1.338637456 } ], - "wall_time": 1.447400583 + "wall_time": 2.6933379 }, "success": true }, diff --git a/tests/h2_scf_cube/reference/h2.out b/tests/h2_scf_cube/reference/h2.out index 6badef930..bde6f8d10 100644 --- a/tests/h2_scf_cube/reference/h2.out +++ b/tests/h2_scf_cube/reference/h2.out @@ -11,10 +11,10 @@ *** *** *** VERSION 1.2.0-alpha *** *** *** -*** Git branch cube_guess_rsp *** -*** Git commit hash c9957c8f3de4e8bfb96f-dirty *** -*** Git commit author ggerez *** -*** Git commit date Wed Oct 26 21:23:07 2022 +0200 *** +*** Git branch text *** +*** Git commit hash 20e53b0ebebbbed503cb-dirty *** +*** Git commit author gitpeterwind *** +*** Git commit date Thu Feb 20 16:31:25 2025 +0100 *** *** *** *** Contact: luca.frediani@uit.no *** *** *** @@ -46,14 +46,14 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- - MRCPP version : 1.4.1 - Git branch : HEAD - Git commit hash : 75d41879b1908a94a452 - Git commit author : Stig Rune Jensen - Git commit date : Thu Jan 6 11:38:53 2022 +0100 + MRCPP version : 1.6.0-alpha + Git branch : merge + Git commit hash : d82d0d16fbefc341d12f + Git commit author : gitpeterwind + Git commit date : Thu Feb 20 16:02:13 2025 +0100 Linear algebra : EIGEN v3.4.0 - Parallelization : OpenMP (8 threads) + Parallelization : MPI/OpenMP (8 threads) --------------------------------------------------------------------------- @@ -94,7 +94,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s 0 H : 0.000000 0.000000 0.672828 1 H : 0.000000 0.000000 -0.672828 --------------------------------------------------------------------------- - Center of mass : 0.000000 0.000000 0.000000 + Center of mass : 0.000000 0.000000 -0.000000 =========================================================================== @@ -144,18 +144,18 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- Kinetic energy : (au) 1.233309634369 E-N energy : (au) -3.737803179434 - Coulomb energy : (au) 1.353822644590 - Exchange energy : (au) -0.676908550091 + Coulomb energy : (au) 1.353822648870 + Exchange energy : (au) -0.678186598032 X-C energy : (au) 0.000000000000 N-N energy : (au) 0.743131974294 --------------------------------------------------------------------------- - Electronic energy : (au) -1.827579450567 + Electronic energy : (au) -1.828857494227 Nuclear energy : (au) 0.743131974294 --------------------------------------------------------------------------- - Total energy : (au) -1.084447476273e+00 - : (kcal/mol) -6.805010654853e+02 - : (kJ/mol) -2.847216457991e+03 - : (eV) -2.950931914036e+01 + Total energy : (au) -1.085725519933e+00 + : (kcal/mol) -6.813030499902e+02 + : (kJ/mol) -2.850571961159e+03 + : (eV) -2.954409648003e+01 =========================================================================== @@ -164,9 +164,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Epsilon --------------------------------------------------------------------------- - 0 2 p : (au) -0.576418944036 + 0 2 p : (au) -0.577699400727 --------------------------------------------------------------------------- - Sum occupied : (au) -1.152837888073 + Sum occupied : (au) -1.155398801454 =========================================================================== @@ -200,9 +200,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== Iter MO residual Total energy Update --------------------------------------------------------------------------- - 0 1.000000e+00 -1.084447476273 -1.084447e+00 - 1 4.836739e-02 -1.132877202459 -4.842973e-02 - 2 9.324493e-03 -1.133458385151 -5.811827e-04 + 0 1.000000e+00 -1.085725519933 -1.085726e+00 + 1 4.807295e-02 -1.132883441839 -4.715792e-02 + 2 9.349602e-03 -1.133459034604 -5.755928e-04 --------------------------------------------------------------------------- SCF converged in 2 iterations! =========================================================================== @@ -227,27 +227,27 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s 0 H : 0.000000 0.000000 0.672828 1 H : 0.000000 0.000000 -0.672828 --------------------------------------------------------------------------- - Center of mass : 0.000000 0.000000 0.000000 + Center of mass : 0.000000 0.000000 -0.000000 =========================================================================== =========================================================================== Molecular Energy (final) --------------------------------------------------------------------------- - Kinetic energy : (au) 1.154749689523 - E-N energy : (au) -3.699642425115 - Coulomb energy : (au) 1.336599781489 - Exchange energy : (au) -0.668297405341 + Kinetic energy : (au) 1.155116493998 + E-N energy : (au) -3.700104717136 + Coulomb energy : (au) 1.336789459622 + Exchange energy : (au) -0.668392245382 X-C energy : (au) 0.000000000000 N-N energy : (au) 0.743131974294 --------------------------------------------------------------------------- - Electronic energy : (au) -1.876590359445 + Electronic energy : (au) -1.876591008898 Nuclear energy : (au) 0.743131974294 --------------------------------------------------------------------------- - Total energy : (au) -1.133458385151e+00 - : (kcal/mol) -7.112558751386e+02 - : (kJ/mol) -2.975894581580e+03 - : (eV) -3.084297391210e+01 + Total energy : (au) -1.133459034604e+00 + : (kcal/mol) -7.112562826765e+02 + : (kJ/mol) -2.975896286718e+03 + : (eV) -3.084299158462e+01 =========================================================================== @@ -256,9 +256,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Epsilon --------------------------------------------------------------------------- - 0 2 p : (au) -0.604143991649 + 0 2 p : (au) -0.604096897329 --------------------------------------------------------------------------- - Sum occupied : (au) -1.208287983297 + Sum occupied : (au) -1.208193794658 =========================================================================== @@ -267,17 +267,17 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- r_O : 0.000000 0.000000 0.000000 --------------------------------------------------------------------------- - Electronic vector : 0.000086 0.000086 -0.000003 + Electronic vector : 0.000085 0.000085 -0.000003 Magnitude : (au) 0.000121 - : (Debye) 0.000308 + : (Debye) 0.000307 --------------------------------------------------------------------------- - Nuclear vector : 0.000000 0.000000 0.000000 + Nuclear vector : 0.000000 0.000000 -0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 --------------------------------------------------------------------------- - Total vector : 0.000086 0.000086 -0.000003 + Total vector : 0.000085 0.000085 -0.000003 Magnitude : (au) 0.000121 - : (Debye) 0.000308 + : (Debye) 0.000307 =========================================================================== @@ -287,7 +287,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *** *** *** Exiting MRChem *** *** *** -*** Wall time : 0h 0m 2s *** +*** Wall time : 0h 0m 3s *** *** *** *************************************************************************** diff --git a/tests/he_azora_scf_lda/reference/he.json b/tests/he_azora_scf_lda/reference/he.json index 9b19c6480..2820fc9e2 100644 --- a/tests/he_azora_scf_lda/reference/he.json +++ b/tests/he_azora_scf_lda/reference/he.json @@ -43,10 +43,12 @@ "multiplicity": 1 }, "mpi": { + "bank_per_node": -1, "bank_size": -1, "numerically_exact": false, "omp_threads": -1, - "shared_memory_size": 10000 + "shared_memory_size": 10000, + "use_omp_num_threads": false }, "mra": { "basis_order": 6, @@ -180,7 +182,7 @@ "charge": 0, "dipole_moment": { "dip-1": { - "magnitude": 1.5414130052328172e-12, + "magnitude": 1.5414920951633602e-12, "r_O": [ 0.0, 0.0, @@ -216,7 +218,7 @@ "multiplicity": 1, "orbital_energies": { "energy": [ - -0.570464666039006 + -0.5704007761054695 ], "occupation": [ 2.0 @@ -224,20 +226,20 @@ "spin": [ "p" ], - "sum_occupied": -1.140929332078012 + "sum_occupied": -1.140801552210939 }, "scf_energy": { - "E_ee": 1.9962222364216329, + "E_ee": 1.9963745215123725, "E_eext": 0.0, - "E_el": -2.835003921655858, - "E_en": -6.625820552295827, - "E_kin": 2.7679525130939138, + "E_el": -2.835003659740279, + "E_en": -6.626725190706208, + "E_kin": 2.768781940543058, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.835003921655858, + "E_tot": -2.835003659740279, "E_x": 0.0, - "E_xc": -0.9733581188755775, + "E_xc": -0.9734349310895016, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -254,17 +256,17 @@ "rsp_calculations": null, "scf_calculation": { "initial_energy": { - "E_ee": 2.0262673615492934, + "E_ee": 2.026267361549307, "E_eext": 0.0, - "E_el": -2.8061198579393087, - "E_en": -6.595209258134876, - "E_kin": 2.7470772638332845, + "E_el": -2.8061198579393025, + "E_en": -6.595209258134899, + "E_kin": 2.7470772638333023, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.8061198579393087, + "E_tot": -2.8061198579393025, "E_x": 0.0, - "E_xc": -0.9842552251870108, + "E_xc": -0.9842552251870131, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -274,94 +276,94 @@ "cycles": [ { "energy_terms": { - "E_ee": 1.973384349083191, + "E_ee": 1.973454903476738, "E_eext": 0.0, - "E_el": -2.8339954491064434, - "E_en": -6.528192694988571, - "E_kin": 2.683318941139394, + "E_el": -2.8340004234902696, + "E_en": -6.528494065821852, + "E_kin": 2.683578446384354, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.8339954491064434, + "E_tot": -2.8340004234902696, "E_x": 0.0, - "E_xc": -0.9625060443404567, + "E_xc": -0.9625397075295093, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.8339954491064434, - "energy_update": 0.027875591167134672, - "mo_residual": 0.0708364444278362, - "wall_time": 1.743911586 + "energy_total": -2.8340004234902696, + "energy_update": 0.027880565550967074, + "mo_residual": 0.07082956967896031, + "wall_time": 5.168367268 }, { "energy_terms": { - "E_ee": 1.994312226962929, + "E_ee": 1.9944389536829372, "E_eext": 0.0, - "E_el": -2.8349265026797847, - "E_en": -6.6081583679284135, - "E_kin": 2.7511471759544044, + "E_el": -2.834931135266824, + "E_en": -6.6088427216457, + "E_kin": 2.751762567689448, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.8349265026797847, + "E_tot": -2.834931135266824, "E_x": 0.0, - "E_xc": -0.9722275376687047, + "E_xc": -0.9722899349935096, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.8349265026797847, - "energy_update": 0.0009310535733413339, - "mo_residual": 0.008304451068131975, - "wall_time": 1.454814606 + "energy_total": -2.834931135266824, + "energy_update": 0.0009307117765544604, + "mo_residual": 0.00832608599060421, + "wall_time": 4.016954991 }, { "energy_terms": { - "E_ee": 1.9954809275242602, + "E_ee": 1.995625018626864, "E_eext": 0.0, - "E_el": -2.834996526943462, - "E_en": -6.620132609175466, - "E_kin": 2.7626021706049264, + "E_el": -2.834998015697588, + "E_en": -6.620962688861026, + "E_kin": 2.763358717948742, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.834996526943462, + "E_tot": -2.834998015697588, "E_x": 0.0, - "E_xc": -0.9729470158971822, + "E_xc": -0.9730190634121684, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.834996526943462, - "energy_update": 7.002426367730408e-05, - "mo_residual": 0.0016099564962614482, - "wall_time": 1.523955258 + "energy_total": -2.834998015697588, + "energy_update": 6.688043076374939e-05, + "mo_residual": 0.0016209750441733546, + "wall_time": 4.143607482 }, { "energy_terms": { - "E_ee": 1.9962222364216329, + "E_ee": 1.9963745215123725, "E_eext": 0.0, - "E_el": -2.835003921655858, - "E_en": -6.625820552295827, - "E_kin": 2.7679525130939138, + "E_el": -2.835003659740279, + "E_en": -6.626725190706208, + "E_kin": 2.768781940543058, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.835003921655858, + "E_tot": -2.835003659740279, "E_x": 0.0, - "E_xc": -0.9733581188755775, + "E_xc": -0.9734349310895016, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.835003921655858, - "energy_update": 7.394712395747405e-06, - "mo_residual": 0.0005919718940979519, - "wall_time": 1.566191235 + "energy_total": -2.835003659740279, + "energy_update": 5.6440426909887265e-06, + "mo_residual": 0.0005992057489075751, + "wall_time": 4.082386875 } ], - "wall_time": 6.289502326 + "wall_time": 17.417561054 }, "success": true }, diff --git a/tests/he_azora_scf_lda/reference/he.out b/tests/he_azora_scf_lda/reference/he.out index 8bc4fec38..ecb00b129 100644 --- a/tests/he_azora_scf_lda/reference/he.out +++ b/tests/he_azora_scf_lda/reference/he.out @@ -11,10 +11,10 @@ *** *** *** VERSION 1.2.0-alpha *** *** *** -*** Git branch azora_all_potentials *** -*** Git commit hash fdae9976706e98637414 *** -*** Git commit author moritzgubler *** -*** Git commit date Tue Oct 22 11:38:42 2024 +0200 *** +*** Git branch text *** +*** Git commit hash 424eb54bef32d3a65379-dirty *** +*** Git commit author gitpeterwind *** +*** Git commit date Tue Mar 11 11:40:04 2025 +0100 *** *** *** *** Contact: luca.frediani@uit.no *** *** *** @@ -47,10 +47,10 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- MRCPP version : 1.6.0-alpha - Git branch : HEAD - Git commit hash : 720133372c9717134c5a + Git branch : merge + Git commit hash : 0eccd59fbfa419dc6a65-dirty Git commit author : gitpeterwind - Git commit date : Thu Feb 15 13:44:31 2024 +0100 + Git commit date : Mon Mar 10 14:49:47 2025 +0100 Linear algebra : EIGEN v3.4.0 Parallelization : MPI/OpenMP (8 threads) @@ -202,10 +202,10 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s Iter MO residual Total energy Update --------------------------------------------------------------------------- 0 1.000000e+00 -2.806119857939 -2.806120e+00 - 1 7.083644e-02 -2.833995449106 -2.787559e-02 - 2 8.304451e-03 -2.834926502680 -9.310536e-04 - 3 1.609956e-03 -2.834996526943 -7.002426e-05 - 4 5.919719e-04 -2.835003921656 -7.394712e-06 + 1 7.082957e-02 -2.834000423490 -2.788057e-02 + 2 8.326086e-03 -2.834931135267 -9.307118e-04 + 3 1.620975e-03 -2.834998015698 -6.688043e-05 + 4 5.992057e-04 -2.835003659740 -5.644043e-06 --------------------------------------------------------------------------- SCF converged in 4 iterations! =========================================================================== @@ -236,20 +236,20 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== Molecular Energy (final) --------------------------------------------------------------------------- - Kinetic energy : (au) 2.767952513094 - E-N energy : (au) -6.625820552296 - Coulomb energy : (au) 1.996222236422 + Kinetic energy : (au) 2.768781940543 + E-N energy : (au) -6.626725190706 + Coulomb energy : (au) 1.996374521512 Exchange energy : (au) 0.000000000000 - X-C energy : (au) -0.973358118876 + X-C energy : (au) -0.973434931090 N-N energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Electronic energy : (au) -2.835003921656 + Electronic energy : (au) -2.835003659740 Nuclear energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Total energy : (au) -2.835003921656e+00 - : (kcal/mol) -1.778991819845e+03 - : (kJ/mol) -7.443301774231e+03 - : (eV) -7.714438672107e+01 + Total energy : (au) -2.835003659740e+00 + : (kcal/mol) -1.778991655490e+03 + : (kJ/mol) -7.443301086572e+03 + : (eV) -7.714437959398e+01 =========================================================================== @@ -258,9 +258,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Epsilon --------------------------------------------------------------------------- - 0 2 p : (au) -0.570464666039 + 0 2 p : (au) -0.570400776105 --------------------------------------------------------------------------- - Sum occupied : (au) -1.140929332078 + Sum occupied : (au) -1.140801552211 =========================================================================== @@ -269,7 +269,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- r_O : 0.000000 0.000000 0.000000 --------------------------------------------------------------------------- - Electronic vector : 0.000000 0.000000 0.000000 + Electronic vector : -0.000000 0.000000 0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 --------------------------------------------------------------------------- @@ -289,7 +289,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *** *** *** Exiting MRChem *** *** *** -*** Wall time : 0h 0m 7s *** +*** Wall time : 0h 0m 20s *** *** *** *************************************************************************** diff --git a/tests/he_zora_scf_lda/reference/he.json b/tests/he_zora_scf_lda/reference/he.json index 34a1bdcc3..d8aa48438 100644 --- a/tests/he_zora_scf_lda/reference/he.json +++ b/tests/he_zora_scf_lda/reference/he.json @@ -1,21 +1,38 @@ { "input": { + "constants": { + "N_a": 6.02214076e+23, + "angstrom2bohrs": 1.8897261246257702, + "boltzmann_constant": 1.380649e-23, + "dipmom_au2debye": 2.5417464739297717, + "e0": 8.8541878128e-12, + "electron_g_factor": -2.00231930436256, + "elementary_charge": 1.602176634e-19, + "fine_structure_constant": 0.0072973525693, + "hartree2ev": 27.211386245988, + "hartree2kcalmol": 627.5094740630558, + "hartree2kjmol": 2625.4996394798254, + "hartree2simagnetizability": 78.9451185, + "hartree2wavenumbers": 219474.6313632, + "light_speed": 137.035999084, + "meter2bohr": 18897261246.2577 + }, + "geom_opt": { + "init_step_size": -0.5, + "max_force_component": 0.005, + "max_history_length": 10, + "max_iter": 100, + "minimal_step_size": 0.01, + "run": false, + "subspace_tolerance": 0.001, + "use_previous_guess": false + }, "molecule": { - "cavity_coords": [ - { - "center": [ - 0.0, - 0.0, - 0.0 - ], - "radius": 0.49 - } - ], - "cavity_width": 0.2, "charge": 0, "coords": [ { "atom": "he", + "r_rms": 3.5849373401e-05, "xyz": [ 0.0, 0.0, @@ -26,9 +43,12 @@ "multiplicity": 1 }, "mpi": { + "bank_per_node": -1, "bank_size": -1, "numerically_exact": true, - "shared_memory_size": 10000 + "omp_threads": -1, + "shared_memory_size": 10000, + "use_omp_num_threads": false }, "mra": { "basis_order": 6, @@ -47,7 +67,8 @@ "min_scale": -4 }, "printer": { - "file_name": "he.inp", + "file_name": "he", + "print_constants": false, "print_level": 0, "print_mpi": false, "print_prec": 6, @@ -68,6 +89,7 @@ "derivative": "abgv_55" }, "nuclear_operator": { + "nuclear_model": "point_like", "proj_prec": 0.0001, "shared_memory": false, "smooth_prec": 0.0001 @@ -86,17 +108,16 @@ } }, "zora_operator": { - "derivative": "abgv_00", + "azora_potential_path": "none", "include_coulomb": true, "include_nuclear": true, "include_xc": true, - "light_speed": -1.0, - "proj_prec": 0.0001, - "shared_memory": false, - "zora_name": "V_nuc + J + V_xc" + "isAZORA": false } }, "initial_guess": { + "environment": "None", + "external_field": "None", "file_CUBE_a": "cube_vectors/CUBE_a_vector.json", "file_CUBE_b": "cube_vectors/CUBE_b_vector.json", "file_CUBE_p": "cube_vectors/CUBE_p_vector.json", @@ -111,7 +132,9 @@ "localize": false, "method": "DFT (SVWN5)", "prec": 0.001, + "relativity": "ZORA (V_nuc + J + V_xc)", "restricted": true, + "rotate": true, "screen": 12.0, "type": "sad_gto", "zeta": 0 @@ -131,21 +154,19 @@ }, "scf_solver": { "checkpoint": false, - "derivative": "abgv_55", "energy_thrs": -1.0, + "environment": "None", + "external_field": "None", "file_chk": "checkpoint/phi_scf", "final_prec": 0.0001, "helmholtz_prec": -1.0, "kain": 3, - "light_speed": -1.0, "localize": false, "max_iter": 10, "method": "DFT (SVWN5)", "orbital_thrs": 0.001, - "proj_prec": 0.0001, + "relativity": "ZORA (V_nuc + J + V_xc)", "rotation": 0, - "shared_memory": false, - "smooth_prec": 0.0001, "start_prec": 0.0001 } }, @@ -162,7 +183,7 @@ "charge": 0, "dipole_moment": { "dip-1": { - "magnitude": 1.6485316545052976e-12, + "magnitude": 1.542106949032493e-12, "r_O": [ 0.0, 0.0, @@ -198,7 +219,7 @@ "multiplicity": 1, "orbital_energies": { "energy": [ - -0.5704630326974147 + -0.5704492537597297 ], "occupation": [ 2.0 @@ -206,20 +227,20 @@ "spin": [ "p" ], - "sum_occupied": -1.1409260653948294 + "sum_occupied": -1.1408985075194593 }, "scf_energy": { - "E_ee": 1.996217846379536, + "E_ee": 1.9962499538744778, "E_eext": 0.0, - "E_el": -2.834996716647101, - "E_en": -6.625775882596239, - "E_kin": 2.7679180339641842, + "E_el": -2.83499670951828, + "E_en": -6.625853034415928, + "E_kin": 2.7679773255491114, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.834996716647101, + "E_tot": -2.83499670951828, "E_x": 0.0, - "E_xc": -0.9733567143945823, + "E_xc": -0.973370954525941, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -228,25 +249,25 @@ "provenance": { "creator": "MRChem", "mpi_processes": 1, - "nthreads": 1, + "nthreads": 8, "routine": "mrchem.x", - "total_cores": 1, - "version": "1.1.0-alpha" + "total_cores": 8, + "version": "1.2.0-alpha" }, "rsp_calculations": null, "scf_calculation": { "initial_energy": { - "E_ee": 2.0262335299416043, + "E_ee": 2.0262337869528113, "E_eext": 0.0, - "E_el": -2.8061556823630203, - "E_en": -6.595208378004834, - "E_kin": 2.747074273083615, + "E_el": -2.80615568566285, + "E_en": -6.595209258134901, + "E_kin": 2.7470750107062547, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.8061556823630203, + "E_tot": -2.80615568566285, "E_x": 0.0, - "E_xc": -0.9842551073834055, + "E_xc": -0.9842552251870154, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -256,94 +277,94 @@ "cycles": [ { "energy_terms": { - "E_ee": 1.973402830937237, + "E_ee": 1.9734310654599547, "E_eext": 0.0, - "E_el": -2.833987278675155, - "E_en": -6.5281606096464255, - "E_kin": 2.683284608278111, + "E_el": -2.833987061287649, + "E_en": -6.528222080916429, + "E_kin": 2.6833304687079758, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.833987278675155, + "E_tot": -2.833987061287649, "E_x": 0.0, - "E_xc": -0.9625141082440773, + "E_xc": -0.9625265145391508, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.833987278675155, - "energy_update": 0.02783159631213472, - "mo_residual": 0.07082703377051887, - "wall_time": 10.783067583 + "energy_total": -2.833987061287649, + "energy_update": 0.027831375624799204, + "mo_residual": 0.07082267370437828, + "wall_time": 5.21624277 }, { "energy_terms": { - "E_ee": 1.994301431073986, + "E_ee": 1.9943326922467532, "E_eext": 0.0, - "E_el": -2.8349193363867737, - "E_en": -6.608076215251544, - "E_kin": 2.7510784490365836, + "E_el": -2.834919114440426, + "E_en": -6.608148338681173, + "E_kin": 2.751133335290433, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.8349193363867737, + "E_tot": -2.834919114440426, "E_x": 0.0, - "E_xc": -0.9722230012457991, + "E_xc": -0.9722368032964397, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.8349193363867737, - "energy_update": 0.0009320577116187501, - "mo_residual": 0.008294011635193504, - "wall_time": 9.604656912 + "energy_total": -2.834919114440426, + "energy_update": 0.0009320531527770015, + "mo_residual": 0.00829510592408947, + "wall_time": 3.998766815 }, { "energy_terms": { - "E_ee": 1.9954753078793337, + "E_ee": 1.995506697315253, "E_eext": 0.0, - "E_el": -2.834989319138095, - "E_en": -6.6200765764483585, - "E_kin": 2.76255683132616, + "E_el": -2.8349892591116777, + "E_en": -6.62015064389032, + "E_kin": 2.762613465932622, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.834989319138095, + "E_tot": -2.8349892591116777, "E_x": 0.0, - "E_xc": -0.9729448818952299, + "E_xc": -0.9729587784692322, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.834989319138095, - "energy_update": 6.998275132108489e-05, - "mo_residual": 0.0016104607155005331, - "wall_time": 9.85382956 + "energy_total": -2.8349892591116777, + "energy_update": 7.014467125143753e-05, + "mo_residual": 0.0016108187659445855, + "wall_time": 4.115805952 }, { "energy_terms": { - "E_ee": 1.996217846379536, + "E_ee": 1.9962499538744778, "E_eext": 0.0, - "E_el": -2.834996716647101, - "E_en": -6.625775882596239, - "E_kin": 2.7679180339641842, + "E_el": -2.83499670951828, + "E_en": -6.625853034415928, + "E_kin": 2.7679773255491114, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -2.834996716647101, + "E_tot": -2.83499670951828, "E_x": 0.0, - "E_xc": -0.9733567143945823, + "E_xc": -0.973370954525941, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -2.834996716647101, - "energy_update": 7.397509006246139e-06, - "mo_residual": 0.0005931108170873957, - "wall_time": 10.029399296 + "energy_total": -2.83499670951828, + "energy_update": 7.45040660232732e-06, + "mo_residual": 0.0005933244422097003, + "wall_time": 4.300916396 } ], - "wall_time": 40.274688957 + "wall_time": 17.634074875 }, "success": true }, diff --git a/tests/he_zora_scf_lda/reference/he.out b/tests/he_zora_scf_lda/reference/he.out index 143e3df7f..2492772a5 100644 --- a/tests/he_zora_scf_lda/reference/he.out +++ b/tests/he_zora_scf_lda/reference/he.out @@ -9,12 +9,12 @@ *** | | | | _ <| |___| | | | __/ | | | | | *** *** |_| |_|_| \_\\____|_| |_|\___|_| |_| |_| *** *** *** -*** VERSION 1.1.0-alpha *** +*** VERSION 1.2.0-alpha *** *** *** -*** Git branch new-zora *** -*** Git commit hash d8027a9cb4fcf9009be8 *** -*** Git commit author Stig Rune Jensen *** -*** Git commit date Fri Feb 4 19:52:01 2022 +0100 *** +*** Git branch text *** +*** Git commit hash 424eb54bef32d3a65379-dirty *** +*** Git commit author gitpeterwind *** +*** Git commit date Tue Mar 11 11:40:04 2025 +0100 *** *** *** *** Contact: luca.frediani@uit.no *** *** *** @@ -29,8 +29,8 @@ --------------------------------------------------------------------------- MPI processes : (no bank) 1 - OpenMP threads : 1 - Total cores : 1 + OpenMP threads : 8 + Total cores : 8 --------------------------------------------------------------------------- @@ -46,14 +46,14 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- - MRCPP version : 1.4.0-alpha - Git branch : HEAD - Git commit hash : 2797a7a18efb69942a6e - Git commit author : Stig Rune Jensen - Git commit date : Fri Mar 12 12:48:07 2021 +0100 + MRCPP version : 1.6.0-alpha + Git branch : merge + Git commit hash : 0eccd59fbfa419dc6a65-dirty + Git commit author : gitpeterwind + Git commit date : Mon Mar 10 14:49:47 2025 +0100 - Linear algebra : EIGEN v3.3.7 - Parallelization : NONE + Linear algebra : EIGEN v3.4.0 + Parallelization : MPI/OpenMP (8 threads) --------------------------------------------------------------------------- @@ -62,7 +62,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== MultiResolution Analysis --------------------------------------------------------------------------- - polynomial order : 5 + polynomial order : 6 polynomial type : Interpolating --------------------------------------------------------------------------- total boxes : 8 @@ -100,7 +100,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *************************************************************************** *** *** -*** Computing Ground State Wavefunction *** +*** Computing Initial Guess Wavefunction *** *** *** *************************************************************************** @@ -109,10 +109,10 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s Calculation : Compute initial orbitals Method : Diagonalize SAD Hamiltonian Precision : 1.00000e-03 + Screening : 1.20000e+01 StdDev Restricted : True Functional : LDA (SVWN5) - AO basis : Hydrogenic orbitals - Zeta quality : 2 + AO basis : 3-21G ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -125,13 +125,16 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Norm --------------------------------------------------------------------------- - 0 2 p : 9.999999282691e-01 + 0 2 p : 9.999999998814e-01 =========================================================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Calculation : Compute initial energy Method : DFT (SVWN5) + Relativity : ZORA (V_nuc + J + V_xc) + Environment : None + External fields : None Precision : 1.00000e-03 Localization : Off ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -140,26 +143,20 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== Molecular Energy (initial) --------------------------------------------------------------------------- - Kinetic energy : (au) 3.107455613261 - E-N energy : (au) -6.952589569339 - Coulomb energy : (au) 2.049353329590 + Kinetic energy : (au) 2.747075010706 + E-N energy : (au) -6.595209258135 + Coulomb energy : (au) 2.026233786953 Exchange energy : (au) 0.000000000000 - X-C energy : (au) -1.005075636694 - Ext. field (el) : (au) 0.000000000000 ---------------------------------------------------------------------------- + X-C energy : (au) -0.984255225187 N-N energy : (au) 0.000000000000 - Ext. field (nuc) : (au) 0.000000000000 - Tot. Reac. Energy : (au) 0.000000000000 - El. Reac. Energy : (au) 0.000000000000 - Nuc. Reac. Energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Electronic energy : (au) -2.800856263182 + Electronic energy : (au) -2.806155685663 Nuclear energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Total energy : (au) -2.800856263182e+00 - : (kcal/mol) -1.757563826455e+03 - : (kJ/mol) -7.353647054660e+03 - : (eV) -7.621517824716e+01 + Total energy : (au) -2.806155685663e+00 + : (kcal/mol) -1.760889278449e+03 + : (kJ/mol) -7.367560741032e+03 + : (eV) -7.635938622895e+01 =========================================================================== @@ -168,38 +165,49 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Epsilon --------------------------------------------------------------------------- - 0 2 p : (au) -0.532035385623 + 0 2 p : (au) -0.542717811462 --------------------------------------------------------------------------- - Sum occupied : (au) -1.064070771245 + Sum occupied : (au) -1.085435622923 =========================================================================== + +*************************************************************************** +*** *** +*** Computing Ground State Wavefunction *** +*** *** +*************************************************************************** + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Calculation : Optimize ground state orbitals Method : DFT (SVWN5) + Relativity : ZORA (V_nuc + J + V_xc) + Environment : None + External fields : None Checkpointing : Off Max iterations : 10 KAIN solver : 3 Localization : Off Diagonalization : First two iterations - Start precision : 1.00000e-03 - Final precision : 1.00000e-03 + Start precision : 1.00000e-04 + Final precision : 1.00000e-04 Helmholtz precision : Dynamic Energy threshold : Off - Orbital threshold : 1.00000e-02 - ZORA potential : Off + Orbital threshold : 1.00000e-03 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =========================================================================== Iter MO residual Total energy Update --------------------------------------------------------------------------- - 0 1.000000e+00 -2.800856263182 -2.800856e+00 - 1 9.358319e-02 -2.833273814143 -3.241755e-02 - 2 1.745653e-02 -2.834130062592 -8.562484e-04 - 3 1.733167e-03 -2.834180138057 -5.007546e-05 + 0 1.000000e+00 -2.806155685663 -2.806156e+00 + 1 7.082267e-02 -2.833987061288 -2.783138e-02 + 2 8.295106e-03 -2.834919114440 -9.320532e-04 + 3 1.610819e-03 -2.834989259112 -7.014467e-05 + 4 5.933244e-04 -2.834996709518 -7.450407e-06 --------------------------------------------------------------------------- - SCF converged in 3 iterations! + SCF converged in 4 iterations! =========================================================================== @@ -228,26 +236,20 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s =========================================================================== Molecular Energy (final) --------------------------------------------------------------------------- - Kinetic energy : (au) 2.772944343530 - E-N energy : (au) -6.629907467035 - Coulomb energy : (au) 1.996361327086 + Kinetic energy : (au) 2.767977325549 + E-N energy : (au) -6.625853034416 + Coulomb energy : (au) 1.996249953874 Exchange energy : (au) 0.000000000000 - X-C energy : (au) -0.973578341638 - Ext. field (el) : (au) 0.000000000000 ---------------------------------------------------------------------------- + X-C energy : (au) -0.973370954526 N-N energy : (au) 0.000000000000 - Ext. field (nuc) : (au) 0.000000000000 - Tot. Reac. Energy : (au) 0.000000000000 - El. Reac. Energy : (au) 0.000000000000 - Nuc. Reac. Energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Electronic energy : (au) -2.834180138057 + Electronic energy : (au) -2.834996709518 Nuclear energy : (au) 0.000000000000 --------------------------------------------------------------------------- - Total energy : (au) -2.834180138057e+00 - : (kcal/mol) -1.778474873482e+03 - : (kJ/mol) -7.441138875480e+03 - : (eV) -7.712196703773e+01 + Total energy : (au) -2.834996709518e+00 + : (kcal/mol) -1.778987294160e+03 + : (kJ/mol) -7.443282838767e+03 + : (eV) -7.714419046881e+01 =========================================================================== @@ -256,9 +258,9 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- n Occ Spin : Epsilon --------------------------------------------------------------------------- - 0 2 p : (au) -0.570019510292 + 0 2 p : (au) -0.570449253760 --------------------------------------------------------------------------- - Sum occupied : (au) -1.140039020583 + Sum occupied : (au) -1.140898507519 =========================================================================== @@ -267,15 +269,15 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s --------------------------------------------------------------------------- r_O : 0.000000 0.000000 0.000000 --------------------------------------------------------------------------- - Electronic vector : -0.000000 -0.000000 -0.000000 + Electronic vector : -0.000000 0.000000 0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 --------------------------------------------------------------------------- - Nuclear vector : 0.000000 0.000000 0.000000 + Nuclear vector : -0.000000 -0.000000 -0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 --------------------------------------------------------------------------- - Total vector : 0.000000 0.000000 0.000000 + Total vector : -0.000000 -0.000000 -0.000000 Magnitude : (au) 0.000000 : (Debye) 0.000000 =========================================================================== @@ -287,7 +289,7 @@ J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s *** *** *** Exiting MRChem *** *** *** -*** Wall time : 0h 0m 8s *** +*** Wall time : 0h 0m 21s *** *** *** *************************************************************************** diff --git a/tests/hf_grad_blyp_surface_force/test b/tests/hf_grad_blyp_surface_force/test index 9ccec52d7..1e1102c54 100755 --- a/tests/hf_grad_blyp_surface_force/test +++ b/tests/hf_grad_blyp_surface_force/test @@ -30,10 +30,10 @@ filters = { E_EN: rel_tolerance(1.0e-6), E_EE: rel_tolerance(1.0e-6), E_X: rel_tolerance(1.0e-6), - E_XC: rel_tolerance(1.0e-6), + E_XC: rel_tolerance(1.0e-5), E_EEXT: rel_tolerance(1.0e-6), E_NEXT: rel_tolerance(1.0e-6), - E_EL: rel_tolerance(1.0e-6), + E_EL: rel_tolerance(1.0e-5), GEOMETRIC_DERIVATIVE(1, "total"): rel_tolerance(1.0e-6), } @@ -46,7 +46,7 @@ passed, message = compare_values( nuc_grad, psi4_nuc_grad, "MRChem vs. Psi4 nuclear component of the molecular gradient", - rtol=1.0e-6, + rtol=1.0e-5, atol=1.0e-6, ) sys.stdout.write(f"{message}\n") diff --git a/tests/hf_grad_lda/test b/tests/hf_grad_lda/test index 5a3659b7a..985f42544 100755 --- a/tests/hf_grad_lda/test +++ b/tests/hf_grad_lda/test @@ -30,7 +30,7 @@ filters = { E_EN: rel_tolerance(1.0e-6), E_EE: rel_tolerance(1.0e-6), E_X: rel_tolerance(1.0e-6), - E_XC: rel_tolerance(1.0e-6), + E_XC: rel_tolerance(5.0e-6), E_EEXT: rel_tolerance(1.0e-6), E_NEXT: rel_tolerance(1.0e-6), E_EL: rel_tolerance(1.0e-6), diff --git a/tests/li_scf_pbe0/reference/li.json b/tests/li_scf_pbe0/reference/li.json index 028c62096..85142b093 100644 --- a/tests/li_scf_pbe0/reference/li.json +++ b/tests/li_scf_pbe0/reference/li.json @@ -1,16 +1,21 @@ { "input": { "constants": { + "N_a": 6.02214076e+23, "angstrom2bohrs": 1.8897261246257702, + "boltzmann_constant": 1.380649e-23, "dipmom_au2debye": 2.5417464739297717, + "e0": 8.8541878128e-12, "electron_g_factor": -2.00231930436256, + "elementary_charge": 1.602176634e-19, "fine_structure_constant": 0.0072973525693, "hartree2ev": 27.211386245988, "hartree2kcalmol": 627.5094740630558, "hartree2kjmol": 2625.4996394798254, "hartree2simagnetizability": 78.9451185, "hartree2wavenumbers": 219474.6313632, - "light_speed": 137.035999084 + "light_speed": 137.035999084, + "meter2bohr": 18897261246.2577 }, "geom_opt": { "init_step_size": -0.5, @@ -38,10 +43,12 @@ "multiplicity": 2 }, "mpi": { + "bank_per_node": -1, "bank_size": -1, "numerically_exact": true, - "omp_threads": 1, - "shared_memory_size": 10000 + "omp_threads": -1, + "shared_memory_size": 10000, + "use_omp_num_threads": false }, "mra": { "basis_order": 5, @@ -120,6 +127,7 @@ "prec": 0.001, "relativity": "None", "restricted": false, + "rotate": true, "screen": 12.0, "type": "gto", "zeta": 0 @@ -168,7 +176,7 @@ "charge": 0, "dipole_moment": { "dip-1": { - "magnitude": 6.854901338429072e-14, + "magnitude": 6.352445409640402e-14, "r_O": [ 0.0, 0.0, @@ -204,9 +212,9 @@ "multiplicity": 2, "orbital_energies": { "energy": [ - -2.0559145926733304, - -0.14107755971414096, - -2.0456268559763853 + -2.055914781997219, + -0.14107729183711243, + -2.0456281024162055 ], "occupation": [ 1.0, @@ -218,20 +226,20 @@ "a", "b" ], - "sum_occupied": -4.242619008363857 + "sum_occupied": -4.2426201762505364 }, "scf_energy": { - "E_ee": 4.048665717365607, + "E_ee": 4.048663479601529, "E_eext": 0.0, - "E_el": -7.466159701873646, - "E_en": -17.088404230909084, - "E_kin": 7.3798793361, + "E_el": -7.466159634919019, + "E_en": -17.088377508663186, + "E_kin": 7.379852616315565, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -7.466159701873646, - "E_x": -0.44272667033319435, - "E_xc": -1.363573854096973, + "E_tot": -7.466159634919019, + "E_x": -0.44272613000086947, + "E_xc": -1.3635720921720582, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -240,9 +248,9 @@ "provenance": { "creator": "MRChem", "mpi_processes": 1, - "nthreads": 1, + "nthreads": 8, "routine": "mrchem.x", - "total_cores": 1, + "total_cores": 8, "version": "1.2.0-alpha" }, "rsp_calculations": null, @@ -250,15 +258,15 @@ "initial_energy": { "E_ee": 4.061916632919257, "E_eext": 0.0, - "E_el": -7.413768850996638, + "E_el": -7.4137689223122765, "E_en": -17.035029696824992, "E_kin": 7.370997444552398, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -7.413768850996638, - "E_x": -0.4447685124391084, - "E_xc": -1.3668847192041909, + "E_tot": -7.4137689223122765, + "E_x": -0.4447685837547496, + "E_xc": -1.3668847192041895, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 @@ -268,50 +276,50 @@ "cycles": [ { "energy_terms": { - "E_ee": 4.035331948680946, + "E_ee": 4.035331971432828, "E_eext": 0.0, - "E_el": -7.465238166222123, - "E_en": -17.01159653994337, - "E_kin": 7.311304561245888, + "E_el": -7.465238166994292, + "E_en": -17.011596687836693, + "E_kin": 7.31130469995338, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -7.465238166222123, - "E_x": -0.44138482024000547, - "E_xc": -1.358893315965581, + "E_tot": -7.465238166994292, + "E_x": -0.44138482396032575, + "E_xc": -1.3588933265834808, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -7.465238166222123, - "energy_update": 0.0514693152254857, - "mo_residual": 0.06988028196015575, - "wall_time": 31.038746325 + "energy_total": -7.465238166994292, + "energy_update": 0.05146924468201597, + "mo_residual": 0.06988026645229219, + "wall_time": 16.125996149 }, { "energy_terms": { - "E_ee": 4.048665717365607, + "E_ee": 4.048663479601529, "E_eext": 0.0, - "E_el": -7.466159701873646, - "E_en": -17.088404230909084, - "E_kin": 7.3798793361, + "E_el": -7.466159634919019, + "E_en": -17.088377508663186, + "E_kin": 7.379852616315565, "E_next": 0.0, "E_nn": 0.0, "E_nuc": 0.0, - "E_tot": -7.466159701873646, - "E_x": -0.44272667033319435, - "E_xc": -1.363573854096973, + "E_tot": -7.466159634919019, + "E_x": -0.44272613000086947, + "E_xc": -1.3635720921720582, "Er_el": 0.0, "Er_nuc": 0.0, "Er_tot": 0.0 }, - "energy_total": -7.466159701873646, - "energy_update": 0.0009215356515221984, - "mo_residual": 0.017571466286109366, - "wall_time": 18.876552364 + "energy_total": -7.466159634919019, + "energy_update": 0.0009214679247264712, + "mo_residual": 0.017571853614464374, + "wall_time": 10.476929904 } ], - "wall_time": 49.918931368 + "wall_time": 26.603862208 }, "success": true }, diff --git a/tests/qmfunctions/density.cpp b/tests/qmfunctions/density.cpp index e15309a5f..5f0766a01 100644 --- a/tests/qmfunctions/density.cpp +++ b/tests/qmfunctions/density.cpp @@ -43,20 +43,19 @@ TEST_CASE("Density", "[density]") { OrbitalVector Phi; for (int i = 0; i < 5; i++) Phi.push_back(Orbital(SPIN::Alpha)); for (int i = 0; i < 2; i++) Phi.push_back(Orbital(SPIN::Beta)); - Phi.distribute(); HydrogenFunction s1(1, 0, 0); HydrogenFunction s2(2, 0, 0); HydrogenFunction px(2, 1, 0); HydrogenFunction py(2, 1, 1); HydrogenFunction pz(2, 1, 2); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], s1, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], s2, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[2])) mrcpp::cplxfunc::project(Phi[2], px, NUMBER::Imag, prec); - if (mrcpp::mpi::my_orb(Phi[3])) mrcpp::cplxfunc::project(Phi[3], py, NUMBER::Imag, prec); - if (mrcpp::mpi::my_orb(Phi[4])) mrcpp::cplxfunc::project(Phi[4], pz, NUMBER::Imag, prec); - if (mrcpp::mpi::my_orb(Phi[5])) mrcpp::cplxfunc::project(Phi[5], s1, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[6])) mrcpp::cplxfunc::project(Phi[6], s1, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], s1, prec); + if (mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], s2, prec); + if (mrcpp::mpi::my_func(Phi[2])) mrcpp::project(Phi[2], px, prec); + if (mrcpp::mpi::my_func(Phi[3])) mrcpp::project(Phi[3], py, prec); + if (mrcpp::mpi::my_func(Phi[4])) mrcpp::project(Phi[4], pz, prec); + if (mrcpp::mpi::my_func(Phi[5])) mrcpp::project(Phi[5], s1, prec); + if (mrcpp::mpi::my_func(Phi[6])) mrcpp::project(Phi[6], s1, prec); SECTION("non-shared memory total/spin density") { Density rho_t(false); diff --git a/tests/qmfunctions/orbital.cpp b/tests/qmfunctions/orbital.cpp index df36cdd1f..0f911cdc6 100644 --- a/tests/qmfunctions/orbital.cpp +++ b/tests/qmfunctions/orbital.cpp @@ -33,12 +33,13 @@ using namespace mrchem; namespace orbital_tests { -auto f = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-1.0 * R * R); }; -auto g = [](const mrcpp::Coord<3> &r) -> double { +ComplexDouble i1 = {0.0, 1.0}; +std::function &r)> g = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-2.0 * R * R); }; @@ -49,7 +50,7 @@ TEST_CASE("Orbital", "[orbital]") { SECTION("copy orbital") { Orbital phi_1(SPIN::Paired); - mrcpp::cplxfunc::project(phi_1, f, NUMBER::Real, prec); + mrcpp::project(phi_1, f, prec); SECTION("copy constructor") { Orbital phi_2(phi_1); @@ -57,7 +58,7 @@ TEST_CASE("Orbital", "[orbital]") { REQUIRE(phi_2.spin() == phi_1.spin()); REQUIRE(phi_2.norm() == phi_1.norm()); REQUIRE(&phi_2.real() == &phi_1.real()); - REQUIRE(&phi_2.imag() == &phi_1.imag()); + REQUIRE(phi_2.iscomplex() == phi_1.iscomplex()); } SECTION("default constructor plus assignment") { @@ -67,7 +68,7 @@ TEST_CASE("Orbital", "[orbital]") { REQUIRE(phi_2.spin() == phi_1.spin()); REQUIRE(phi_2.norm() == phi_1.norm()); REQUIRE(&phi_2.real() == &phi_1.real()); - REQUIRE(&phi_2.imag() == &phi_1.imag()); + REQUIRE(phi_2.iscomplex() == phi_1.iscomplex()); } SECTION("assigment constructor") { @@ -76,17 +77,17 @@ TEST_CASE("Orbital", "[orbital]") { REQUIRE(phi_2.spin() == phi_1.spin()); REQUIRE(phi_2.norm() == phi_1.norm()); REQUIRE(&phi_2.real() == &phi_1.real()); - REQUIRE(&phi_2.imag() == &phi_1.imag()); + REQUIRE(phi_2.iscomplex() == phi_1.iscomplex()); } SECTION("deep copy") { - Orbital phi_2(SPIN::Alpha); - mrcpp::cplxfunc::deep_copy(phi_2, phi_1); - REQUIRE(phi_2.occ() != phi_1.occ()); - REQUIRE(phi_2.spin() != phi_1.spin()); + Orbital phi_2; + mrcpp::deep_copy(phi_2, phi_1); + REQUIRE(phi_2.occ() == phi_1.occ()); + REQUIRE(phi_2.spin() == phi_1.spin()); REQUIRE(phi_2.norm() == phi_1.norm()); REQUIRE(&phi_2.real() != &phi_1.real()); - REQUIRE(not(phi_2.hasImag())); + REQUIRE(not(phi_2.iscomplex())); } SECTION("parameter copy") { @@ -94,18 +95,17 @@ TEST_CASE("Orbital", "[orbital]") { REQUIRE(phi_2.occ() == phi_1.occ()); REQUIRE(phi_2.spin() == phi_1.spin()); REQUIRE(phi_2.norm() < 1.0); - REQUIRE(not(phi_2.hasReal())); - REQUIRE(not(phi_2.hasImag())); + REQUIRE(phi_2.isreal()); + REQUIRE(not(phi_2.iscomplex())); } } SECTION("normalize") { Orbital phi(SPIN::Paired); - REQUIRE(phi.norm() == Approx(-1.0)); + REQUIRE(phi.norm() == Approx(0.0)); - mrcpp::cplxfunc::project(phi, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(phi, g, NUMBER::Imag, prec); - REQUIRE(phi.norm() > 1.0); + mrcpp::project(phi, f, prec); + REQUIRE(phi.norm() > 0.8); orbital::normalize(phi); REQUIRE(phi.norm() == Approx(1.0)); @@ -113,14 +113,14 @@ TEST_CASE("Orbital", "[orbital]") { SECTION("orthogonalize") { Orbital phi_1(SPIN::Alpha); - mrcpp::cplxfunc::project(phi_1, f, NUMBER::Real, prec); + mrcpp::project(phi_1, f, prec); WHEN("orbitals have different spins") { Orbital phi_2(SPIN::Beta); - mrcpp::cplxfunc::project(phi_2, g, NUMBER::Imag, prec); + mrcpp::project(phi_2, g, prec); THEN("their overlap is zero") { - ComplexDouble S = orbital::dot(phi_1, phi_2); + ComplexDouble S = mrcpp::dot(phi_1, phi_2); REQUIRE(std::abs(S.real()) < thrs); REQUIRE(std::abs(S.imag()) < thrs); } @@ -128,25 +128,19 @@ TEST_CASE("Orbital", "[orbital]") { WHEN("orbitals have the same spin") { Orbital phi_2(SPIN::Alpha); - mrcpp::cplxfunc::project(phi_2, g, NUMBER::Imag, prec); + mrcpp::project(phi_2, f, prec); THEN("their overlap is non-zero") { - ComplexDouble S1 = orbital::dot(phi_1, phi_2); - REQUIRE(std::abs(S1.real()) < thrs); - REQUIRE(std::abs(S1.imag()) > thrs); - - AND_THEN(" = *") { - ComplexDouble S2 = orbital::dot(phi_1, phi_2.dagger()); - REQUIRE(S2.real() == Approx(S1.real())); - REQUIRE(S2.imag() == Approx(-S1.imag())); - } + ComplexDouble S1 = mrcpp::dot(phi_1, phi_2); + REQUIRE(std::abs(S1.real()) > thrs); + REQUIRE(std::abs(S1.imag()) < thrs); } AND_THEN("they are orthogonalized") { - orbital::orthogonalize(prec, phi_2, phi_1); + mrcpp::orthogonalize(prec, phi_2, phi_1); THEN("their overlap is zero") { - ComplexDouble S3 = orbital::dot(phi_1, phi_2); + ComplexDouble S3 = mrcpp::dot(phi_1, phi_2); REQUIRE(std::abs(S3.real()) < thrs); REQUIRE(std::abs(S3.imag()) < thrs); } diff --git a/tests/qmfunctions/orbital_vector.cpp b/tests/qmfunctions/orbital_vector.cpp index dd9ce18b2..52cd91601 100644 --- a/tests/qmfunctions/orbital_vector.cpp +++ b/tests/qmfunctions/orbital_vector.cpp @@ -35,32 +35,32 @@ using namespace orbital; namespace orbital_vector_tests { -auto f1 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f1 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-1.0 * R * R); }; -auto f2 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f2 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-2.0 * R * R); }; -auto f3 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f3 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-3.0 * R * R); }; -auto f4 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f4 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-4.0 * R * R); }; -auto f5 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f5 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-5.0 * R * R); }; -auto f6 = [](const mrcpp::Coord<3> &r) -> double { +std::function &r)> f6 = [](const mrcpp::Coord<3> &r) -> double { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-6.0 * R * R); }; @@ -97,7 +97,6 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Beta)); Phi.push_back(Orbital(SPIN::Beta)); - Phi.distribute(); OrbitalVector Phi_p = disjoin(Phi, SPIN::Paired); OrbitalVector Phi_a = disjoin(Phi, SPIN::Alpha); @@ -128,9 +127,9 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { OrbitalVector Phi; Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Alpha)); - Phi.distribute(); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f1, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], f2, NUMBER::Imag, prec); + + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f1, prec); + if (mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], f2, prec); normalize(Phi); SECTION("copy constructor") { @@ -187,8 +186,8 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { REQUIRE(get_electron_number(Psi, SPIN::Beta) == get_electron_number(Phi, SPIN::Beta)); DoubleVector norms = get_norms(Psi); - REQUIRE(norms[0] < 0.0); - REQUIRE(norms[1] < 0.0); + REQUIRE(norms[0] < thrs); + REQUIRE(norms[1] < thrs); } } @@ -196,14 +195,14 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { OrbitalVector Phi; Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Alpha)); - Phi.distribute(); DoubleVector norms1 = get_norms(Phi); - REQUIRE(norms1[0] == Approx(-1.0)); - REQUIRE(norms1[1] == Approx(-1.0)); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f1, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], f2, NUMBER::Real, prec); + REQUIRE(norms1[0] == Approx(0.0)); + REQUIRE(norms1[1] == Approx(0.0)); + + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f1, prec); + if (mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], f2, prec); DoubleVector norms2 = get_norms(Phi); REQUIRE(norms2[0] > 0.0); @@ -214,17 +213,6 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { DoubleVector norms3 = get_norms(Phi); REQUIRE(norms3[0] == Approx(1.0)); REQUIRE(norms3[1] == Approx(1.0)); - - SECTION("norm overlap") { - ComplexMatrix S = orbital::calc_overlap_matrix(Phi); - DoubleMatrix Snorm = orbital::calc_norm_overlap_matrix(Phi); - for (int i = 0; i < S.rows(); i++) { - for (int j = 0; j < S.cols(); j++) { - if (i == j) REQUIRE(Snorm(i, j) == Approx(1.0)); - if (i != j) REQUIRE(Snorm(i, j) >= Approx(std::abs(S(i, j)))); - } - } - } } SECTION("orthogonalization") { @@ -235,12 +223,13 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { Phi.push_back(Orbital(SPIN::Beta)); Phi.distribute(); - if (true or mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f1, NUMBER::Real, prec); - if (true or mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], f2, NUMBER::Real, prec); - if (true or mrcpp::mpi::my_orb(Phi[2])) mrcpp::cplxfunc::project(Phi[2], f3, NUMBER::Real, prec); - if (true or mrcpp::mpi::my_orb(Phi[3])) mrcpp::cplxfunc::project(Phi[3], f4, NUMBER::Real, prec); + if (true or mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f1, prec); + if (true or mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], f2, prec); + if (true or mrcpp::mpi::my_func(Phi[2])) mrcpp::project(Phi[2], f3, prec); + if (true or mrcpp::mpi::my_func(Phi[3])) mrcpp::project(Phi[3], f4, prec); // Complex phase rotation + // NB: Phi becomes complex for (int n = 0; n < Phi.size(); n++) { double theta = (n + 1.0) * mrcpp::pi / 7.0; ComplexDouble phase(std::cos(theta), std::sin(theta)); @@ -288,10 +277,9 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { OrbitalVector Psi; Psi.push_back(Orbital(SPIN::Alpha)); Psi.push_back(Orbital(SPIN::Beta)); - Psi.distribute(); - if (mrcpp::mpi::my_orb(Psi[0])) mrcpp::cplxfunc::project(Psi[0], f5, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Psi[1])) mrcpp::cplxfunc::project(Psi[1], f6, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Psi[0])) mrcpp::project(Psi[0], f5, prec); + if (mrcpp::mpi::my_func(Psi[1])) mrcpp::project(Psi[1], f6, prec); orthogonalize(prec, Phi); orthogonalize(prec, Psi, Phi); @@ -307,16 +295,10 @@ TEST_CASE("OrbitalVector", "[orbital_vector]") { OrbitalVector Phi; Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); - - if (mrcpp::mpi::my_orb(Phi[0])) { - mrcpp::cplxfunc::project(Phi[0], f1, NUMBER::Real, prec); - mrcpp::cplxfunc::project(Phi[0], f2, NUMBER::Imag, prec); - } - if (mrcpp::mpi::my_orb(Phi[1])) { - mrcpp::cplxfunc::project(Phi[1], f3, NUMBER::Real, prec); - mrcpp::cplxfunc::project(Phi[1], f4, NUMBER::Imag, prec); + if (mrcpp::mpi::my_func(Phi[0])) { + mrcpp::project(Phi[0], f1, prec); + mrcpp::project(Phi[1], f2, prec); } orthogonalize(prec, Phi); diff --git a/tests/qmfunctions/qmfunction.cpp b/tests/qmfunctions/qmfunction.cpp index 361294d84..40ca3f085 100644 --- a/tests/qmfunctions/qmfunction.cpp +++ b/tests/qmfunctions/qmfunction.cpp @@ -33,75 +33,72 @@ using MATHCONST::pi; namespace qmfunction_tests { -auto f = [](const mrcpp::Coord<3> &r) -> double { +ComplexDouble i1 = {0.0, 1.0}; + +auto f = [](const mrcpp::Coord<3> &r) -> ComplexDouble { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-1.0 * R * R); }; -auto g = [](const mrcpp::Coord<3> &r) -> double { +auto g = [](const mrcpp::Coord<3> &r) -> ComplexDouble { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); - return std::exp(-2.0 * R * R); + return std::exp(-2.0 * R * R) * i1; }; TEST_CASE("QMFunction", "[qmfunction]") { const double prec = 1.0e-3; SECTION("copy non-shared function") { - mrcpp::ComplexFunction func_1(false); - mrcpp::cplxfunc::project(func_1, f, NUMBER::Real, prec); - + mrcpp::CompFunction func_1; + mrcpp::project(func_1, f, prec); SECTION("copy constructor") { - mrcpp::ComplexFunction func_2(func_1); + mrcpp::CompFunction func_2(func_1); REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); - REQUIRE(&func_2.real() == &func_1.real()); - REQUIRE(&func_2.imag() == &func_1.imag()); + REQUIRE(&func_2.complex() == &func_1.complex()); } SECTION("default constructor plus assignment") { - mrcpp::ComplexFunction func_2; + mrcpp::CompFunction func_2; func_2 = func_1; REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); - REQUIRE(&func_2.real() == &func_1.real()); - REQUIRE(&func_2.imag() == &func_1.imag()); + REQUIRE(&func_2.complex() == &func_1.complex()); } SECTION("assigment constructor") { - mrcpp::ComplexFunction func_2 = func_1; + mrcpp::CompFunction func_2 = func_1; REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); - REQUIRE(&func_2.real() == &func_1.real()); - REQUIRE(&func_2.imag() == &func_1.imag()); + REQUIRE(&func_2.complex() == &func_1.complex()); } SECTION("deep copy to non-shared") { - mrcpp::ComplexFunction func_2(false); - mrcpp::cplxfunc::deep_copy(func_2, func_1); - REQUIRE(not func_2.isShared()); + mrcpp::CompFunction func_2(0, false); + mrcpp::deep_copy(func_2, func_1); + REQUIRE(!func_2.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); - REQUIRE(&func_2.real() != &func_1.real()); - REQUIRE(&func_2.imag() == &func_1.imag()); + REQUIRE(&func_2.complex() != &func_1.complex()); } #ifdef MRCHEM_HAS_MPI SECTION("deep copy to shared") { - mrcpp::ComplexFunction func_2(true); - mrcpp::cplxfunc::deep_copy(func_2, func_1); + mrcpp::CompFunction func_2(0, true); + mrcpp::deep_copy(func_2, func_1); + REQUIRE(!func_2.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); - REQUIRE(&func_2.real() != &func_1.real()); - REQUIRE(&func_2.imag() == &func_1.imag()); + REQUIRE(&func_2.complex() != &func_1.complex()); } #endif } #ifdef MRCHEM_HAS_MPI SECTION("copy shared function") { - mrcpp::ComplexFunction func_1(true); - mrcpp::cplxfunc::project(func_1, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(func_1, g, NUMBER::Imag, prec); + mrcpp::CompFunction func_1(0, true); + mrcpp::project(func_1, f, prec); + mrcpp::project(func_1, g, prec); SECTION("copy constructor") { - mrcpp::ComplexFunction func_2(func_1); + mrcpp::CompFunction func_2(func_1); REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); REQUIRE(func_2.integrate().real() == Approx(func_1.integrate().real())); @@ -109,7 +106,7 @@ TEST_CASE("QMFunction", "[qmfunction]") { } SECTION("default constructor plus assignment") { - mrcpp::ComplexFunction func_2; + mrcpp::CompFunction func_2; func_2 = func_1; REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); @@ -118,7 +115,7 @@ TEST_CASE("QMFunction", "[qmfunction]") { } SECTION("assigment constructor") { - mrcpp::ComplexFunction func_2 = func_1; + mrcpp::CompFunction func_2 = func_1; REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); REQUIRE(func_2.integrate().real() == Approx(func_1.integrate().real())); @@ -126,17 +123,17 @@ TEST_CASE("QMFunction", "[qmfunction]") { } SECTION("deep copy to non-shared") { - mrcpp::ComplexFunction func_2(false); - mrcpp::cplxfunc::deep_copy(func_2, func_1); - REQUIRE(not func_2.isShared()); + mrcpp::CompFunction func_2(0, false); + mrcpp::deep_copy(func_2, func_1); + REQUIRE(func_2.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); REQUIRE(func_2.integrate().real() == Approx(func_1.integrate().real())); REQUIRE(func_2.integrate().imag() == Approx(func_1.integrate().imag())); } SECTION("deep copy to shared") { - mrcpp::ComplexFunction func_2(true); - mrcpp::cplxfunc::deep_copy(func_2, func_1); + mrcpp::CompFunction func_2(0, true); + mrcpp::deep_copy(func_2, func_1); REQUIRE(func_2.isShared() == func_1.isShared()); REQUIRE(func_2.norm() == Approx(func_1.norm())); REQUIRE(func_2.integrate().real() == Approx(func_1.integrate().real())); @@ -146,124 +143,131 @@ TEST_CASE("QMFunction", "[qmfunction]") { #endif SECTION("rescale non-shared function") { - mrcpp::ComplexFunction func(false); - mrcpp::cplxfunc::project(func, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(func, g, NUMBER::Imag, prec); + mrcpp::CompFunction func; + mrcpp::project(func, f, prec); + mrcpp::project(func, g, prec); const double ref_norm = func.norm(); - const double f_int = func.real().integrate(); - const double g_int = func.imag().integrate(); + ComplexDouble f_int = func.complex().integrate(); + ComplexDouble g_int = func.complex().integrate(); SECTION("real scalar") { func.rescale(pi); REQUIRE(func.norm() == Approx(pi * ref_norm)); - REQUIRE(func.real().integrate() == Approx(pi * f_int)); - REQUIRE(func.imag().integrate() == Approx(pi * g_int)); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(pi * f_int))); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(pi * g_int))); } - SECTION("imaginary unit") { + SECTION("complexinary unit") { ComplexDouble i(0.0, 1.0); func.rescale(i); REQUIRE(func.norm() == Approx(ref_norm)); - REQUIRE(func.real().integrate() == Approx(-g_int)); - REQUIRE(func.imag().integrate() == Approx(f_int)); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(i * f_int))); + REQUIRE(std::imag(func.complex().integrate()) == Approx(std::imag(i * f_int))); } SECTION("unitary rotation") { double re = std::sin(0.5); double im = std::cos(0.5); ComplexDouble c(re, im); func.rescale(c); + ComplexDouble i(0.0, 1.0); + REQUIRE(func.norm() == Approx(ref_norm)); - REQUIRE(func.real().integrate() == Approx(re * f_int - im * g_int)); - REQUIRE(func.imag().integrate() == Approx(im * f_int + re * g_int)); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(re * f_int + i * im * f_int))); + REQUIRE(std::imag(func.complex().integrate()) == Approx(std::imag(re * f_int + i * im * f_int))); } } #ifdef MRCHEM_HAS_MPI SECTION("rescale shared function") { - mrcpp::ComplexFunction func(true); - mrcpp::cplxfunc::project(func, g, NUMBER::Real, prec); - mrcpp::cplxfunc::project(func, f, NUMBER::Imag, prec); + mrcpp::CompFunction func(0, true); + mrcpp::project(func, g, prec); + mrcpp::project(func, f, prec); const double ref_norm = func.norm(); - const double f_int = func.real().integrate(); - const double g_int = func.imag().integrate(); + const ComplexDouble f_int = func.complex().integrate(); + const ComplexDouble g_int = func.complex().integrate(); SECTION("real scalar") { func.rescale(pi); REQUIRE(func.norm() == Approx(pi * ref_norm)); - REQUIRE(func.real().integrate() == Approx(pi * f_int)); - REQUIRE(func.imag().integrate() == Approx(pi * g_int)); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(pi * f_int))); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(pi * g_int))); } - SECTION("imaginary unit") { + SECTION("complexinary unit") { ComplexDouble i(0.0, 1.0); func.rescale(i); mrcpp::mpi::barrier(mrcpp::mpi::comm_share); REQUIRE(func.norm() == Approx(ref_norm)); - REQUIRE(func.real().integrate() == Approx(-g_int)); - REQUIRE(func.imag().integrate() == Approx(f_int)); - } - SECTION("unitary rotation") { - double re = std::sin(0.5); - double im = std::cos(0.5); - ComplexDouble c(re, im); - func.rescale(c); - REQUIRE(func.norm() == Approx(ref_norm)); - REQUIRE(func.real().integrate() == Approx(re * f_int - im * g_int)); - REQUIRE(func.imag().integrate() == Approx(im * f_int + re * g_int)); + REQUIRE(std::real(func.complex().integrate()) == Approx(std::real(i * f_int))); + REQUIRE(std::imag(func.complex().integrate()) == Approx(std::imag(i * f_int))); } } SECTION("add shared function") { - mrcpp::ComplexFunction f_re(false); - mrcpp::ComplexFunction f_im(true); - mrcpp::cplxfunc::project(f_re, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(f_im, f, NUMBER::Imag, prec); + mrcpp::CompFunction f_re; + mrcpp::CompFunction f_im(0, true); + mrcpp::project(f_re, f, prec); + mrcpp::project(f_im, g, prec); SECTION("into non-shared function") { ComplexDouble c(0.5, 0.5); - mrcpp::ComplexFunction func_h(false); + mrcpp::CompFunction func_h; SECTION("with complex scalar") { - mrcpp::cplxfunc::add(func_h, c, f_re, c, f_im, -1.0); - REQUIRE(func_h.integrate().real() == Approx(0.0)); - REQUIRE(func_h.integrate().imag() == Approx(f_im.integrate().imag())); + mrcpp::add(func_h, c, f_re, c, f_im, -1.0); + REQUIRE(func_h.integrate().real() == Approx(std::real(std::real(c) * f_re.integrate() - std::imag(c) * std::imag(f_im.integrate())))); + REQUIRE(func_h.integrate().imag() == Approx(std::real(std::imag(c) * f_re.integrate() + std::real(c) * std::imag(f_im.integrate())))); + } + SECTION("with conjugate flag") { + mrcpp::add(func_h, c, f_re, c, f_im, -1.0, true); + REQUIRE(func_h.integrate().real() == Approx(std::real(std::real(c) * f_re.integrate() + std::imag(c) * std::imag(f_im.integrate())))); + REQUIRE(func_h.integrate().imag() == Approx(std::real(std::imag(c) * f_re.integrate() - std::real(c) * std::imag(f_im.integrate())))); } SECTION("with function conjugate") { - mrcpp::cplxfunc::add(func_h, c, f_re, c, f_im.dagger(), -1.0); - REQUIRE(func_h.integrate().real() == Approx(f_re.integrate().real())); - REQUIRE(func_h.integrate().imag() == Approx(0.0)); + f_im.dagger(); + mrcpp::add(func_h, c, f_re, c, f_im, -1.0); + f_im.dagger(); + REQUIRE(func_h.integrate().real() == Approx(std::real(std::real(c) * f_re.integrate() + std::imag(c) * std::imag(f_im.integrate())))); + REQUIRE(func_h.integrate().imag() == Approx(std::real(std::imag(c) * f_re.integrate() - std::real(c) * std::imag(f_im.integrate())))); } } SECTION("into shared function") { ComplexDouble c(0.5, 0.5); - mrcpp::ComplexFunction func_h(true); + mrcpp::CompFunction func_h(0, true); SECTION("with complex scalar") { - mrcpp::cplxfunc::add(func_h, c, f_re, c, f_im, -1.0); - REQUIRE(func_h.integrate().real() == Approx(0.0)); - REQUIRE(func_h.integrate().imag() == Approx(f_im.integrate().imag())); + mrcpp::add(func_h, c, f_re, c, f_im, -1.0); + REQUIRE(func_h.integrate().real() == Approx(std::real(std::real(c) * f_re.integrate() - std::imag(c) * std::imag(f_im.integrate())))); + REQUIRE(func_h.integrate().imag() == Approx(std::real(std::imag(c) * f_re.integrate() + std::real(c) * std::imag(f_im.integrate())))); } SECTION("with function conjugate") { - mrcpp::cplxfunc::add(func_h, c, f_re, c, f_im.dagger(), -1.0); - REQUIRE(func_h.integrate().real() == Approx(f_re.integrate().real())); - REQUIRE(func_h.integrate().imag() == Approx(0.0)); + f_im.dagger(); + mrcpp::add(func_h, c, f_re, c, f_im, -1.0); + f_im.dagger(); + REQUIRE(func_h.integrate().real() == Approx(std::real(std::real(c) * f_re.integrate() + std::imag(c) * std::imag(f_im.integrate())))); + REQUIRE(func_h.integrate().imag() == Approx(std::real(std::imag(c) * f_re.integrate() - std::real(c) * std::imag(f_im.integrate())))); } } } #endif SECTION("multiply non-shared function") { - mrcpp::ComplexFunction func_1(false); - mrcpp::cplxfunc::project(func_1, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(func_1, g, NUMBER::Imag, prec); + mrcpp::CompFunction func_1; + mrcpp::project(func_1, f, prec); SECTION("into non-shared function") { - mrcpp::ComplexFunction func_2(false); - mrcpp::cplxfunc::multiply(func_2, func_1, func_1.dagger(), -1.0); - REQUIRE(func_2.integrate().real() == Approx(func_1.squaredNorm())); + mrcpp::CompFunction func_2; + mrcpp::multiply(func_2, func_1, func_1, -1.0); + REQUIRE(func_2.integrate().real() == Approx(func_1.getSquareNorm())); + REQUIRE(func_2.integrate().imag() == Approx(0.0)); + } + SECTION("into non-shared function conjugate") { + mrcpp::CompFunction func_2; + mrcpp::multiply(func_2, func_1, func_1, -1.0, false, false, true); + REQUIRE(func_2.integrate().real() == Approx(func_1.getSquareNorm())); REQUIRE(func_2.integrate().imag() == Approx(0.0)); } #ifdef MRCHEM_HAS_MPI SECTION("into shared function") { - mrcpp::ComplexFunction func_2(true); - mrcpp::cplxfunc::multiply(func_2, func_1, func_1.dagger(), -1.0); - REQUIRE(func_2.integrate().real() == Approx(func_1.squaredNorm())); + mrcpp::CompFunction func_2(0, true); + mrcpp::multiply(func_2, func_1, func_1, -1.0, false, false, true); + REQUIRE(func_2.integrate().real() == Approx(func_1.getSquareNorm())); REQUIRE(func_2.integrate().imag() == Approx(0.0)); } #endif @@ -271,20 +275,20 @@ TEST_CASE("QMFunction", "[qmfunction]") { #ifdef MRCHEM_HAS_MPI SECTION("multiply shared function") { - mrcpp::ComplexFunction func_1(true); - mrcpp::cplxfunc::project(func_1, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(func_1, g, NUMBER::Imag, prec); + mrcpp::CompFunction func_1(0, true); + mrcpp::project(func_1, f, prec); SECTION("into non-shared function") { - mrcpp::ComplexFunction func_2(false); - mrcpp::cplxfunc::multiply(func_2, func_1, func_1.dagger(), -1.0); - REQUIRE(func_2.integrate().real() == Approx(func_1.squaredNorm())); + mrcpp::CompFunction func_2(0, false); + ; + mrcpp::multiply(func_2, func_1, func_1, -1.0, true); + REQUIRE(func_2.integrate().real() == Approx(func_1.getSquareNorm())); REQUIRE(func_2.integrate().imag() == Approx(0.0)); } SECTION("into shared function") { - mrcpp::ComplexFunction func_2(true); - mrcpp::cplxfunc::multiply(func_2, func_1, func_1.dagger(), -1.0); - REQUIRE(func_2.integrate().real() == Approx(func_1.squaredNorm())); + mrcpp::CompFunction func_2(0, true); + mrcpp::multiply(func_2, func_1, func_1, -1.0, true); + REQUIRE(func_2.integrate().real() == Approx(func_1.getSquareNorm())); REQUIRE(func_2.integrate().imag() == Approx(0.0)); } } diff --git a/tests/qmoperators/coulomb_hessian.cpp b/tests/qmoperators/coulomb_hessian.cpp index fb802cacb..b2b2a6a2d 100644 --- a/tests/qmoperators/coulomb_hessian.cpp +++ b/tests/qmoperators/coulomb_hessian.cpp @@ -67,7 +67,7 @@ TEST_CASE("CoulombHessian", "[coulomb_hessian]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } std::vector ns_x; @@ -89,7 +89,7 @@ TEST_CASE("CoulombHessian", "[coulomb_hessian]") { for (int i = 0; i < Phi_x.size(); i++) { HydrogenFunction f(ns_x[i], ls_x[i], ms_x[i]); - if (mrcpp::mpi::my_orb(Phi_x[i])) mrcpp::cplxfunc::project(Phi_x[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi_x[i])) mrcpp::project(Phi_x[i], f, prec); } int i = 0; @@ -103,8 +103,8 @@ TEST_CASE("CoulombHessian", "[coulomb_hessian]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -115,8 +115,8 @@ TEST_CASE("CoulombHessian", "[coulomb_hessian]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -127,7 +127,7 @@ TEST_CASE("CoulombHessian", "[coulomb_hessian]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/coulomb_operator.cpp b/tests/qmoperators/coulomb_operator.cpp index bd72bbe35..8cdd6b01a 100644 --- a/tests/qmoperators/coulomb_operator.cpp +++ b/tests/qmoperators/coulomb_operator.cpp @@ -65,11 +65,10 @@ TEST_CASE("CoulombOperator", "[coulomb_operator]") { } } } - Phi.distribute(); for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } int i = 0; @@ -86,8 +85,8 @@ TEST_CASE("CoulombOperator", "[coulomb_operator]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -98,8 +97,8 @@ TEST_CASE("CoulombOperator", "[coulomb_operator]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -110,7 +109,7 @@ TEST_CASE("CoulombOperator", "[coulomb_operator]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/electric_field_operator.cpp b/tests/qmoperators/electric_field_operator.cpp index 6e8642c88..97874f2a2 100644 --- a/tests/qmoperators/electric_field_operator.cpp +++ b/tests/qmoperators/electric_field_operator.cpp @@ -79,23 +79,23 @@ TEST_CASE("ElectricFieldOperator", "[electric_field_operator]") { for (int i = 0; i < nFuncs; i++) { HydrogenFunction f(std::get<0>(qn[i]), std::get<1>(qn[i]), std::get<2>(qn[i]), 1.0, o); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } SECTION("apply") { // update ref based on MPI for (int i = 0; i < nFuncs; i++) { for (int j = 0; j < nFuncs; j++) { - if (not(mrcpp::mpi::my_orb(Phi[i])) or not(mrcpp::mpi::my_orb(Phi[j]))) ref(i, j) = 0.0; + if (not(mrcpp::mpi::my_func(Phi[i])) or not(mrcpp::mpi::my_func(Phi[j]))) ref(i, j) = 0.0; } } Orbital phi_x = EF(Phi[0]); - ComplexDouble X_00 = orbital::dot(Phi[0], phi_x); - ComplexDouble X_10 = orbital::dot(Phi[1], phi_x); - ComplexDouble X_20 = orbital::dot(Phi[2], phi_x); - ComplexDouble X_30 = orbital::dot(Phi[3], phi_x); - ComplexDouble X_40 = orbital::dot(Phi[4], phi_x); + ComplexDouble X_00 = mrcpp::dot(Phi[0], phi_x); + ComplexDouble X_10 = mrcpp::dot(Phi[1], phi_x); + ComplexDouble X_20 = mrcpp::dot(Phi[2], phi_x); + ComplexDouble X_30 = mrcpp::dot(Phi[3], phi_x); + ComplexDouble X_40 = mrcpp::dot(Phi[4], phi_x); REQUIRE(X_00.real() == Approx(ref(0, 0)).margin(thrs)); REQUIRE(X_10.real() == Approx(ref(0, 1)).margin(thrs)); REQUIRE(X_20.real() == Approx(ref(0, 2)).margin(thrs)); @@ -107,21 +107,21 @@ TEST_CASE("ElectricFieldOperator", "[electric_field_operator]") { // update ref based on MPI for (int i = 0; i < nFuncs; i++) { for (int j = 0; j < nFuncs; j++) { - if (not(mrcpp::mpi::my_orb(Phi[i])) or not(mrcpp::mpi::my_orb(Phi[j]))) ref(i, j) = 0.0; + if (not(mrcpp::mpi::my_func(Phi[i])) or not(mrcpp::mpi::my_func(Phi[j]))) ref(i, j) = 0.0; } } OrbitalVector xPhi = EF(Phi); for (int i = 0; i < Phi.size(); i++) { for (int j = 0; j < xPhi.size(); j++) { - ComplexDouble X_ij = orbital::dot(Phi[i], xPhi[j]); + ComplexDouble X_ij = mrcpp::dot(Phi[i], xPhi[j]); REQUIRE(std::abs(X_ij.real()) == Approx(ref(i, j)).margin(thrs)); } } } SECTION("expectation value") { ComplexDouble X_00 = EF(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(X_00.real() == Approx(ref(0, 0))); } else { REQUIRE(X_00.real() == Approx(0.0).margin(thrs)); @@ -158,13 +158,13 @@ TEST_CASE("ElectricFieldEnergy", "[electric_field_energy]") { // Setting up the 1s orbital on H HydrogenFunction sh(1, 0, 0, 1.0, {1.0, 0.0, 0.0}); - Orbital &phi_h = Phi[0]; - if (mrcpp::mpi::my_orb(phi_h)) mrcpp::cplxfunc::project(phi_h, sh, NUMBER::Real, prec); + Orbital phi_h = Phi[0]; + if (mrcpp::mpi::my_func(phi_h)) mrcpp::project(phi_h, sh, prec); // Setting up the 1s orbital on Li HydrogenFunction sli(1, 0, 0, 3.0, {-1.0, 0.0, 0.0}); - Orbital &phi_li = Phi[1]; - if (mrcpp::mpi::my_orb(phi_li)) mrcpp::cplxfunc::project(phi_li, sli, NUMBER::Real, prec); + Orbital phi_li = Phi[1]; + if (mrcpp::mpi::my_func(phi_li)) mrcpp::project(phi_li, sli, prec); SECTION("energy in the external field") { double E_ext = EF.trace(Phi).real(); diff --git a/tests/qmoperators/exchange_hessian.cpp b/tests/qmoperators/exchange_hessian.cpp index 0b4e70af3..aa44ebb72 100644 --- a/tests/qmoperators/exchange_hessian.cpp +++ b/tests/qmoperators/exchange_hessian.cpp @@ -72,7 +72,7 @@ TEST_CASE("ExchangeHessian", "[exchange_hessian]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } std::vector ns_x; @@ -98,7 +98,7 @@ TEST_CASE("ExchangeHessian", "[exchange_hessian]") { for (int i = 0; i < Phi_x.size(); i++) { HydrogenFunction f(ns_x[i], ls_x[i], ms_x[i]); - if (mrcpp::mpi::my_orb(Phi_x[i])) mrcpp::cplxfunc::project(Phi_x[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi_x[i])) mrcpp::project(Phi_x[i], f, prec); } int i = 0; @@ -111,8 +111,8 @@ TEST_CASE("ExchangeHessian", "[exchange_hessian]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -123,8 +123,8 @@ TEST_CASE("ExchangeHessian", "[exchange_hessian]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -135,7 +135,7 @@ TEST_CASE("ExchangeHessian", "[exchange_hessian]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/exchange_operator.cpp b/tests/qmoperators/exchange_operator.cpp index 47395fcd3..70ac2be0d 100644 --- a/tests/qmoperators/exchange_operator.cpp +++ b/tests/qmoperators/exchange_operator.cpp @@ -66,7 +66,7 @@ TEST_CASE("ExchangeOperator", "[exchange_operator]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } int i = 0; @@ -81,8 +81,8 @@ TEST_CASE("ExchangeOperator", "[exchange_operator]") { SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -93,8 +93,8 @@ TEST_CASE("ExchangeOperator", "[exchange_operator]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -105,7 +105,7 @@ TEST_CASE("ExchangeOperator", "[exchange_operator]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/identity_operator.cpp b/tests/qmoperators/identity_operator.cpp index 39fe01657..b694bc9ed 100644 --- a/tests/qmoperators/identity_operator.cpp +++ b/tests/qmoperators/identity_operator.cpp @@ -36,14 +36,15 @@ using namespace orbital; namespace identity_operator_tests { -auto f = [](const mrcpp::Coord<3> &r) -> double { +ComplexDouble i1 = {0.0, 1.0}; +auto f = [](const mrcpp::Coord<3> &r) -> ComplexDouble { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); return std::exp(-1.0 * R * R); }; -auto g = [](const mrcpp::Coord<3> &r) -> double { +auto g = [](const mrcpp::Coord<3> &r) -> ComplexDouble { double R = std::sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); - return std::exp(-2.0 * R * R); + return std::exp(-2.0 * R * R) * i1; }; TEST_CASE("IdentityOperator", "[identity_operator]") { @@ -52,26 +53,28 @@ TEST_CASE("IdentityOperator", "[identity_operator]") { SECTION("apply") { Orbital phi(SPIN::Paired); - mrcpp::cplxfunc::project(phi, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(phi, g, NUMBER::Imag, prec); + Orbital psi(SPIN::Paired); + mrcpp::project(phi, f, prec); + mrcpp::project(psi, g, prec); + mrcpp::CompFunction func_h; + ComplexDouble c(1.0, 0.0); + mrcpp::add(func_h, c, phi, c, psi, -1.0); IdentityOperator I; I.setup(prec); - Orbital Iphi = I(phi); + Orbital Iphi = I(func_h); I.clear(); - REQUIRE(Iphi.integrate().real() == Approx(phi.integrate().real())); - REQUIRE(Iphi.integrate().imag() == Approx(phi.integrate().imag())); + REQUIRE(Iphi.integrate().imag() == Approx(psi.integrate().imag())); } SECTION("vector apply") { OrbitalVector Phi; Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f, NUMBER::Real, prec); - if (mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], g, NUMBER::Imag, prec); + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f, prec); + if (mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], g, prec); normalize(Phi); IdentityOperator I; @@ -96,15 +99,15 @@ TEST_CASE("IdentityOperator", "[identity_operator]") { SECTION("expectation value") { Orbital phi(SPIN::Paired); - mrcpp::cplxfunc::project(phi, f, NUMBER::Real, prec); - mrcpp::cplxfunc::project(phi, g, NUMBER::Imag, prec); + mrcpp::project(phi, f, prec); + mrcpp::project(phi, g, prec); IdentityOperator I; I.setup(prec); ComplexDouble S = I(phi, phi); I.clear(); - REQUIRE(S.real() == Approx(phi.squaredNorm())); + REQUIRE(S.real() == Approx(phi.getSquareNorm())); REQUIRE(S.imag() < thrs); } @@ -112,12 +115,12 @@ TEST_CASE("IdentityOperator", "[identity_operator]") { OrbitalVector Phi; Phi.push_back(Orbital(SPIN::Paired)); Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f, NUMBER::Imag, prec); - if (mrcpp::mpi::my_orb(Phi[1])) mrcpp::cplxfunc::project(Phi[1], g, NUMBER::Imag, prec); + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f, prec); + if (mrcpp::mpi::my_func(Phi[1])) mrcpp::project(Phi[1], g, prec); IdentityOperator I; + I.setup(prec); ComplexMatrix S = I(Phi, Phi); I.clear(); diff --git a/tests/qmoperators/kinetic_operator.cpp b/tests/qmoperators/kinetic_operator.cpp index ade98fdfe..d4601edee 100644 --- a/tests/qmoperators/kinetic_operator.cpp +++ b/tests/qmoperators/kinetic_operator.cpp @@ -46,12 +46,11 @@ TEST_CASE("KineticOperator", "[kinetic_operator]") { int nFuncs = 3; OrbitalVector Phi; for (int n = 0; n < nFuncs; n++) Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); for (int n = 0; n < nFuncs; n++) { int nu[3] = {n, 0, 0}; HarmonicOscillatorFunction f(nu); - if (mrcpp::mpi::my_orb(Phi[n])) mrcpp::cplxfunc::project(Phi[n], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[n])) mrcpp::project(Phi[n], f, prec); } // reference values for harmonic oscillator eigenfunctions @@ -71,8 +70,8 @@ TEST_CASE("KineticOperator", "[kinetic_operator]") { T.setup(prec); SECTION("apply") { Orbital Tphi_0 = T(Phi[0]); - ComplexDouble T_00 = orbital::dot(Phi[0], Tphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble T_00 = mrcpp::dot(Phi[0], Tphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(T_00.real() == Approx(E_K(0))); REQUIRE(T_00.imag() < thrs); } else { @@ -84,8 +83,8 @@ TEST_CASE("KineticOperator", "[kinetic_operator]") { OrbitalVector TPhi = T(Phi); ComplexMatrix t = orbital::calc_overlap_matrix(Phi, TPhi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble T_ii = orbital::dot(Phi[i], TPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble T_ii = mrcpp::dot(Phi[i], TPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(T_ii.real() == Approx(E_K(i))); REQUIRE(T_ii.imag() < thrs); } else { @@ -96,7 +95,7 @@ TEST_CASE("KineticOperator", "[kinetic_operator]") { } SECTION("expectation value") { ComplexDouble T_00 = T(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(T_00.real() == Approx(E_K(0))); REQUIRE(T_00.imag() < thrs); } else { diff --git a/tests/qmoperators/momentum_operator.cpp b/tests/qmoperators/momentum_operator.cpp index cff69edea..7611adeb3 100644 --- a/tests/qmoperators/momentum_operator.cpp +++ b/tests/qmoperators/momentum_operator.cpp @@ -46,12 +46,11 @@ TEST_CASE("MomentumOperator", "[momentum_operator]") { int nFuncs = 3; OrbitalVector Phi; for (int n = 0; n < nFuncs; n++) Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); for (int n = 0; n < nFuncs; n++) { int nu[3] = {n, 0, 0}; HarmonicOscillatorFunction f(nu); - if (mrcpp::mpi::my_orb(Phi[n])) mrcpp::cplxfunc::project(Phi[n], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[n])) mrcpp::project(Phi[n], f, prec); } // reference values for harmonic oscillator eigenfunctions diff --git a/tests/qmoperators/nuclear_operator.cpp b/tests/qmoperators/nuclear_operator.cpp index ade3c25a3..af54238b8 100644 --- a/tests/qmoperators/nuclear_operator.cpp +++ b/tests/qmoperators/nuclear_operator.cpp @@ -66,7 +66,7 @@ TEST_CASE("PointNucleusHFYGB", "[nuclear_operator]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } // reference values for hydrogen eigenfunctions @@ -90,8 +90,8 @@ TEST_CASE("PointNucleusHFYGB", "[nuclear_operator]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { @@ -102,8 +102,8 @@ TEST_CASE("PointNucleusHFYGB", "[nuclear_operator]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i)).epsilon(prec)); REQUIRE(V_ii.imag() < thrs); } else { @@ -114,7 +114,7 @@ TEST_CASE("PointNucleusHFYGB", "[nuclear_operator]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { @@ -132,7 +132,6 @@ TEST_CASE("PointNucleusHFYGB", "[nuclear_operator]") { V.clear(); } - TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { const double prec = 1.0e-3; const double thrs = prec * prec; @@ -159,7 +158,7 @@ TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } // reference values for hydrogen eigenfunctions @@ -183,8 +182,8 @@ TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { @@ -195,8 +194,8 @@ TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i)).epsilon(prec)); REQUIRE(V_ii.imag() < thrs); } else { @@ -207,7 +206,7 @@ TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { @@ -225,7 +224,6 @@ TEST_CASE("PointNucleusParabola", "[nuclear_operator]") { V.clear(); } - TEST_CASE("PointNucleusMinimum", "[nuclear_operator]") { const double prec = 1.0e-3; const double thrs = prec * prec; @@ -252,7 +250,7 @@ TEST_CASE("PointNucleusMinimum", "[nuclear_operator]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } // reference values for hydrogen eigenfunctions @@ -276,8 +274,8 @@ TEST_CASE("PointNucleusMinimum", "[nuclear_operator]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { @@ -288,8 +286,8 @@ TEST_CASE("PointNucleusMinimum", "[nuclear_operator]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i)).epsilon(prec)); REQUIRE(V_ii.imag() < thrs); } else { @@ -300,7 +298,7 @@ TEST_CASE("PointNucleusMinimum", "[nuclear_operator]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0)).epsilon(prec)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/operator_composition.cpp b/tests/qmoperators/operator_composition.cpp index 2b211df43..16b3adacc 100644 --- a/tests/qmoperators/operator_composition.cpp +++ b/tests/qmoperators/operator_composition.cpp @@ -53,11 +53,11 @@ TEST_CASE("Operator composition", "[operator_composition]") { Phi.push_back(Orbital{SPIN::Alpha}); Phi.push_back(Orbital{SPIN::Alpha}); Phi.push_back(Orbital{SPIN::Alpha}); - Phi.distribute(); + for (int i = 0; i < 3; i++) { int nu[3] = {i, 0, 0}; HarmonicOscillatorFunction f(nu); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } SECTION("identity operator") { @@ -384,7 +384,7 @@ TEST_CASE("Operator composition", "[operator_composition]") { REQUIRE(SI.size(0) == 2); SI.setup(prec); - const ComplexDouble ref = {0.0, 0.5}; + const ComplexDouble ref = {0.0, 0.0}; // spin is flipped->orthogonal const ComplexMatrix val = SI(Phi, Phi); REQUIRE(val(0, 0).real() == Approx(ref.real()).margin(thrs)); REQUIRE(val(0, 0).imag() == Approx(ref.imag()).epsilon(thrs)); @@ -397,7 +397,7 @@ TEST_CASE("Operator composition", "[operator_composition]") { REQUIRE(SI.size(0) == 1); SI.setup(prec); - const ComplexDouble ref = {0.0, 0.5}; + const ComplexDouble ref = {0.0, 0.0}; // spin is flipped->orthogonal const ComplexMatrix val = SI(Phi, Phi); REQUIRE(val(0, 0).real() == Approx(ref.real()).margin(thrs)); REQUIRE(val(0, 0).imag() == Approx(ref.imag()).epsilon(thrs)); @@ -436,7 +436,7 @@ TEST_CASE("Operator composition", "[operator_composition]") { REQUIRE(SD.size(0) == 2); SD.setup(prec); - const ComplexDouble ref = {0.0, -std::sqrt(2.0) / 4.0}; + const ComplexDouble ref = {0.0, 0.0}; // spin is flipped->orthogonal const ComplexMatrix val = SD(Phi, Phi); REQUIRE(val(0, 1).real() == Approx(ref.real()).margin(thrs)); REQUIRE(val(0, 1).imag() == Approx(ref.imag()).epsilon(thrs)); @@ -449,7 +449,7 @@ TEST_CASE("Operator composition", "[operator_composition]") { REQUIRE(SD.size(0) == 2); SD.setup(prec); - const ComplexDouble ref = {0.0, -std::sqrt(2.0) / 4.0}; + const ComplexDouble ref = {0.0, 0.0}; // spin is flipped->orthogonal const ComplexMatrix val = SD(Phi, Phi); REQUIRE(val(0, 1).real() == Approx(ref.real()).margin(thrs)); REQUIRE(val(0, 1).imag() == Approx(ref.imag()).epsilon(thrs)); @@ -495,8 +495,8 @@ TEST_CASE("Operator composition", "[operator_composition]") { REQUIRE(gradV[2].size(0) == 1); gradV.setup(prec); - if (mrcpp::mpi::my_orb(Phi[0])) { - OrbitalVector dPhi_0 = gradV(Phi[0]); + if (mrcpp::mpi::my_func(Phi[0])) { + std::vector dPhi_0 = gradV(Phi[0]); REQUIRE(dPhi_0.size() == 3); REQUIRE(dPhi_0[0].norm() == Approx(1.0).epsilon(thrs)); REQUIRE(dPhi_0[1].norm() == Approx(0.0).margin(thrs)); diff --git a/tests/qmoperators/position_operator.cpp b/tests/qmoperators/position_operator.cpp index 7d7ae4bae..47d695684 100644 --- a/tests/qmoperators/position_operator.cpp +++ b/tests/qmoperators/position_operator.cpp @@ -44,14 +44,12 @@ TEST_CASE("PositionOperator", "[position_operator]") { int nFuncs = 3; OrbitalVector Phi; for (int n = 0; n < nFuncs; n++) Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); for (int n = 0; n < nFuncs; n++) { int nu[3] = {n, 0, 0}; HarmonicOscillatorFunction f(nu); - if (mrcpp::mpi::my_orb(Phi[n])) mrcpp::cplxfunc::project(Phi[n], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[n])) mrcpp::project(Phi[n], f, prec); } - // reference values for harmonic oscillator eigenfunctions DoubleMatrix ref(nFuncs, nFuncs); for (int i = 0; i < nFuncs; i++) { @@ -65,7 +63,7 @@ TEST_CASE("PositionOperator", "[position_operator]") { r.setup(prec); SECTION("vector apply") { OrbitalVector xPhi = r[0](Phi); - ComplexMatrix X = orbital::calc_overlap_matrix(Phi, xPhi); + ComplexMatrix X = mrcpp::calc_overlap_matrix(Phi, xPhi); for (int i = 0; i < X.rows(); i++) { for (int j = 0; j < X.cols(); j++) { REQUIRE(std::abs(X(i, j).real() - ref(i, j)) < thrs); } } diff --git a/tests/qmoperators/xc_hessian_lda.cpp b/tests/qmoperators/xc_hessian_lda.cpp index a1680583c..09f490478 100644 --- a/tests/qmoperators/xc_hessian_lda.cpp +++ b/tests/qmoperators/xc_hessian_lda.cpp @@ -73,11 +73,9 @@ TEST_CASE("XCHessianLDA", "[xc_hessian_lda]") { ms.push_back(0); Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); - for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } std::vector ns_x; @@ -95,11 +93,9 @@ TEST_CASE("XCHessianLDA", "[xc_hessian_lda]") { ms_x.push_back(1); Phi_x.push_back(Orbital(SPIN::Paired)); - Phi_x.distribute(); - for (int i = 0; i < Phi_x.size(); i++) { HydrogenFunction f(ns_x[i], ls_x[i], ms_x[i]); - if (mrcpp::mpi::my_orb(Phi_x[i])) mrcpp::cplxfunc::project(Phi_x[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi_x[i])) mrcpp::project(Phi_x[i], f, prec); } int i = 0; @@ -113,8 +109,8 @@ TEST_CASE("XCHessianLDA", "[xc_hessian_lda]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -125,8 +121,8 @@ TEST_CASE("XCHessianLDA", "[xc_hessian_lda]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -137,7 +133,7 @@ TEST_CASE("XCHessianLDA", "[xc_hessian_lda]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/xc_hessian_pbe.cpp b/tests/qmoperators/xc_hessian_pbe.cpp index 162e8ece1..c17f4b85e 100644 --- a/tests/qmoperators/xc_hessian_pbe.cpp +++ b/tests/qmoperators/xc_hessian_pbe.cpp @@ -76,7 +76,7 @@ TEST_CASE("XCHessianPBE", "[xc_hessian_pbe]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } std::vector ns_x; @@ -97,7 +97,7 @@ TEST_CASE("XCHessianPBE", "[xc_hessian_pbe]") { for (int i = 0; i < Phi_x.size(); i++) { HydrogenFunction f(ns_x[i], ls_x[i], ms_x[i]); - if (mrcpp::mpi::my_orb(Phi_x[i])) mrcpp::cplxfunc::project(Phi_x[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi_x[i])) mrcpp::project(Phi_x[i], f, prec); } int i = 0; @@ -111,8 +111,8 @@ TEST_CASE("XCHessianPBE", "[xc_hessian_pbe]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -123,8 +123,8 @@ TEST_CASE("XCHessianPBE", "[xc_hessian_pbe]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -135,7 +135,7 @@ TEST_CASE("XCHessianPBE", "[xc_hessian_pbe]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/xc_operator_blyp.cpp b/tests/qmoperators/xc_operator_blyp.cpp index 9095cd00a..8bff259d3 100644 --- a/tests/qmoperators/xc_operator_blyp.cpp +++ b/tests/qmoperators/xc_operator_blyp.cpp @@ -79,11 +79,9 @@ TEST_CASE("XCOperatorBLYP", "[xc_operator_blyp]") { for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } - // reference values obtained with a test run at order=9 in unit_test.cpp and prec=1.0e-5 here - DoubleMatrix E_P = DoubleMatrix::Zero(Phi.size(), Phi.size()); E_P(0, 0) = -0.4632575525; E_P(0, 1) = -0.0654671939; @@ -96,8 +94,8 @@ TEST_CASE("XCOperatorBLYP", "[xc_operator_blyp]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -108,8 +106,8 @@ TEST_CASE("XCOperatorBLYP", "[xc_operator_blyp]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -120,7 +118,7 @@ TEST_CASE("XCOperatorBLYP", "[xc_operator_blyp]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/qmoperators/xc_operator_lda.cpp b/tests/qmoperators/xc_operator_lda.cpp index fc873c178..c715c60c3 100644 --- a/tests/qmoperators/xc_operator_lda.cpp +++ b/tests/qmoperators/xc_operator_lda.cpp @@ -75,11 +75,9 @@ TEST_CASE("[XCOperatorLDA]", "[xc_operator_lda]") { } } - Phi.distribute(); - for (int i = 0; i < Phi.size(); i++) { HydrogenFunction f(ns[i], ls[i], ms[i]); - if (mrcpp::mpi::my_orb(Phi[i])) mrcpp::cplxfunc::project(Phi[i], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[i])) mrcpp::project(Phi[i], f, prec); } // reference values obtained with a test run at order=9 in unit_test.cpp and prec=1.0e-5 here @@ -96,8 +94,8 @@ TEST_CASE("[XCOperatorLDA]", "[xc_operator_lda]") { V.setup(prec); SECTION("apply") { Orbital Vphi_0 = V(Phi[0]); - ComplexDouble V_00 = orbital::dot(Phi[0], Vphi_0); - if (mrcpp::mpi::my_orb(Phi[0])) { + ComplexDouble V_00 = mrcpp::dot(Phi[0], Vphi_0); + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { @@ -108,8 +106,8 @@ TEST_CASE("[XCOperatorLDA]", "[xc_operator_lda]") { SECTION("vector apply") { OrbitalVector VPhi = V(Phi); for (int i = 0; i < Phi.size(); i++) { - ComplexDouble V_ii = orbital::dot(Phi[i], VPhi[i]); - if (mrcpp::mpi::my_orb(Phi[i])) { + ComplexDouble V_ii = mrcpp::dot(Phi[i], VPhi[i]); + if (mrcpp::mpi::my_func(Phi[i])) { REQUIRE(V_ii.real() == Approx(E_P(i, i)).epsilon(thrs)); REQUIRE(V_ii.imag() < thrs); } else { @@ -120,7 +118,7 @@ TEST_CASE("[XCOperatorLDA]", "[xc_operator_lda]") { } SECTION("expectation value") { ComplexDouble V_00 = V(Phi[0], Phi[0]); - if (mrcpp::mpi::my_orb(Phi[0])) { + if (mrcpp::mpi::my_func(Phi[0])) { REQUIRE(V_00.real() == Approx(E_P(0, 0)).epsilon(thrs)); REQUIRE(V_00.imag() < thrs); } else { diff --git a/tests/solventeffect/PB_solver.cpp b/tests/solventeffect/PB_solver.cpp index a53ab9fe5..35d07a974 100644 --- a/tests/solventeffect/PB_solver.cpp +++ b/tests/solventeffect/PB_solver.cpp @@ -88,11 +88,9 @@ TEST_CASE("Poisson Boltzmann equation solver standard", "[PB_solver][pb_standard auto Phi_p = std::make_shared(); auto &Phi = *Phi_p; Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); HydrogenFunction f(1, 0, 0); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f, NUMBER::Real, prec); - + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f, prec); auto rho_nuc = chemistry::compute_nuclear_density(prec, molecule, 100); auto scrf_p = std::make_unique(dielectric_func, kappa_sq, rho_nuc, P_p, D_p, kain, max_iter, dyn_thrs, SCRFDensityType::NUCLEAR); @@ -148,7 +146,7 @@ TEST_CASE("Poisson Boltzmann equation solver linearized", "[PB_solver][pb_linear Phi.distribute(); HydrogenFunction f(1, 0, 0); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f, NUMBER::Real, prec); + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f, prec); auto rho_nuc = chemistry::compute_nuclear_density(prec, molecule, 100); diff --git a/tests/solventeffect/reaction_operator.cpp b/tests/solventeffect/reaction_operator.cpp index 323b579a0..6621ef2c4 100644 --- a/tests/solventeffect/reaction_operator.cpp +++ b/tests/solventeffect/reaction_operator.cpp @@ -81,12 +81,10 @@ TEST_CASE("ReactionOperator", "[reaction_operator]") { auto Phi_p = std::make_shared(); auto &Phi = *Phi_p; Phi.push_back(Orbital(SPIN::Paired)); - Phi.distribute(); // project analytic 1s orbital HydrogenFunction f(1, 0, 0); - if (mrcpp::mpi::my_orb(Phi[0])) mrcpp::cplxfunc::project(Phi[0], f, NUMBER::Real, prec); - + if (mrcpp::mpi::my_func(Phi[0])) mrcpp::project(Phi[0], f, prec); auto rho_nuc = chemistry::compute_nuclear_density(prec, molecule, 100); int kain = 4; diff --git a/tests/unit_tests.cpp b/tests/unit_tests.cpp index 840feafea..0e33fec09 100644 --- a/tests/unit_tests.cpp +++ b/tests/unit_tests.cpp @@ -80,7 +80,7 @@ void initialize_mra() { // Constructing global MRA mrchem::MRA = new mrcpp::MultiResolutionAnalysis<3>(world, basis, max_depth); - mrcpp::cplxfunc::SetdefaultMRA(mrchem::MRA); + mrcpp::SetdefaultMRA(mrchem::MRA); } void finalize_mra() {