kmol/cpp-wavepacketInterface-share
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Wavepacket interface (0.1.1b) ============================== Features: - little interface for solving any hermitian stationary/non-stationary 1-dim. Schroedinger equations with "Wavepacket (vers. 0.1.1b)": https://sourceforge.net/projects/cpp.wavepacket.p/ - non-hermitian and multi-dim. systems are supposed to work as well but need more reformulations and testing of working examples - external parameters of potentials can be controlled from external configuration files (reduced need for compilation when changing a systems configuration) - compatibility with latest Wavepacket vers. >= 0.1.2 needs yet to be checked - for installation see below Wavepacket (vers. 0.1.1b) prerequisites ======================================= - Installation -------------- 1) install cmake (via wget, ./bootstrap, make, make install) 2) if no root permissions, this might be necessary: add ".cshrc" or ".<other dependent on used shell (check with "echo $SHELL")>" to home folder and write: 2a) setenv LD_LIBRARY_PATH <e.g.: /share/apps/gcc-4.9.1:$LD_LIBRARY_PATH> setenv LD_LIBRARY_PATH <e.g.: /share/apps/gcc-4.9.1/lib:$LD_LIBRARY_PATH> setenv LD_LIBRARY_PATH <e.g.: /share/apps/gcc-4.9.1/lib64:$LD_LIBRARY_PATH> 3) download/clone mps-bundle 4) run: "make cblapack" (C version of lapack for f2c library) in directory "/mps-bundle" and then "make build" 5) download/clone googletest into "/mps-bundle/mps/test/googletest" and run "cmake ." in there 6) download (wget *.tar.gz) and unpack (via "tar -zxvf <file-path>") fftw and change into its root directory 6a) run: ./configure --prefix="<path into mps-bundle root folder>" (prefix needed if no root permissions available) 6b) run: make 6c) run: make install 7) download boost into include folder "<boost>" and unpack 8) download wavepacket into include folder (where other libraries are), create folder "<wavepacket...>", unpack and change into root directory 8a) change Makefile.config: ... 8b) g++ version >= 4.7 : use e.g. "CXX=/share/apps/gcc-4.9.1/bin/g++" 8c) add lines (after "GTestFlags ..."): " BOOST_CPPFLAGS := -I$(LIBS_SRCDIR)/boost_1_62_0 TENSORLIB_DIR := $(LIBS_SRCDIR)/mps-bundle#(!) TENSORLIB_CPPFLAGS := -I$(TENSORLIB_DIR)/include ExtraCppFlags := $(BOOST_CPPFLAGS) $(TENSORLIB_CPPFLAGS) " 8d) change path value of variable "TENSOR_CONFIG" in Makefile.config: TENSOR_CONFIG := $(TENSORLIB_DIR)/bin/tensor-config 8e) add "-Wno-c++11-narrowing" in "CXXFLAGS" at end of file 8f) change following lines in Makefile (i.e. add $(ExtraCppFlags)) as follows: 8fA) $(LibObj):%.o:%.cpp $(CXX) -c $(StdCppFlags) $(ExtraCppFlags) -I$(IncludeDir) $(CXXFLAGS) -o $@ $^ 8fB) $(TestObj):%.o:%.cpp $(CXX) -c $(TestCppFlags) $(ExtraCppFlags) -I$(IncludeDir) -I$(TestDir) $(CXXFLAGS) -o $@ $^ 8fC) $(TestLibObj):%.o:%.cpp $(CXX) -c $(TestCppFlags) $(ExtraCppFlags) -I$(IncludeDir) -I $(TestDir) $(CXXFLAGS) -o $@ $^ 8g) run: "make" - Demo and test --------------- 13) check demo (e.g. Demos/HarmonicOscillator/Gaussian_1D/1/): 13a) change Makefile variables like: CXX := /share/apps/gcc-4.9.1/bin/g++ LD := /share/apps/gcc-4.9.1/bin/g++ 13b) append $(ExtraCppFlags) to line "CPPFLAGS:= ..." as follows: CPPFLAGS := -I$(WAVEPACKET_TOPDIR)/$(IncludeDir) $(ODEINT_CPPFLAGS) $(TENSOR_CPPFLAGS) $(ExtraCppFlags) 13c) run: make Wavepacket-Interface ==================== - Installation -------------- 1) create copy of sources/Makefile.template and name it sources/Makefile (!!Attention: do not add to git index!!) 2) in /sources/Makefile of "wavepacket interface" root change "WAVEPACKET_TOPDIR := <wavepacket root directory>" 3) download and install libconfig 4) in /sources/Makefile (linker/ld flag) of "wavepacket interface" root add "-L/this-path-to-lib/this-libname.so file>", "-Wl,-R<path to <libname>.so file>" and "-lconfig++" 5) download and install lapack: 5a) copy make.inc.example or /INSTALL/mace.inc.gfortran to make.inc 5b) run: make 6) download and install armadillo: 6a) run: cmake 6b) run: make install DESTDIR=<chosen library path> 7) in /sources/Makefile (linker/ld flag) of "wavepacket interface" add "-L/this-path-to-lib/<libname>.so file>", "-Wl,-R<path to <libname>.so file>" and "- armadillo -lapack -lrefblas" 7a) dependent on the lapack/blas installation the flag -lrefblas might have to be changed into "-lblas" or "-lopenblas" (i.e. for "OpenBLAS"; this is said to be most efficient) 7b) TODO: actually "-lrefblas" should be changed at least to "-lblas" as soon as the system optimised Blas installation is available (supposed to be faster) 8) run: make (in "wavepacket interface" root folder) and follow the wizard Troubleshooting =============== - mps-bundle ------------ - interesting note appearing during execution of "Installation step 4)": " Libraries have been installed in: /home/kschatz/libs/cpp/include/mps-bundle/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' " - lapack: --------- 1) if errors with "make" try: 1a) run: make clean 1b) run: make blaslib 1c) run: make - armadillo: ------------ 1) if problems with cmake/make install (e.g. lapack/blas not found) try: 1a) edit library paths in /cmake_aux/Modules/ARMA_FindLAPACK.cmake, /cmake_aux/Modules/ARMA_FindBLAS.cmake 1b) it might, but must not, be necessary to do the same in /cmake_aux/Modules/ARMA_FindBLAS.cmake too 1c) rebuild (not to forget to better delete CMakeCache.txt before) 2) if there are problems with reading symbols in liblapack.a whilst compiling: 2a) recompile lapack with compiler flag "-fPIC" (i.e.: edit make.inc in lapack root folder: append -fPIC to variables FORTRAN, OPTS, NOOPT, LOADER) 2b) then append "-gfortran" to linker/ld flag in /sources/Makefile of "wavepacket interface" root - Git ----- some comparably easy options after version merge conflicts (after git pull): a) "git checkout --ours <sources/file>" for keeping local file version, b) "git checkout --theirs <sources/file>" for keeping remote file version -> the following should then finish the resolving of the merging conflicts: c) git add <"*" or "specific file"> d) git commit -m "note" e) now it can be pushed: git push