### DIRAC Setup Help Source: https://gitlab.com/dirac/dirac/-/blob/master/README.md Display all available options for the DIRAC setup script. ```bash $ ./setup --help ``` -------------------------------- ### Configure PCMSolver with Custom Boost Path Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/requirements.md Use these flags with the setup script to specify non-standard installation directories for the Boost library. ```bash $ ./setup -DBOOST_INCLUDEDIR=/boost/location/include -DBOOST_LIBRARYDIR=/boost/location/lib ``` -------------------------------- ### Default DIRAC Build Process Source: https://gitlab.com/dirac/dirac/-/blob/master/README.md Build DIRAC using the default sequential installation process, involving setup, changing to the build directory, and making. ```bash cd dirac ./setup [--help] cd build make -j ``` -------------------------------- ### Static Build Environment Examples Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/static_linking.md Examples of successful build configurations on various Linux systems. ```text Linux-2.6.30-1-amd64, ownmath, i32lp64, GNU Fortran/gcc (Debian 4.4.5-10) 4.4.5; -static -fpic, nooptim Linux-2.6.30-1-amd64, ownmath, i32lp64, GNU Fortran/gcc (Debian 4.6.2-9); -static -fpic, nooptim ``` ```text /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpthread.a(sem_open.o): In function `sem_open': /home/aurel32/eglibc/eglibc-2.13/nptl/sem_open.c:333: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' ``` ```text Program received signal 11 (SIGSEGV): Segmentation fault. Backtrace for this error: + function __restore_rt (0x15D0620) from file sigaction.c ``` ```text Linux-2.6.18-274.3.1.el5; ownath; x86_64, ilp64, GNU Fortran (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)'; -g -static -fpic; opt Note: this gfortran shows error in test program for NAMELIST reading, however, DIRAC runs OK... NB: gfortran44 gives crashes for these OpenRSP tests: openrsp_pv,openrsp_jones,openrsp_cme. For "pure" runs you have to have higher version of GNU compilers. ``` ```bash ./setup --type=debug -D VERBOSE_OUTPUT=ON --build=build_static --static --internal-math --int64 /opt/intel/fce/10.1.015/bin/ifort (ifort (IFORT) 10.1 20080312); /usr/bin/gcc - gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51) ``` -------------------------------- ### MOLTRA Example for Finite-Field Calculation Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/exacorr.md An example demonstrating the setup for finite-field calculations using the MOLTRA module, including operator definition and perturbation frequencies. ```default **MOLTRA .ACTIVE energy -1.00 2.0 0.001 .NO4IND .PRPTRA *PRPTRA ``` -------------------------------- ### Install DIRAC with EasyBuild Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/easybuild.md Use these commands to load the EasyBuild module and execute the installation script with specified paths. ```default $ module load EasyBuild/5.2.0 $ module use /path-to-your-modules-directory/software/modules/all $ eb -r --buildpath=/your-build-directory/ --installpath=/path-to-your-modules-directory/software --repositorypath=/path-to-your-modules-directory/software/repository --sourcepath=/path-to-your-modules-directory/software/sources DIRAC-26.0-intel-2025a-int64.eb ``` -------------------------------- ### Define PuTTy Installation Path Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/windows.md Default installation directory for PuTTy on 64-bit Windows. ```default C:\Program Files (x86). ``` -------------------------------- ### Input Example for SIPPRNT and DIPPRNT Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/reladc.md Example of how to set custom screen output thresholds for SIPs and DIPs. Values are in eV. ```default .SIPPRNT 20.0 .DIPPRNT 100.0 ``` -------------------------------- ### Example POTENTIAL.INP File Structure Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/pelib.md This example illustrates the complete structure of a POTENTIAL.INP file, including header comments and the three main data sections: @COORDINATES, @MULTIPOLES, and @POLARIZABILITIES. ```default ! potential: 3_h2o.pot ! ------------------ ! Multipole moments: ! ------------------ ! TYPE: DALTON-LoProp ! METHOD: DFT ! XC-FUN: CAMB3LYP ! BASIS SET: loprop-6-31+G* ! ----------------- ! Polarizabilities: ! ----------------- ! TYPE: DALTON-LoProp ! METHOD: DFT ! XC-FUN: CAMB3LYP ! BASIS SET: loprop-6-31+G* ! ----------------- @COORDINATES 9 AA O 2.36500000 -0.26700000 1.17000000 H 2.26100000 -1.10300000 1.62300000 H 3.13200000 -0.39000000 0.61100000 O 0.60500000 -1.46500000 -2.08000000 H 1.56100000 -1.47200000 -2.03300000 H 0.33300000 -0.92000000 -1.34100000 O -2.76000000 -0.37900000 1.04500000 H -3.11300000 -0.71800000 0.22300000 H -3.08300000 -0.98500000 1.71200000 @MULTIPOLES ORDER 0 9 1 -0.71214000 2 0.35613000 3 0.35601000 4 -0.71172000 5 0.35592000 6 0.35580000 7 -0.71195000 8 0.35605000 9 0.35589000 ORDER 1 9 1 0.18080000 -0.26163000 -0.02886000 2 0.02828000 0.15363000 -0.09058000 3 -0.14340000 0.01302000 0.10892000 4 0.18641000 0.14653000 0.21409000 5 -0.18048000 0.00772000 -0.00000000 6 0.06166000 -0.10108000 -0.13640000 7 -0.18419000 -0.25746000 -0.04234000 8 0.06167000 0.05571000 0.16046000 9 0.05571000 0.10834000 -0.13341000 ORDER 2 9 1 -4.26483000 0.09135000 -0.61915000 -4.18829000 -0.42704000 -4.30439000 2 -0.44339000 0.02690000 -0.02255000 -0.13348000 -0.16450000 -0.36591000 3 -0.19077000 -0.05251000 -0.18965000 -0.43313000 0.03146000 -0.31920000 4 -3.75473000 -0.26370000 -0.29217000 -4.64173000 0.46544000 -4.36137000 5 -0.04700000 0.00328000 0.02886000 -0.45150000 0.00785000 -0.44444000 6 -0.41521000 -0.05871000 -0.07885000 -0.32164000 0.18442000 -0.20640000 7 -4.75797000 0.31610000 0.08263000 -4.49207000 -0.18934000 -3.50706000 8 -0.39388000 0.06405000 0.12905000 -0.39012000 0.12442000 -0.15864000 9 -0.40305000 0.09738000 -0.09242000 -0.27989000 -0.17467000 -0.26011000 @POLARIZABILITIES ORDER 1 1 9 1 4.27640000 0.35715000 0.52792000 3.89073000 0.26437000 4.59489000 2 0.42029000 0.22994000 0.06545000 2.24667000 -0.89940000 0.97487000 3 1.98744000 -0.26213000 -0.97060000 0.39136000 0.31466000 1.26588000 4 3.86307000 -0.04205000 -0.13378000 4.67372000 -0.64393000 4.23650000 5 2.71461000 0.04981000 0.19272000 0.51208000 -0.15905000 0.42003000 6 0.43352000 -0.33472000 -0.47532000 1.31851000 0.93618000 1.89744000 7 4.64952000 -0.67410000 -0.13594000 4.15079000 0.04738000 3.96576000 8 0.88018000 0.20475000 0.75848000 0.75651000 0.80933000 2.00627000 9 0.82484000 0.41178000 -0.61423000 1.44166000 -1.04482000 1.38018000 EXCLISTS 9 3 1 2 3 2 1 3 3 1 2 4 5 6 5 4 6 6 4 5 7 8 9 8 7 9 9 7 8 ``` -------------------------------- ### Install Genibo Package Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/python_scripts/genibo/README.md Install the Genibo package using pip. Use the --user flag if you lack installation permissions. ```bash $> pip install -e . ``` ```bash $> pip install --user -e . ``` -------------------------------- ### Build OpenMPI Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/static_linking.md Execute the build and installation process for the configured OpenMPI. ```bash make all install ``` -------------------------------- ### Install ROSE-ASE Calculator with Testing Dependencies Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/ase_rose/README.md Install the ROSE-ASE calculator along with its testing dependencies. This command installs the package in editable mode, including extras for testing. ```bash $ > pip install (--user) -e " .[testing]" ``` -------------------------------- ### Install ROSE-ASE Calculator for User Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/ase_rose/README.md Install the ROSE-ASE calculator for the current user if you lack administrative permissions. This command installs the package in editable mode for the user. ```bash $ > pip install --user -e . ``` -------------------------------- ### Install xcfun Library Source: https://gitlab.com/dirac/dirac/-/blob/master/src/xcfun/src/CMakeLists.txt Installs the 'xcfun' library target to the 'lib' directory within the installation prefix. This makes the library available for use by other projects. ```cmake install(TARGETS xcfun ARCHIVE DESTINATION lib) ``` -------------------------------- ### Install BibTeX Extension Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/documentation_howto.md Command to install the BibTeX extension for citations. ```bash pip install sphinxcontrib-bibtex ``` -------------------------------- ### PCM Calculation Setup Output Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/pcm/pcm_scf.md Summary of the PCM calculation setup printed upon Hamiltonian definition completion. ```default ===== Polarizable Continuum Model calculation set-up ===== * Polarizable Continuum Model using PCMSolver external module: . Converged potentials and charges at tesserae representative points written on file. . Calculate the SS block of the electrostatic potential matrix. . Separate potentials and apparent charges in nuclear and electronic. . Form One-Index Transformed ASC in a Linear Response calculation. . Print potentials at tesserae representative points. * PCMSolver, an API for the Polarizable Continuum Model electrostatic problem. Version 1.0.0 Main authors: R. Di Remigio, L. Frediani, K. Mozgawa With contributions from: R. Bast (CMake framework) U. Ekstroem (automatic differentiation library) J. Juselius (input parsing library and CMake framework) Theory: - J. Tomasi, B. Mennucci and R. Cammi: "Quantum Mechanical Continuum Solvation Models", Chem. Rev., 105 (2005) 2999 PCMSolver is distributed under the terms of the GNU Lesser General Public License. ``` -------------------------------- ### Start OPTIMI Input Deck Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/krmcscf.md This indicates the start of the input deck for OPTIMI keywords. ```default *OPTIMI ``` -------------------------------- ### Install Sphinx via pip Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/windows.md Use this command to install the Sphinx documentation generator from a downloaded Python Wheel file. ```default pip install Sphinx-1.3b1-py2.py3-none-any.whl ``` -------------------------------- ### Input Example for SIPEIGV Energy Ranges Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/reladc.md Example demonstrating how to specify energy ranges for calculating eigenvectors. The first line indicates the number of range pairs to follow. ```default .SIPEIGV #(same for .DIPEIGV) 4 # number of lines of ranges to follow 10.0 20.0 20.0 30.0 0.0 0.0 10.0 15.0 ``` -------------------------------- ### Install Gen1Int Library Source: https://gitlab.com/dirac/dirac/-/blob/master/src/gen1int/subtree/CMakeLists.txt Installs the 'gen1int' library to the 'lib' directory on the target system. ```cmake INSTALL(TARGETS gen1int ARCHIVE DESTINATION lib) ``` -------------------------------- ### Compile DIRAC with gprof Support Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/profiling.md Use the setup script to build DIRAC with profiling enabled. ```default ./setup --fc=... --cc=... --cxx=... --profiling --release ``` -------------------------------- ### Configure start vector methods Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/dirrci.md Specifies the method for generating start vectors for the CI calculation. ```default ISTART=1 ``` ```default ISTART=2 ``` ```default ISTART=3 ``` -------------------------------- ### Example Calculations for Blocks/Groups Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/exercises/Corrientes2012/computer_grasp.md These are example commands for calculating specific blocks or groups of elements, likely for radial density analysis or similar studies. ```default calculate the 3d, 4d, 5d, 6d block (coinage metals) ``` ```default calculate the 3d, 4d, 5d, 6d block (group: "Zn, Cd, Hg, Cn") ``` ```default calculate the 2p, 3p, 4p, 5p, 6p, 7p block (group 14) ``` ```default calculate the 2p, 3p, 4p, 5p, 6p, 7p block (group 16) ``` -------------------------------- ### View Transition Moment Calculation Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/properties/scfexc/tutorial.md Example output showing the calculated transition moment value. ```default < 0 |EpolL01X00Y00Z01| 1 > = -4.8256194928E-03 a.u., ``` -------------------------------- ### View Integration Output Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/visual/general/tutorial.md Example output format for 2D Gauss-Lobatto numerical integration. ```default +----------------------------------------+ ! 2D Gauss-Lobatto numerical integration ! +----------------------------------------+ plane is spanned by 3 points: "origin" 0.0000 0.0000 0.0000 "right" 0.0000 10.0000 0.0000 "top" 0.0000 0.0000 10.0000 nr of pieces to "right" 5 nr of pieces to "top" 5 order 10 scalar x-component y-component z-component 0.0000000000E+00 0.5908630369E-01 0.0000000000E+00 0.0000000000E+00 ``` -------------------------------- ### Install ROSE with AMS file interface Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/README.md Set ROSEDIR and AMSBUILDNAME, configure PATH with AMS libraries, create a build directory, configure with CMake including Fortran flags, and install. Run ctest for verification. ```bash export ROSEDIR=`pwd` export AMSBUILDNAME="auto" export PATH=$AMSHOME/build/$AMSBUILDNAME/lib:$AMSHOME/bin.$AMSBUILDNAME/zlib/lib:$PATH export PATH=$ROSEDIR/bin:$PATH mkdir build_withams cd build_withams cmake .. -DCMAKE_Fortran_FLAGS="-I$AMSHOME/build/libscm_base.build/$AMSBUILDNAME" make install ctest ``` -------------------------------- ### Manual Compilation and Testing Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/sysadmins.md Standard procedure for building DIRAC from source and verifying the installation. ```default $ ./setup --mpi --qmkl=parallel --prefix=/full/install/path/ $ cd build $ make [-j] $ export DIRAC_TMPDIR=/full/path/scratch $ export DIRAC_MPI_COMMAND="mpirun -np 8" # make test will run with MPI using 8 processes $ make test $ make install ``` -------------------------------- ### Build and Deploy Documentation via Shell Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/documentation_howto.md Example shell commands to build documentation logs and execute the deployment script. ```bash BUILD_DIR=build_ci_name cd $BUILD_DIR SPHINX_LOG="sphinx-log.txt" DOXYGEN_LOG="doxygen-log.txt" SLIDES_LOG="slides-log.txt" make html > $SPHINX_LOG 2> $SPHINX_LOG make slides > $SLIDES_LOG 2> $SLIDES_LOG make doxygen > $DOXYGEN_LOG 2> $DOXYGEN_LOG cd .. python maintenance/deploy_doc.py --root=/path/to/documentation/root --user=user123 --host=my.hostname.com --port=22 --post_script=/path/to/post_deploy.py ci_name $BUILD_DIR ``` -------------------------------- ### Set Up Working Directory Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/visual_radial_distributions.ipynb Configures the working directory for the tutorial, creating a 'workdir' and a specific subdirectory for the 'visual_tutorial_radial_distributions' test if they do not already exist. ```python notebook_path=Path().parent.resolve() dirac_path=notebook_path.parent.resolve() dirac_testset=Path(dirac_path, 'test').resolve() test_name='visual_tutorial_radial_distributions' workdir=Path(Path.cwd(), 'workdir', test_name).resolve() workdir.mkdir(parents=True, exist_ok=True) ``` -------------------------------- ### Add DIRAC build directory to PATH Source: https://gitlab.com/dirac/dirac/-/blob/master/ase_dirac/README.md Before installing, ensure the 'pam' script from the DIRAC build directory is accessible. This example shows how to add the current build directory to your PATH environment variable. ```bash $> cd ../build $> export PATH=$(pwd):$PATH $> cd ../ase_dirac ``` -------------------------------- ### DFT Electron Count Warning Example Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/dft/troubleshooting.md This output indicates a potential issue with the numerical integration grid or starting coefficients in a DFT calculation. The difference between electrons from numerical integration and orbital occupations exceeds the threshold. ```text number of grid points = 54836 DFT exchange-correlation energy: = -230.0368431371773283 number of electrons from numerical integration = 107.9973057254599667 number of electrons from orbital occupations = 108 WARNING: error in the number of electrons = -0.0026942745400333 is larger than 1.0d-3 this can happen when starting from coefficients from a different geometry or it can mean that the quadrature grid is inappropriate ``` -------------------------------- ### Configure working directory Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/visual_overview.ipynb Sets up the file paths for the tutorial output and creates the working directory. ```python notebook_path=Path().parent.resolve() dirac_path=notebook_path.parent.resolve() dirac_testset=Path(dirac_path, 'test').resolve() test_name='visual_tutorial_overview' workdir=Path(Path.cwd(), 'workdir', test_name).resolve() workdir.mkdir(parents=True, exist_ok=True) ``` -------------------------------- ### Execute build process after configuration Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/math.md Standard sequence to initiate the build after setting up the environment. ```default $ ./setup [--flags] $ cd build $ make ``` -------------------------------- ### Include Additional CMake Modules Source: https://gitlab.com/dirac/dirac/-/blob/master/CMakeLists.txt Includes further CMake modules for specific functionalities like benchmarks, external libraries, tutorials, unit tests, core components, documentation generation (Doxygen, Sphinx), installation, and other custom configurations. These are crucial for a complete build setup. ```cmake include(${PROJECT_SOURCE_DIR}/cmake/custom/benchmarks.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/external_libs.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/tutorials.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/unit/unit_tests.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/core.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/doxygen.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/sphinx.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/install.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/pam.cmake) include(${PROJECT_SOURCE_DIR}/cmake/custom/test.cmake) include(${PROJECT_SOURCE_DIR}/cmake/downloaded/autocmake_save_flags.cmake) ``` -------------------------------- ### Configure and Build Dirac Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/examples/hpc-unistra.md Execute the setup script with specified Fortran and C compilers, then navigate to the build directory and compile the binary using make. ```bash $ ./setup --fc=mpif90 --cc=mpicc $ cd build $ make ``` -------------------------------- ### Install ROSE-ASE Calculator Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/ase_rose/README.md Install the ROSE-ASE calculator locally using pip. This command installs the package in editable mode. ```bash $ > pip install -e . ``` -------------------------------- ### Set Up Working Directory Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/visual_interactive.ipynb Creates a dedicated working directory for files generated or used by the tutorial. The directory is named 'workdir' and includes the test name. ```python test_name='visual_tutorial_interactive' workdir=Path(Path.cwd(), 'workdir', test_name).resolve() workdir.mkdir(parents=True, exist_ok=True) str(workdir) ``` -------------------------------- ### Set up working environment Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/visual_overview.ipynb Change the current working directory to the specified path. ```python os.chdir(str(workdir)) print('Demonstration directory: %s' %(workdir)) ``` -------------------------------- ### CMake Build System Examples Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/further_development.md Illustrates learning and programming complex CMake build recipes, including macros, for C, C++, and Fortran projects. ```CMake cmake_minimum_required(VERSION 3.10) project(SimpleProject CXX Fortran) # Example of adding an executable add_executable(my_program main.cpp) # Example of linking libraries (if any) # target_link_libraries(my_program PRIVATE some_library) # Example of a simple macro macro(my_custom_macro) message("This is a custom macro.") endmacro() # Call the macro my_custom_macro() ``` -------------------------------- ### Install ASE DIRAC calculator (user mode) Source: https://gitlab.com/dirac/dirac/-/blob/master/ase_dirac/README.md Install the package in user mode if you lack administrative permissions. This command installs the package and its dependencies for the current user. ```bash $> pip install --user -e . ``` -------------------------------- ### Full Basis Set Configuration Example Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/molecule.md Demonstrates a complete basis set block with default and special assignments. ```default **MOLECULE *BASIS .DEFAULT dyall.cv2z .SPECIAL F BASIS cc-pVDZ ``` -------------------------------- ### Install ASE DIRAC calculator (editable mode) Source: https://gitlab.com/dirac/dirac/-/blob/master/ase_dirac/README.md Install the package in editable mode within your Python environment. This command installs the package and its dependencies, including pytest for testing. ```bash $> pip install -e . ``` -------------------------------- ### Install CMake on Fedora Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/general.md Install CMake on Fedora systems using yum. ```bash sudo yum install cmake ``` -------------------------------- ### Setup calculation with geometry and input file Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/ASE_dirac_quickguide.ipynb Sets up a DIRAC calculation using a geometry from an XYZ file and a specified input file. The potential energy is then calculated. ```python shutil.copyfile('SCF.inp', 'SCF2.inp') DiracAtoms = DIRAC.setup_geom_and_imp(h2_path, inp_filename="SCF2.inp") DiracAtoms.get_potential_energy() / Ha ``` -------------------------------- ### Setup and Testing Functions Source: https://gitlab.com/dirac/dirac/-/blob/master/src/xcfun/doc/xcfun_doc.html Functions for retrieving library information, versioning, and running internal diagnostic tests. ```APIDOC ## xcfun_splash() ### Description Returns a multi-line string describing the library and citation information. ## xcfun_version() ### Description Returns a double precision version number of the library. ## xcfun_test() ### Description Runs all internal tests and returns the number of failed tests. ``` -------------------------------- ### Install CMake on Ubuntu/Debian Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/general.md Install CMake on Ubuntu or Debian-based systems using apt-get. ```bash sudo apt-get install cmake ``` -------------------------------- ### Initialize TREXIO File Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/TrexioConverter.ipynb Prepares a new TREXIO file for writing by removing any existing file with the same name. ```python filename = dirac_file.replace('.h5','_trexio.h5') import os try: os.remove(filename) except: print(f"File {filename} does not yet exist.") # Open trexio file trexio_file = trexio.File(filename, mode='w', back_end=trexio.TREXIO_HDF5) ``` -------------------------------- ### Install/Upgrade Python Packages Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/CMakeLists.txt Installs or upgrades essential Python packages like 'runtest', 'genibo', and 'ase' using pip. It attempts installation with '--user' first, falling back to a system-wide installation if necessary. ```cmake set(ROSE_PYTHON_SCRIPTS_PATH ${PROJECT_SOURCE_DIR}/python_scripts) set(ROSE_ASE_PATH ${PROJECT_SOURCE_DIR}/ase_rose) file(GLOB atomfrag_files "${ROSE_PYTHON_SCRIPTS_PATH}/atomfrag_*.py") file(GLOB molfrag_files "${ROSE_PYTHON_SCRIPTS_PATH}/molfrag_*.py") execute_process( COMMAND ${PYTHON_INTERPRETER} -m pip install --user runtest --upgrade COMMAND ${PYTHON_INTERPRETER} -m pip install --user -e ${ROSE_PYTHON_SCRIPTS_PATH}/genibo/ --upgrade COMMAND ${PYTHON_INTERPRETER} -m pip install --user -e ${ROSE_ASE_PATH}[testing] --upgrade RESULT_VARIABLE INSTALLATION_CHECK_RESULT ) if(NOT INSTALLATION_CHECK_RESULT) message("\n Runtest and genibo (python_scripts/genibo/) python packages installed/upgraded successfully!\n") else() execute_process( COMMAND ${PYTHON_INTERPRETER} -m pip install runtest --upgrade COMMAND ${PYTHON_INTERPRETER} -m pip install -e ${ROSE_PYTHON_SCRIPTS_PATH}/genibo/ --upgrade COMMAND ${PYTHON_INTERPRETER} -m pip install -e ${ROSE_ASE_PATH}[testing] --upgrade RESULT_VARIABLE INSTALLATION_CHECK_RESULT_NO_USER ) if (INSTALLATION_CHECK_RESULT_NO_USER) message(FATAL_ERROR "Failed to install runtest and genibo (python_scripts/genibo/) python packages. Check python interpreter and pip.") endif() endif() ``` -------------------------------- ### Setup and Run DIRAC Calculation for Visualization Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/ASE_dirac_quickguide.ipynb Sets up a DIRAC calculation and retrieves the potential energy. This is the first step before requesting visualization properties. ```python DiracAtomsVis = DIRAC.setup_geom_and_imp(h2o_path, template_input_str="SCF") DiracAtomsVis.get_potential_energy() / Ha ``` -------------------------------- ### Install Atlas on Linux Mint Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/math.md Install required Atlas and LAPACK packages on Linux Mint. ```bash $ sudo apt-get install liblapack3 libatlas3-base ``` -------------------------------- ### Install Sphinx RTD Theme Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/documentation_howto.md Command to install the Read the Docs theme via pip. ```bash pip install sphinx_rtd_theme ``` -------------------------------- ### Install Sphinx Dependencies Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/documentation_howto.md Commands to install required Sphinx packages, including a version-restricted fallback. ```default $ python -m pip install sphinx sphinx_rtd_theme sphinxcontrib-bibtex ``` ```default $ python -m pip install "sphinx<7.0.0" sphinx_rtd_theme sphinxcontrib-bibtex ``` -------------------------------- ### Example output summary Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/polarizable_embedding/pe_response.md Sample output showing the excitation energies and oscillator strengths for the calculated system. ```default * Isotropic DL-DL non-zero oscillator strengths (f) =================================================== DL = dipole length Rate = Dipole radiation rate (s-1) Lifetime = corresponding radiation lifetime (s) Level Frequency (eV) f Rate Lifetime Symmetry ------------------------------------------------------------------------ 1 7.00316 0.000001 1.26019E+03 7.93528E-04 2 7.00317 0.000000 3.70356E+02 2.70010E-03 3 7.00317 0.000002 3.30199E+03 3.02848E-04 4 7.30170 0.049543 1.14615E+08 8.72484E-09 5 8.53008 0.000000 5.32729E+01 1.87713E-02 ------------------------------------------------------------------------ Sum of oscillator strengths: 0.04955 ``` -------------------------------- ### Configure math libraries with automatic detection Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/math.md Use the default setup command to trigger automatic detection of BLAS and LAPACK libraries. ```default $ ./setup --blas=auto --lapack=auto # this is the default ``` -------------------------------- ### Atomic XYZ Input Example Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/two_component_hamiltonians/x2c_mol_loc.md Example of an XYZ input file for a single atom, such as a chlorine atom. ```default 1 chlorine atom XYZ file Cl 0.0 0.0 0.0 ``` -------------------------------- ### Write XML document example Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/xml.md Demonstrates the typical workflow for creating and writing an XML document structure. ```default use xml_parser type(xml_tag),pointer:: tag ! tag=>xml_open('mydoc.xml') tag=>xml_tag_open(tag,'table') tag=>xml_tag_open(tag,'tr') tag=>xml_tag_open(tag,'td') ... set up a string or data ... call xml_attribute(tag,'valign','20') call xml_attribute(tag,'textcolor','#AAAAAA') call xml_add_data(tag,string) tag=>xml_tag_close(tag) tag=>xml_tag_open(tag,'td') ... similar ... tag=>xml_tag_close(tag) ... etc ... tag=>xml_tag_close(tag) tag=>xml_tag_close(tag) xml_write('mydoc.xml') xml_close('mydoc.xml') ``` -------------------------------- ### Setup calculation with geometry and input string Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/ASE_dirac_quickguide.ipynb Sets up a DIRAC calculation using a geometry from an XYZ file and an input string. The potential energy is then calculated. ```python with open("SCF.inp") as f: inp_string = f.read() DiracAtoms = DIRAC.setup_geom_and_imp(h2_path, inp_string=inp_string) DiracAtoms.get_potential_energy() / Ha ``` -------------------------------- ### Install Hieroglyph via pip Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/windows.md Use this command to install the Hieroglyph package required for generating HTML slides. ```default pip install hieroglyph ``` -------------------------------- ### Initialize mystring module Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/good_fortran_90_practices.md Include the mystring module to enable dynamical string functionality. ```Fortran use mystring ``` -------------------------------- ### Configure PElib Build Options and Sources Source: https://gitlab.com/dirac/dirac/-/blob/master/src/pelib/subtree/CMakeLists.txt Sets up build options, defines the PElib library, and lists all required Fortran source files. ```cmake # see https://cmake.org/cmake/help/latest/policy/CMP0077.html cmake_policy(SET CMP0077 NEW) option(ENABLE_PDE "Enable PDE" OFF) option(ENABLE_MPI "Enable MPI" OFF) option(USE_MPIF "Use mpif.h instead of mpi.mod" OFF) option(ENABLE_COVERAGE "Enable code coverage (requires GCC)" OFF) add_library(PElib) target_sources( PElib PRIVATE ${PROJECT_SOURCE_DIR}/src/pelib.F90 ${PROJECT_SOURCE_DIR}/src/pelib_precision.F90 ${PROJECT_SOURCE_DIR}/src/pelib_options.F90 ${PROJECT_SOURCE_DIR}/src/pelib_constants.F90 ${PROJECT_SOURCE_DIR}/src/interfaces/pelib_integral_interfaces.F90 ${PROJECT_SOURCE_DIR}/src/interfaces/pelib_blas_interfaces.F90 ${PROJECT_SOURCE_DIR}/src/pelib_utils.F90 ${PROJECT_SOURCE_DIR}/src/pelib_mpi.F90 ${PROJECT_SOURCE_DIR}/src/pelib_options.F90 ${PROJECT_SOURCE_DIR}/src/pelib_pde.F90 ${PROJECT_SOURCE_DIR}/src/pelib_operators.F90 ${PROJECT_SOURCE_DIR}/src/pelib_multipole_tools.F90 ${PROJECT_SOURCE_DIR}/src/pelib_interaction_tools.F90 ${PROJECT_SOURCE_DIR}/src/pelib_analysis_tools.F90 ${PROJECT_SOURCE_DIR}/src/pelib_cavity_generators.F90 ${PROJECT_SOURCE_DIR}/src/pelib_potential_derivatives.F90 ${PROJECT_SOURCE_DIR}/src/pelib_induced_moments.F90 ${PROJECT_SOURCE_DIR}/src/interfaces/pelib_lapack_interfaces.F90 ${PROJECT_SOURCE_DIR}/src/fmm/fmm.F90 ${PROJECT_SOURCE_DIR}/src/fmm/tensors.F90 ${PROJECT_SOURCE_DIR}/src/fmm/tensors_recursive.F90 ${PROJECT_SOURCE_DIR}/src/fmm/tensors_damped_erf.F90 ${PROJECT_SOURCE_DIR}/src/fmm/tensors_damped_thole.F90 ${PROJECT_SOURCE_DIR}/src/fmm/tensors_damped_amoeba.F90 ) ``` -------------------------------- ### Initialize Intel Parallel Studio XE tools Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/windows.md Run the `psxevars.bat` script to initialize the Intel Parallel Studio XE 2015 environment for the Intel 64 architecture. ```batch cd C:\Program Files (x86)\Intel\Parallel Studio XE 2015 psxevars.bat intel64 ``` -------------------------------- ### Setup calculation with geometry and template string Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/ASE_dirac_quickguide.ipynb Sets up a DIRAC calculation using a geometry from an XYZ file and a template input string. The potential energy is then calculated. ```python DiracAtoms = DIRAC.setup_geom_and_imp(h2_path, template_input_str="CCSD") DiracAtoms.get_potential_energy() / Ha ``` -------------------------------- ### Automated Atomic Start Calculation Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/start_guess/atomic_start.md Bash script to automate the PAM command for calculating atomic starts for Hydrogen, Carbon, Nitrogen, and Mercury. ```bash for atom in H C N Hg do pam --mol=${atom}.mol --inp=${atom}.inp --get=DFACMO mv DFACMO ac.${atom} done ``` -------------------------------- ### Launch Pageant with Private Key Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/windows.md Starts the Pageant authentication agent with a specific PPK file at Windows startup. ```default "C:\Program Files\PuTTY\pageant.exe" C:\Users\\.ssh\id_rsa_Windows7.ppk ``` -------------------------------- ### DIRAC Input File for Atomic Start Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/atomic_start2.md This is the input file for the DIRAC atomic start calculation. It specifies the calculation type and atomic occupations. ```default **DIRAC .WAVE FUNC .ANALYZE #.INPTES **WAVE FUN .SCF *SCF .ATOMST AFPUXX 2 1..43 1.00 44..50 0.286 AFOXXX 2 1,2 1.00 3..5 0.667 AFHXXX 1 1 0.50 .CLOSED SHELL 84 86 **ANALYZE .MULPOP **END OF ``` -------------------------------- ### Generate HTML Documentation Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/documentation_howto.md Commands to build the documentation locally using CMake and Make. ```default $ mkdir build $ cd build $ cmake .. $ make -k html > build_html.log 2>&1 ``` -------------------------------- ### Example RECP Data Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/molecule_and_basis/molecule_with_ecp.md This is an example of RECP data, showing core electron count, number of AREP and SO blocks, and basis set information. ```text 2 .922500 -.019085 2 2.569100 .035451 2 7.908600 -.007995 1 25.061100 .096830 1. 1 H 0.00000000 0.00000000 0.00000000 LARGE BASIS aug-cc-pVTZ FINISH ``` -------------------------------- ### Install Python packages for DIRAC documentation in Cygwin Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/windows.md Install necessary Python packages for building DIRAC documentation within the Cygwin environment using pip. ```bash pip install sphinx python-dateutil pyparsing sphinxcontrib-bibtex sphinx_rtd_theme numpy matplotlib hieroglyph ``` -------------------------------- ### Two-Photon Absorption Example Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/properties.md Example of specifying parameters for two-photon absorption cross section calculations in DIRAC. This configuration is for a point group with four boson irreps, such as C2v. ```default .TWO-PHOTON 5 5 5 0 ``` -------------------------------- ### Setup calculation with geometry from XYZ file Source: https://gitlab.com/dirac/dirac/-/blob/master/demo_notebooks/ASE_dirac_quickguide.ipynb Sets up a DIRAC calculation using a geometry defined in an XYZ file. The potential energy is then calculated and converted to Hartrees. ```python DiracAtoms: Atoms = DIRAC.setup_geom_and_imp(h2_path) DiracAtoms.get_potential_energy() / Ha ``` -------------------------------- ### SCF Initialization Methods Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/manual/wave_function/scf.md Overview of the seven methods to initiate an SCF calculation. ```APIDOC ## SCF Calculation Initialization An SCF-calculation (HF or DFT) may be initiated in seven different ways: 1. **MO coefficients**: Using MO coefficients from a previous calculation. This is the default when a CHECKPOINT file with MO coefficients is found. 2. **Sum of atomic LDA potentials**: Using a sum of atomic LDA potentials. This is the default when no MO coefficients are provided. 3. **Bare nucleus approach**: Using coefficients obtained by diagonalization of the one-electron Fock matrix. 4. **Corrected bare nucleus approach**: Correcting the bare nucleus potential using screening factors from Slater’s rules. 5. **Two-electron Fock matrix**: Using the two-electron Fock matrix from a previous calculation. 6. **Atomic start**: Using an atomic start based on densities from atomic SCF runs for individual centers. 7. **Extended Hückel start**: Using an extended Hückel start based on atomic fragments. The default is to start from MO coefficients if the CHECKPOINT file is present. Otherwise, the corrected bare nucleus approach (SCF_.SCRPOT) is followed. In all cases, linear dependencies are removed in the zeroth iteration. ``` -------------------------------- ### Install ROSE without AMS Source: https://gitlab.com/dirac/dirac/-/blob/master/src/rose/subtree/README.md Set the ROSE directory, add ROSE binaries to the PATH, create a build directory, configure with CMake, and install. Run ctest for verification. ```bash export ROSEDIR=`pwd` export PATH=$ROSEDIR/bin:$PATH mkdir build cd build cmake .. make install ctest ``` -------------------------------- ### Test DIRAC Installation with ctest Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/examples/hpc-ulille.md A SLURM job script to test the DIRAC installation after compilation. It loads necessary modules, sets environment variables, and runs specific ctest commands. ```bash #!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks-per-node=1 #SBATCH --cpus-per-task=12 #SBATCH --time=10:00:00 #SBATCH --mem=100G ######################################################## # modules to use module purge module load cmake/3.29.2 module load intel/2024/compilers ######################################################## # DIRAC setup # export DIRACBIN= export DIRACPAM=${DIRACBIN}/pam export OMP_NUM_THREADS=12 export OMP_DYNAMIC=FALSE export OMP_MAX_ACTIVE_LEVELS=3 export OMP_THREAD_LIMIT=256 export OMP_WAIT_POLICY=PASSIVE export OMP_PROC_BIND="spread,spread,spread" export MKL_NUM_THREADS=12 export MKL_DYNAMIC=FALSE # ######################################################## cd ${DIRACBIN} export DIRAC_MPI_COMMAND="" # For only executing tests related to exacorr only... ctest -VV -R exacorr ``` -------------------------------- ### Execute bootstrap script in Windows Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/installation/windows.md Commands to initiate the bootstrap process in standard Command Prompt versus PowerShell. ```default bootstrap.bat mingw ``` ```default .\bootstrap.bat mingw ``` -------------------------------- ### Run UF3Cl3 SCF Calculation Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/tutorials/nmr_uf3cl3/tutorial.md Minimal pam command to run the UF3Cl3 SCF calculation using the atomic start method. Includes options for outputting CMOs and copying atomic start files. ```bash pam --mol=UF3Cl3.mol --inp=SCFatom.inp --outcmo --copy="DFUXXX DFCLXX DFFXXX" ``` -------------------------------- ### Initialize and update submodules Source: https://gitlab.com/dirac/dirac/-/blob/master/doc/development/external_projects.md Fetches external sources without triggering a full build. ```bash $ git submodule init $ git submodule update ```