├── .github └── workflows │ └── c-cpp.yml ├── .gitignore ├── .travis.yml ├── Eigen3 ├── .DS_Store ├── BSD_LICENSE ├── Eigen │ ├── CMakeLists.txt │ ├── Cholesky │ ├── CholmodSupport │ ├── Core │ ├── Dense │ ├── Eigen │ ├── Eigenvalues │ ├── Geometry │ ├── Householder │ ├── IterativeLinearSolvers │ ├── Jacobi │ ├── LU │ ├── MetisSupport │ ├── OrderingMethods │ ├── PaStiXSupport │ ├── PardisoSupport │ ├── QR │ ├── QtAlignedMalloc │ ├── SPQRSupport │ ├── SVD │ ├── Sparse │ ├── SparseCholesky │ ├── SparseCore │ ├── SparseLU │ ├── SparseQR │ ├── StdDeque │ ├── StdList │ ├── StdVector │ ├── SuperLUSupport │ ├── UmfPackSupport │ └── src │ │ ├── Cholesky │ │ ├── LDLT.h │ │ ├── LLT.h │ │ └── LLT_LAPACKE.h │ │ ├── CholmodSupport │ │ └── CholmodSupport.h │ │ ├── Core │ │ ├── Array.h │ │ ├── ArrayBase.h │ │ ├── ArrayWrapper.h │ │ ├── Assign.h │ │ ├── AssignEvaluator.h │ │ ├── Assign_MKL.h │ │ ├── BandMatrix.h │ │ ├── Block.h │ │ ├── BooleanRedux.h │ │ ├── CommaInitializer.h │ │ ├── ConditionEstimator.h │ │ ├── CoreEvaluators.h │ │ ├── CoreIterators.h │ │ ├── CwiseBinaryOp.h │ │ ├── CwiseNullaryOp.h │ │ ├── CwiseTernaryOp.h │ │ ├── CwiseUnaryOp.h │ │ ├── CwiseUnaryView.h │ │ ├── DenseBase.h │ │ ├── DenseCoeffsBase.h │ │ ├── DenseStorage.h │ │ ├── Diagonal.h │ │ ├── DiagonalMatrix.h │ │ ├── DiagonalProduct.h │ │ ├── Dot.h │ │ ├── EigenBase.h │ │ ├── ForceAlignedAccess.h │ │ ├── Fuzzy.h │ │ ├── GeneralProduct.h │ │ ├── GenericPacketMath.h │ │ ├── GlobalFunctions.h │ │ ├── IO.h │ │ ├── Inverse.h │ │ ├── Map.h │ │ ├── MapBase.h │ │ ├── MathFunctions.h │ │ ├── MathFunctionsImpl.h │ │ ├── Matrix.h │ │ ├── MatrixBase.h │ │ ├── NestByValue.h │ │ ├── NoAlias.h │ │ ├── NumTraits.h │ │ ├── PermutationMatrix.h │ │ ├── PlainObjectBase.h │ │ ├── Product.h │ │ ├── ProductEvaluators.h │ │ ├── Random.h │ │ ├── Redux.h │ │ ├── Ref.h │ │ ├── Replicate.h │ │ ├── ReturnByValue.h │ │ ├── Reverse.h │ │ ├── Select.h │ │ ├── SelfAdjointView.h │ │ ├── SelfCwiseBinaryOp.h │ │ ├── Solve.h │ │ ├── SolveTriangular.h │ │ ├── SolverBase.h │ │ ├── StableNorm.h │ │ ├── Stride.h │ │ ├── Swap.h │ │ ├── Transpose.h │ │ ├── Transpositions.h │ │ ├── TriangularMatrix.h │ │ ├── VectorBlock.h │ │ ├── VectorwiseOp.h │ │ ├── Visitor.h │ │ ├── arch │ │ │ ├── AVX │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ └── TypeCasting.h │ │ │ ├── AltiVec │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ │ ├── CUDA │ │ │ │ ├── Complex.h │ │ │ │ ├── Half.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ ├── PacketMathHalf.h │ │ │ │ └── TypeCasting.h │ │ │ ├── Default │ │ │ │ └── Settings.h │ │ │ ├── NEON │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ │ ├── SSE │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ └── TypeCasting.h │ │ │ └── ZVector │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ ├── functors │ │ │ ├── AssignmentFunctors.h │ │ │ ├── BinaryFunctors.h │ │ │ ├── NullaryFunctors.h │ │ │ ├── StlFunctors.h │ │ │ ├── TernaryFunctors.h │ │ │ └── UnaryFunctors.h │ │ ├── products │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ ├── GeneralMatrixMatrix.h │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h │ │ │ ├── GeneralMatrixMatrix_BLAS.h │ │ │ ├── GeneralMatrixVector.h │ │ │ ├── GeneralMatrixVector_BLAS.h │ │ │ ├── Parallelizer.h │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h │ │ │ ├── SelfadjointMatrixVector.h │ │ │ ├── SelfadjointMatrixVector_BLAS.h │ │ │ ├── SelfadjointProduct.h │ │ │ ├── SelfadjointRank2Update.h │ │ │ ├── TriangularMatrixMatrix.h │ │ │ ├── TriangularMatrixMatrix_BLAS.h │ │ │ ├── TriangularMatrixVector.h │ │ │ ├── TriangularMatrixVector_BLAS.h │ │ │ ├── TriangularSolverMatrix.h │ │ │ ├── TriangularSolverMatrix_BLAS.h │ │ │ └── TriangularSolverVector.h │ │ └── util │ │ │ ├── BlasUtil.h │ │ │ ├── Constants.h │ │ │ ├── DisableStupidWarnings.h │ │ │ ├── ForwardDeclarations.h │ │ │ ├── MKL_support.h │ │ │ ├── Macros.h │ │ │ ├── Memory.h │ │ │ ├── Meta.h │ │ │ ├── NonMPL2.h │ │ │ ├── ReenableStupidWarnings.h │ │ │ ├── StaticAssert.h │ │ │ └── XprHelper.h │ │ ├── Eigenvalues │ │ ├── ComplexEigenSolver.h │ │ ├── ComplexSchur.h │ │ ├── ComplexSchur_LAPACKE.h │ │ ├── EigenSolver.h │ │ ├── GeneralizedEigenSolver.h │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ ├── HessenbergDecomposition.h │ │ ├── MatrixBaseEigenvalues.h │ │ ├── RealQZ.h │ │ ├── RealSchur.h │ │ ├── RealSchur_LAPACKE.h │ │ ├── SelfAdjointEigenSolver.h │ │ ├── SelfAdjointEigenSolver_LAPACKE.h │ │ └── Tridiagonalization.h │ │ ├── Geometry │ │ ├── AlignedBox.h │ │ ├── AngleAxis.h │ │ ├── EulerAngles.h │ │ ├── Homogeneous.h │ │ ├── Hyperplane.h │ │ ├── OrthoMethods.h │ │ ├── ParametrizedLine.h │ │ ├── Quaternion.h │ │ ├── Rotation2D.h │ │ ├── RotationBase.h │ │ ├── Scaling.h │ │ ├── Transform.h │ │ ├── Translation.h │ │ ├── Umeyama.h │ │ └── arch │ │ │ └── Geometry_SSE.h │ │ ├── Householder │ │ ├── BlockHouseholder.h │ │ ├── Householder.h │ │ └── HouseholderSequence.h │ │ ├── IterativeLinearSolvers │ │ ├── BasicPreconditioners.h │ │ ├── BiCGSTAB.h │ │ ├── ConjugateGradient.h │ │ ├── IncompleteCholesky.h │ │ ├── IncompleteLUT.h │ │ ├── IterativeSolverBase.h │ │ ├── LeastSquareConjugateGradient.h │ │ └── SolveWithGuess.h │ │ ├── Jacobi │ │ └── Jacobi.h │ │ ├── LU │ │ ├── Determinant.h │ │ ├── FullPivLU.h │ │ ├── InverseImpl.h │ │ ├── PartialPivLU.h │ │ ├── PartialPivLU_LAPACKE.h │ │ └── arch │ │ │ └── Inverse_SSE.h │ │ ├── MetisSupport │ │ └── MetisSupport.h │ │ ├── OrderingMethods │ │ ├── Amd.h │ │ ├── Eigen_Colamd.h │ │ └── Ordering.h │ │ ├── PaStiXSupport │ │ └── PaStiXSupport.h │ │ ├── PardisoSupport │ │ └── PardisoSupport.h │ │ ├── QR │ │ ├── ColPivHouseholderQR.h │ │ ├── ColPivHouseholderQR_LAPACKE.h │ │ ├── CompleteOrthogonalDecomposition.h │ │ ├── FullPivHouseholderQR.h │ │ ├── HouseholderQR.h │ │ └── HouseholderQR_LAPACKE.h │ │ ├── SPQRSupport │ │ └── SuiteSparseQRSupport.h │ │ ├── SVD │ │ ├── BDCSVD.h │ │ ├── JacobiSVD.h │ │ ├── JacobiSVD_LAPACKE.h │ │ ├── SVDBase.h │ │ └── UpperBidiagonalization.h │ │ ├── SparseCholesky │ │ ├── SimplicialCholesky.h │ │ └── SimplicialCholesky_impl.h │ │ ├── SparseCore │ │ ├── AmbiVector.h │ │ ├── CompressedStorage.h │ │ ├── ConservativeSparseSparseProduct.h │ │ ├── MappedSparseMatrix.h │ │ ├── SparseAssign.h │ │ ├── SparseBlock.h │ │ ├── SparseColEtree.h │ │ ├── SparseCompressedBase.h │ │ ├── SparseCwiseBinaryOp.h │ │ ├── SparseCwiseUnaryOp.h │ │ ├── SparseDenseProduct.h │ │ ├── SparseDiagonalProduct.h │ │ ├── SparseDot.h │ │ ├── SparseFuzzy.h │ │ ├── SparseMap.h │ │ ├── SparseMatrix.h │ │ ├── SparseMatrixBase.h │ │ ├── SparsePermutation.h │ │ ├── SparseProduct.h │ │ ├── SparseRedux.h │ │ ├── SparseRef.h │ │ ├── SparseSelfAdjointView.h │ │ ├── SparseSolverBase.h │ │ ├── SparseSparseProductWithPruning.h │ │ ├── SparseTranspose.h │ │ ├── SparseTriangularView.h │ │ ├── SparseUtil.h │ │ ├── SparseVector.h │ │ ├── SparseView.h │ │ └── TriangularSolver.h │ │ ├── SparseLU │ │ ├── SparseLU.h │ │ ├── SparseLUImpl.h │ │ ├── SparseLU_Memory.h │ │ ├── SparseLU_Structs.h │ │ ├── SparseLU_SupernodalMatrix.h │ │ ├── SparseLU_Utils.h │ │ ├── SparseLU_column_bmod.h │ │ ├── SparseLU_column_dfs.h │ │ ├── SparseLU_copy_to_ucol.h │ │ ├── SparseLU_gemm_kernel.h │ │ ├── SparseLU_heap_relax_snode.h │ │ ├── SparseLU_kernel_bmod.h │ │ ├── SparseLU_panel_bmod.h │ │ ├── SparseLU_panel_dfs.h │ │ ├── SparseLU_pivotL.h │ │ ├── SparseLU_pruneL.h │ │ └── SparseLU_relax_snode.h │ │ ├── SparseQR │ │ └── SparseQR.h │ │ ├── StlSupport │ │ ├── StdDeque.h │ │ ├── StdList.h │ │ ├── StdVector.h │ │ └── details.h │ │ ├── SuperLUSupport │ │ └── SuperLUSupport.h │ │ ├── UmfPackSupport │ │ └── UmfPackSupport.h │ │ ├── misc │ │ ├── Image.h │ │ ├── Kernel.h │ │ ├── RealSvd2x2.h │ │ ├── blas.h │ │ ├── lapack.h │ │ ├── lapacke.h │ │ └── lapacke_mangling.h │ │ └── plugins │ │ ├── ArrayCwiseBinaryOps.h │ │ ├── ArrayCwiseUnaryOps.h │ │ ├── BlockMethods.h │ │ ├── CommonCwiseBinaryOps.h │ │ ├── CommonCwiseUnaryOps.h │ │ ├── MatrixCwiseBinaryOps.h │ │ └── MatrixCwiseUnaryOps.h ├── GPL_LICENSE ├── LGPL_LICENSE ├── MINPACK_LICENSE ├── MPL2_LICENSE └── README ├── Makefile ├── README.md ├── configure ├── doc ├── Development_checklist ├── Example_input │ ├── Gaussian_files │ │ └── BASIS │ ├── NWChem_files │ │ └── BASIS │ ├── PDB_input │ │ ├── LICHEM_files │ │ │ ├── BASIS │ │ │ ├── connect.inp │ │ │ ├── peptide.xyz │ │ │ ├── regions.inp │ │ │ ├── tinker.key │ │ │ └── xyzfile.xyz │ │ ├── Original_files │ │ │ ├── caps.xyz │ │ │ ├── peptide_orig.pdb │ │ │ └── tinker.key │ │ ├── README │ │ └── amoebapro13.prm │ ├── Region_files │ │ ├── AMOEBAQMMM_reg.inp │ │ ├── QMMMOpt_reg.inp │ │ ├── QMMMPIMC_reg.inp │ │ └── QMOpt_reg.inp │ └── TINKER_files │ │ └── tinker.key ├── KNOWNISSUES └── images │ ├── LICHEM_logo.png │ ├── QMMM_1.png │ ├── QMMM_1.svg │ ├── QMMM_2.png │ ├── QMMM_2.svg │ ├── QMMM_3.png │ ├── QMMM_3.svg │ ├── dimer.png │ └── trimer.png ├── include ├── LICHEM_Hermite.h ├── LICHEM_QSM.h ├── LICHEM_QSM_MPI.h ├── LICHEM_base_classes.h ├── LICHEM_classes.h ├── LICHEM_clibs.h ├── LICHEM_constants.h ├── LICHEM_globals.h ├── LICHEM_headers.h ├── LICHEM_matrix.h └── LICHEM_options.h ├── src ├── Analysis.cpp ├── Basis.cpp ├── Basis_sets.cpp ├── Core_funcs.cpp ├── Frozen_density.cpp ├── GPL_LICENSE ├── GauExternal.cpp ├── Gaussian.cpp ├── Gaussian.cpp_no_ext ├── Hermite_eng.cpp ├── Input_reader.cpp ├── LAMMPS.cpp ├── LAMMPS2LICHEM.cpp ├── LICHEM.cpp ├── LICHEM_classes.cpp ├── Multipoles.cpp ├── NWChem.cpp ├── Optimization_tools.cpp ├── Optimizers.cpp ├── PSI4.cpp ├── Path_integral.cpp ├── QSM_tools.cpp ├── Reaction_path.cpp ├── Struct_writer.cpp ├── TINK2LICHEM.cpp ├── TINKER.cpp ├── Text_format.cpp ├── Utilities.cpp ├── makefile.in ├── manual.bib ├── manual.tex ├── manual │ ├── load_balance.pdf │ └── qsm_flowchart.pdf ├── mpi │ ├── GaussianMPI.cpp │ ├── LICHEM_MPI.cpp │ ├── MPI_tools.cpp │ ├── QSM_tools_MPI.cpp │ ├── Reaction_path_MPI.cpp │ ├── Struct_writerMPI.cpp │ └── TINKERMPI.cpp └── runtests.py └── tests ├── Gau_LAMMPS ├── .goutputstream-UPRIQZ ├── freqreg.inp ├── hfreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── nebreg.inp ├── pbereg.inp ├── pchrgreg.inp ├── pm6reg.inp ├── qsmreg.inp ├── watercon.inp └── waterdimer.xyz ├── Gau_TINKER ├── alkcon.inp ├── alkyl.xyz ├── freqreg.inp ├── hfreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── mmreg.inp ├── nebreg.inp ├── pbbasis.txt ├── pbereg.inp ├── pbopt.key ├── pboptreg.inp ├── pchrg.key ├── pchrgreg.inp ├── pm6reg.inp ├── pol.key ├── polreg.inp ├── qsmreg.inp ├── solvreg.inp ├── watercon.inp └── waterdimer.xyz ├── NWChem_LAMMPS ├── freqreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── nebreg.inp ├── pbereg.inp ├── pchrgreg.inp ├── qsmreg.inp ├── watercon.inp └── waterdimer.xyz ├── NWChem_TINKER ├── .goutputstream-919NQZ ├── .goutputstream-EOCLQZ ├── alkcon.inp ├── alkyl.xyz ├── freqreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── mmreg.inp ├── nebreg.inp ├── pbbasis.txt ├── pbereg.inp ├── pbopt.key ├── pboptreg.inp ├── pchrg.key ├── pchrgreg.inp ├── pol.key ├── polreg.inp ├── qsmreg.inp ├── solvreg.inp ├── watercon.inp └── waterdimer.xyz ├── PSI4_LAMMPS ├── ccsdreg.inp ├── freqreg.inp ├── hfreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── nebreg.inp ├── pbereg.inp ├── pchrgreg.inp ├── qsmreg.inp ├── watercon.inp └── waterdimer.xyz ├── PSI4_TINKER ├── .goutputstream-9G56PZ ├── .goutputstream-I0EAQZ ├── ccsdreg.inp ├── freqreg.inp ├── hfreg.inp ├── methflbeads.xyz ├── methflcon.inp ├── methfluor.xyz ├── mmreg.inp ├── nebreg.inp ├── pbereg.inp ├── pchrg.key ├── pchrgreg.inp ├── pol.key ├── polreg.inp ├── qsmreg.inp ├── solvreg.inp ├── watercon.inp └── waterdimer.xyz ├── Parameters ├── AMOEBA14.prm ├── Alkyl.prm └── TIP3P99.prm ├── QSM_MPI ├── BASIS ├── BeadStartStruct.xyz ├── PBS_submit.bash ├── amoebapro13.prm ├── connect.inp ├── react.xyz ├── regions.inp └── tinker.key ├── README.md └── runtests /.github/workflows/c-cpp.yml: -------------------------------------------------------------------------------- 1 | name: C/C++ CI 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: configure 17 | run: ./configure 18 | - name: Install 19 | shell: bash {0} 20 | ## Do this separately so errors cause the job to fail 21 | run: | 22 | make install 23 | - name: Clean 24 | shell: bash {0} 25 | run: | 26 | make clean 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore tex build files 2 | src/manual.aux 3 | src/manual.log 4 | src/manual.out 5 | src/manual.synctex.gz 6 | src/manual.toc 7 | 8 | # Ignore PDF (might want later) 9 | src/manual.pdf 10 | 11 | # Ignore MacOS extra file 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | #Build testing for LICHEM 2 | 3 | #NB: Currently the OSX build skips the documentation 4 | 5 | #Email settings 6 | # notifications: 7 | # email: 8 | # on_success: change 9 | # on_failure: always 10 | 11 | #Compiler settings 12 | language: cpp 13 | 14 | matrix: 15 | include: 16 | 17 | # GCC Linux: works on Precise and Trusty 18 | - os: linux 19 | addons: 20 | apt: 21 | sources: 22 | - ubuntu-toolchain-r-test 23 | packages: 24 | - g++-5 25 | - texlive 26 | env: 27 | - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" 28 | 29 | # Clang Linux: works on Precise and Trusty 30 | - os: linux 31 | addons: 32 | apt: 33 | sources: 34 | - ubuntu-toolchain-r-test 35 | - llvm-toolchain-precise-3.8 36 | packages: 37 | - clang-3.8 38 | - texlive 39 | env: 40 | - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" 41 | 42 | ## OSX GCC 43 | - os: osx 44 | osx_image: xcode8 45 | env: 46 | - MATRIX_EVAL="brew install gcc5 && CC=gcc-5 && CXX=g++-5" 47 | 48 | ## OSX clang 49 | - os: osx 50 | osx_image: xcode9.4 51 | 52 | #Install required packages 53 | before_install: 54 | - if [ ${TRAVIS_OS_NAME} == linux ]; then eval "${MATRIX_EVAL}"; fi 55 | ## Remove space if Makefile has "CXX=g++" ! 56 | - if [ ${TRAVIS_OS_NAME} == linux ]; then if [ ${CXX} == clang++ ]; then sed -i 's/CXX= /CXX=clan/g' Makefile; fi; fi 57 | - if [ ${TRAVIS_OS_NAME} == linux ]; then if [ ${CC} == clang ]; then sed -i 's/CC=/CC=clan/g' Makefile; fi; fi 58 | - if [ ${TRAVIS_OS_NAME} == linux ]; then if [ ${CC} == clang ] || [ ${CXX} == clang++ ]; then sed -i 's/-fopenmp/-I\/usr\/include -fopenmp/g' Makefile; fi; fi 59 | ### OSX options 60 | - if [ ${TRAVIS_OS_NAME} == osx ]; then brew update; fi 61 | - if [ ${TRAVIS_OS_NAME} == osx ]; then if [ ${CXX} == clang++ ]; then sed -i "" 's/CXX= /CXX=clan/g' Makefile; fi; fi 62 | - if [ ${TRAVIS_OS_NAME} == osx ]; then if [ ${CC} == clang ]; then sed -i "" 's/CC=/CC=clan/g' Makefile; fi; fi 63 | - if [ ${TRAVIS_OS_NAME} == osx ]; then sed -i "" 's/-static//g' Makefile; fi 64 | - if [ ${TRAVIS_OS_NAME} == osx ]; then sed -i "" 's/-fopenmp//g' Makefile; fi 65 | - if [ ${TRAVIS_OS_NAME} == osx ]; then sed -i "" 's/SEDI=-i/SEDI=-i \"\"/g' Makefile; fi 66 | 67 | script: 68 | - if [ ${TRAVIS_OS_NAME} == linux ]; then sudo ldconfig; fi 69 | - make install && make clean 70 | - if [ ${TRAVIS_OS_NAME} == linux ]; then apt-get moo; fi 71 | -------------------------------------------------------------------------------- /Eigen3/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/Eigen3/.DS_Store -------------------------------------------------------------------------------- /Eigen3/BSD_LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ -------------------------------------------------------------------------------- /Eigen3/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h") 20 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_CHOLESKY_MODULE_H 9 | #define EIGEN_CHOLESKY_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Cholesky_Module Cholesky module 16 | * 17 | * 18 | * 19 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 20 | * Those decompositions are also accessible via the following methods: 21 | * - MatrixBase::llt() 22 | * - MatrixBase::ldlt() 23 | * - SelfAdjointView::llt() 24 | * - SelfAdjointView::ldlt() 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | */ 30 | 31 | #include "src/Cholesky/LLT.h" 32 | #include "src/Cholesky/LDLT.h" 33 | #ifdef EIGEN_USE_LAPACKE 34 | #include "src/misc/lapacke.h" 35 | #include "src/Cholesky/LLT_LAPACKE.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_CHOLESKY_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /Eigen3/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 9 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | /** \ingroup Support_modules 20 | * \defgroup CholmodSupport_Module CholmodSupport module 21 | * 22 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 23 | * It provides the two following main factorization classes: 24 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 25 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 26 | * 27 | * For the sake of completeness, this module also propose the two following classes: 28 | * - class CholmodSimplicialLLT 29 | * - class CholmodSimplicialLDLT 30 | * Note that these classes does not bring any particular advantage compared to the built-in 31 | * SimplicialLLT and SimplicialLDLT factorization classes. 32 | * 33 | * \code 34 | * #include 35 | * \endcode 36 | * 37 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. 38 | * The dependencies depend on how cholmod has been compiled. 39 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 40 | * 41 | */ 42 | 43 | #include "src/CholmodSupport/CholmodSupport.h" 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 48 | 49 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | #include "Sparse" 3 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_EIGENVALUES_MODULE_H 9 | #define EIGEN_EIGENVALUES_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Cholesky" 16 | #include "Jacobi" 17 | #include "Householder" 18 | #include "LU" 19 | #include "Geometry" 20 | 21 | /** \defgroup Eigenvalues_Module Eigenvalues module 22 | * 23 | * 24 | * 25 | * This module mainly provides various eigenvalue solvers. 26 | * This module also provides some MatrixBase methods, including: 27 | * - MatrixBase::eigenvalues(), 28 | * - MatrixBase::operatorNorm() 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | #include "src/misc/RealSvd2x2.h" 36 | #include "src/Eigenvalues/Tridiagonalization.h" 37 | #include "src/Eigenvalues/RealSchur.h" 38 | #include "src/Eigenvalues/EigenSolver.h" 39 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 40 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 41 | #include "src/Eigenvalues/HessenbergDecomposition.h" 42 | #include "src/Eigenvalues/ComplexSchur.h" 43 | #include "src/Eigenvalues/ComplexEigenSolver.h" 44 | #include "src/Eigenvalues/RealQZ.h" 45 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 46 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 47 | #ifdef EIGEN_USE_LAPACKE 48 | #include "src/misc/lapacke.h" 49 | #include "src/Eigenvalues/RealSchur_LAPACKE.h" 50 | #include "src/Eigenvalues/ComplexSchur_LAPACKE.h" 51 | #include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h" 52 | #endif 53 | 54 | #include "src/Core/util/ReenableStupidWarnings.h" 55 | 56 | #endif // EIGEN_EIGENVALUES_MODULE_H 57 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 58 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_GEOMETRY_MODULE_H 9 | #define EIGEN_GEOMETRY_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "SVD" 16 | #include "LU" 17 | #include 18 | 19 | /** \defgroup Geometry_Module Geometry module 20 | * 21 | * This module provides support for: 22 | * - fixed-size homogeneous transformations 23 | * - translation, scaling, 2D and 3D rotations 24 | * - \link Quaternion quaternions \endlink 25 | * - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3) 26 | * - orthognal vector generation (\ref MatrixBase::unitOrthogonal) 27 | * - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink 28 | * - \link AlignedBox axis aligned bounding boxes \endlink 29 | * - \link umeyama least-square transformation fitting \endlink 30 | * 31 | * \code 32 | * #include 33 | * \endcode 34 | */ 35 | 36 | #include "src/Geometry/OrthoMethods.h" 37 | #include "src/Geometry/EulerAngles.h" 38 | 39 | #include "src/Geometry/Homogeneous.h" 40 | #include "src/Geometry/RotationBase.h" 41 | #include "src/Geometry/Rotation2D.h" 42 | #include "src/Geometry/Quaternion.h" 43 | #include "src/Geometry/AngleAxis.h" 44 | #include "src/Geometry/Transform.h" 45 | #include "src/Geometry/Translation.h" 46 | #include "src/Geometry/Scaling.h" 47 | #include "src/Geometry/Hyperplane.h" 48 | #include "src/Geometry/ParametrizedLine.h" 49 | #include "src/Geometry/AlignedBox.h" 50 | #include "src/Geometry/Umeyama.h" 51 | 52 | // Use the SSE optimized version whenever possible. At the moment the 53 | // SSE version doesn't compile when AVX is enabled 54 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX 55 | #include "src/Geometry/arch/Geometry_SSE.h" 56 | #endif 57 | 58 | #include "src/Core/util/ReenableStupidWarnings.h" 59 | 60 | #endif // EIGEN_GEOMETRY_MODULE_H 61 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 62 | 63 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Householder: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 9 | #define EIGEN_HOUSEHOLDER_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Householder_Module Householder module 16 | * This module provides Householder transformations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/Householder/Householder.h" 24 | #include "src/Householder/HouseholderSequence.h" 25 | #include "src/Householder/BlockHouseholder.h" 26 | 27 | #include "src/Core/util/ReenableStupidWarnings.h" 28 | 29 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 30 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 31 | -------------------------------------------------------------------------------- /Eigen3/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 9 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 10 | 11 | #include "SparseCore" 12 | #include "OrderingMethods" 13 | 14 | #include "src/Core/util/DisableStupidWarnings.h" 15 | 16 | /** 17 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 18 | * 19 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 20 | * Those solvers are accessible via the following classes: 21 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 22 | * - LeastSquaresConjugateGradient for rectangular least-square problems, 23 | * - BiCGSTAB for general square matrices. 24 | * 25 | * These iterative solvers are associated with some preconditioners: 26 | * - IdentityPreconditioner - not really useful 27 | * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices. 28 | * - IncompleteLUT - incomplete LU factorization with dual thresholding 29 | * 30 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 31 | * 32 | \code 33 | #include 34 | \endcode 35 | */ 36 | 37 | #include "src/IterativeLinearSolvers/SolveWithGuess.h" 38 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 39 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 40 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 41 | #include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h" 42 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 43 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 44 | #include "src/IterativeLinearSolvers/IncompleteCholesky.h" 45 | 46 | #include "src/Core/util/ReenableStupidWarnings.h" 47 | 48 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 49 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_JACOBI_MODULE_H 9 | #define EIGEN_JACOBI_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Jacobi_Module Jacobi module 16 | * This module provides Jacobi and Givens rotations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | * 22 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 23 | * - MatrixBase::applyOnTheLeft() 24 | * - MatrixBase::applyOnTheRight(). 25 | */ 26 | 27 | #include "src/Jacobi/Jacobi.h" 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_JACOBI_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | 34 | -------------------------------------------------------------------------------- /Eigen3/Eigen/LU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_LU_MODULE_H 9 | #define EIGEN_LU_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup LU_Module LU module 16 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 17 | * This module defines the following MatrixBase methods: 18 | * - MatrixBase::inverse() 19 | * - MatrixBase::determinant() 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/misc/Kernel.h" 27 | #include "src/misc/Image.h" 28 | #include "src/LU/FullPivLU.h" 29 | #include "src/LU/PartialPivLU.h" 30 | #ifdef EIGEN_USE_LAPACKE 31 | #include "src/misc/lapacke.h" 32 | #include "src/LU/PartialPivLU_LAPACKE.h" 33 | #endif 34 | #include "src/LU/Determinant.h" 35 | #include "src/LU/InverseImpl.h" 36 | 37 | // Use the SSE optimized version whenever possible. At the moment the 38 | // SSE version doesn't compile when AVX is enabled 39 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX 40 | #include "src/LU/arch/Inverse_SSE.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_LU_MODULE_H 46 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 47 | -------------------------------------------------------------------------------- /Eigen3/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_METISSUPPORT_MODULE_H 9 | #define EIGEN_METISSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | 20 | /** \ingroup Support_modules 21 | * \defgroup MetisSupport_Module MetisSupport module 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 27 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 28 | */ 29 | 30 | 31 | #include "src/MetisSupport/MetisSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_METISSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /Eigen3/Eigen/OrderingMethods: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_ORDERINGMETHODS_MODULE_H 9 | #define EIGEN_ORDERINGMETHODS_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** 16 | * \defgroup OrderingMethods_Module OrderingMethods module 17 | * 18 | * This module is currently for internal use only 19 | * 20 | * It defines various built-in and external ordering methods for sparse matrices. 21 | * They are typically used to reduce the number of elements during 22 | * the sparse matrix decomposition (LLT, LU, QR). 23 | * Precisely, in a preprocessing step, a permutation matrix P is computed using 24 | * those ordering methods and applied to the columns of the matrix. 25 | * Using for instance the sparse Cholesky decomposition, it is expected that 26 | * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). 27 | * 28 | * 29 | * Usage : 30 | * \code 31 | * #include 32 | * \endcode 33 | * 34 | * A simple usage is as a template parameter in the sparse decomposition classes : 35 | * 36 | * \code 37 | * SparseLU > solver; 38 | * \endcode 39 | * 40 | * \code 41 | * SparseQR > solver; 42 | * \endcode 43 | * 44 | * It is possible as well to call directly a particular ordering method for your own purpose, 45 | * \code 46 | * AMDOrdering ordering; 47 | * PermutationMatrix perm; 48 | * SparseMatrix A; 49 | * //Fill the matrix ... 50 | * 51 | * ordering(A, perm); // Call AMD 52 | * \endcode 53 | * 54 | * \note Some of these methods (like AMD or METIS), need the sparsity pattern 55 | * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, 56 | * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. 57 | * If your matrix is already symmetric (at leat in structure), you can avoid that 58 | * by calling the method with a SelfAdjointView type. 59 | * 60 | * \code 61 | * // Call the ordering on the pattern of the lower triangular matrix A 62 | * ordering(A.selfadjointView(), perm); 63 | * \endcode 64 | */ 65 | 66 | #ifndef EIGEN_MPL2_ONLY 67 | #include "src/OrderingMethods/Amd.h" 68 | #endif 69 | 70 | #include "src/OrderingMethods/Ordering.h" 71 | #include "src/Core/util/ReenableStupidWarnings.h" 72 | 73 | #endif // EIGEN_ORDERINGMETHODS_MODULE_H 74 | -------------------------------------------------------------------------------- /Eigen3/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 9 | #define EIGEN_PASTIXSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | #include 18 | } 19 | 20 | #ifdef complex 21 | #undef complex 22 | #endif 23 | 24 | /** \ingroup Support_modules 25 | * \defgroup PaStiXSupport_Module PaStiXSupport module 26 | * 27 | * This module provides an interface to the PaSTiX library. 28 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 29 | * It provides the two following main factorization classes: 30 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 31 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 32 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 33 | * 34 | * \code 35 | * #include 36 | * \endcode 37 | * 38 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 39 | * The dependencies depend on how PaSTiX has been compiled. 40 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 41 | * 42 | */ 43 | 44 | #include "src/PaStiXSupport/PaStiXSupport.h" 45 | 46 | #include "src/Core/util/ReenableStupidWarnings.h" 47 | 48 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 49 | -------------------------------------------------------------------------------- /Eigen3/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 9 | #define EIGEN_PARDISOSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup PardisoSupport_Module PardisoSupport module 19 | * 20 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 27 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 28 | * 29 | */ 30 | 31 | #include "src/PardisoSupport/PardisoSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /Eigen3/Eigen/QR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QR_MODULE_H 9 | #define EIGEN_QR_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Cholesky" 16 | #include "Jacobi" 17 | #include "Householder" 18 | 19 | /** \defgroup QR_Module QR module 20 | * 21 | * 22 | * 23 | * This module provides various QR decompositions 24 | * This module also provides some MatrixBase methods, including: 25 | * - MatrixBase::householderQr() 26 | * - MatrixBase::colPivHouseholderQr() 27 | * - MatrixBase::fullPivHouseholderQr() 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | */ 33 | 34 | #include "src/QR/HouseholderQR.h" 35 | #include "src/QR/FullPivHouseholderQR.h" 36 | #include "src/QR/ColPivHouseholderQR.h" 37 | #include "src/QR/CompleteOrthogonalDecomposition.h" 38 | #ifdef EIGEN_USE_LAPACKE 39 | #include "src/misc/lapacke.h" 40 | #include "src/QR/HouseholderQR_LAPACKE.h" 41 | #include "src/QR/ColPivHouseholderQR_LAPACKE.h" 42 | #endif 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_QR_MODULE_H 47 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 48 | -------------------------------------------------------------------------------- /Eigen3/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QTMALLOC_MODULE_H 9 | #define EIGEN_QTMALLOC_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 14 | 15 | #include "src/Core/util/DisableStupidWarnings.h" 16 | 17 | void *qMalloc(size_t size) 18 | { 19 | return Eigen::internal::aligned_malloc(size); 20 | } 21 | 22 | void qFree(void *ptr) 23 | { 24 | Eigen::internal::aligned_free(ptr); 25 | } 26 | 27 | void *qRealloc(void *ptr, size_t size) 28 | { 29 | void* newPtr = Eigen::internal::aligned_malloc(size); 30 | memcpy(newPtr, ptr, size); 31 | Eigen::internal::aligned_free(ptr); 32 | return newPtr; 33 | } 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | 39 | #endif // EIGEN_QTMALLOC_MODULE_H 40 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 41 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 9 | #define EIGEN_SPQRSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "SuiteSparseQR.hpp" 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup SPQRSupport_Module SuiteSparseQR module 19 | * 20 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 27 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 28 | * 29 | */ 30 | 31 | #include "src/CholmodSupport/CholmodSupport.h" 32 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SVD: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SVD_MODULE_H 9 | #define EIGEN_SVD_MODULE_H 10 | 11 | #include "QR" 12 | #include "Householder" 13 | #include "Jacobi" 14 | 15 | #include "src/Core/util/DisableStupidWarnings.h" 16 | 17 | /** \defgroup SVD_Module SVD module 18 | * 19 | * 20 | * 21 | * This module provides SVD decomposition for matrices (both real and complex). 22 | * Two decomposition algorithms are provided: 23 | * - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones. 24 | * - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems. 25 | * These decompositions are accessible via the respective classes and following MatrixBase methods: 26 | * - MatrixBase::jacobiSvd() 27 | * - MatrixBase::bdcSvd() 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | */ 33 | 34 | #include "src/misc/RealSvd2x2.h" 35 | #include "src/SVD/UpperBidiagonalization.h" 36 | #include "src/SVD/SVDBase.h" 37 | #include "src/SVD/JacobiSVD.h" 38 | #include "src/SVD/BDCSVD.h" 39 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 40 | #include "src/misc/lapacke.h" 41 | #include "src/SVD/JacobiSVD_LAPACKE.h" 42 | #endif 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_SVD_MODULE_H 47 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 48 | -------------------------------------------------------------------------------- /Eigen3/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSE_MODULE_H 9 | #define EIGEN_SPARSE_MODULE_H 10 | 11 | /** \defgroup Sparse_Module Sparse meta-module 12 | * 13 | * Meta-module including all related modules: 14 | * - \ref SparseCore_Module 15 | * - \ref OrderingMethods_Module 16 | * - \ref SparseCholesky_Module 17 | * - \ref SparseLU_Module 18 | * - \ref SparseQR_Module 19 | * - \ref IterativeLinearSolvers_Module 20 | * 21 | \code 22 | #include 23 | \endcode 24 | */ 25 | 26 | #include "SparseCore" 27 | #include "OrderingMethods" 28 | #include "SparseCholesky" 29 | #include "SparseLU" 30 | #include "SparseQR" 31 | #include "IterativeLinearSolvers" 32 | 33 | #endif // EIGEN_SPARSE_MODULE_H 34 | 35 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/SparseCholesky/SimplicialCholesky.h" 38 | 39 | #ifndef EIGEN_MPL2_ONLY 40 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 46 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SparseCore: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSECORE_MODULE_H 9 | #define EIGEN_SPARSECORE_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | /** 22 | * \defgroup SparseCore_Module SparseCore module 23 | * 24 | * This module provides a sparse matrix representation, and basic associated matrix manipulations 25 | * and operations. 26 | * 27 | * See the \ref TutorialSparse "Sparse tutorial" 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | * 33 | * This module depends on: Core. 34 | */ 35 | 36 | #include "src/SparseCore/SparseUtil.h" 37 | #include "src/SparseCore/SparseMatrixBase.h" 38 | #include "src/SparseCore/SparseAssign.h" 39 | #include "src/SparseCore/CompressedStorage.h" 40 | #include "src/SparseCore/AmbiVector.h" 41 | #include "src/SparseCore/SparseCompressedBase.h" 42 | #include "src/SparseCore/SparseMatrix.h" 43 | #include "src/SparseCore/SparseMap.h" 44 | #include "src/SparseCore/MappedSparseMatrix.h" 45 | #include "src/SparseCore/SparseVector.h" 46 | #include "src/SparseCore/SparseRef.h" 47 | #include "src/SparseCore/SparseCwiseUnaryOp.h" 48 | #include "src/SparseCore/SparseCwiseBinaryOp.h" 49 | #include "src/SparseCore/SparseTranspose.h" 50 | #include "src/SparseCore/SparseBlock.h" 51 | #include "src/SparseCore/SparseDot.h" 52 | #include "src/SparseCore/SparseRedux.h" 53 | #include "src/SparseCore/SparseView.h" 54 | #include "src/SparseCore/SparseDiagonalProduct.h" 55 | #include "src/SparseCore/ConservativeSparseSparseProduct.h" 56 | #include "src/SparseCore/SparseSparseProductWithPruning.h" 57 | #include "src/SparseCore/SparseProduct.h" 58 | #include "src/SparseCore/SparseDenseProduct.h" 59 | #include "src/SparseCore/SparseSelfAdjointView.h" 60 | #include "src/SparseCore/SparseTriangularView.h" 61 | #include "src/SparseCore/TriangularSolver.h" 62 | #include "src/SparseCore/SparsePermutation.h" 63 | #include "src/SparseCore/SparseFuzzy.h" 64 | #include "src/SparseCore/SparseSolverBase.h" 65 | 66 | #include "src/Core/util/ReenableStupidWarnings.h" 67 | 68 | #endif // EIGEN_SPARSECORE_MODULE_H 69 | 70 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | // Ordering interface 24 | #include "OrderingMethods" 25 | 26 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 27 | 28 | #include "src/SparseLU/SparseLU_Structs.h" 29 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 30 | #include "src/SparseLU/SparseLUImpl.h" 31 | #include "src/SparseCore/SparseColEtree.h" 32 | #include "src/SparseLU/SparseLU_Memory.h" 33 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 34 | #include "src/SparseLU/SparseLU_relax_snode.h" 35 | #include "src/SparseLU/SparseLU_pivotL.h" 36 | #include "src/SparseLU/SparseLU_panel_dfs.h" 37 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 38 | #include "src/SparseLU/SparseLU_panel_bmod.h" 39 | #include "src/SparseLU/SparseLU_column_dfs.h" 40 | #include "src/SparseLU/SparseLU_column_bmod.h" 41 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 42 | #include "src/SparseLU/SparseLU_pruneL.h" 43 | #include "src/SparseLU/SparseLU_Utils.h" 44 | #include "src/SparseLU/SparseLU.h" 45 | 46 | #endif // EIGEN_SPARSELU_MODULE_H 47 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSEQR_MODULE_H 9 | #define EIGEN_SPARSEQR_MODULE_H 10 | 11 | #include "SparseCore" 12 | #include "OrderingMethods" 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup SparseQR_Module SparseQR module 16 | * \brief Provides QR decomposition for sparse matrices 17 | * 18 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 19 | * The columns of the input matrix should be reordered to limit the fill-in during the 20 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 21 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 22 | * of built-in and external ordering methods. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | * 28 | * 29 | */ 30 | 31 | #include "OrderingMethods" 32 | #include "src/SparseCore/SparseColEtree.h" 33 | #include "src/SparseQR/SparseQR.h" 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Eigen3/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /Eigen3/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /Eigen3/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /Eigen3/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 9 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #ifdef EMPTY 16 | #define EIGEN_EMPTY_WAS_ALREADY_DEFINED 17 | #endif 18 | 19 | typedef int int_t; 20 | #include 21 | #include 22 | #include 23 | 24 | // slu_util.h defines a preprocessor token named EMPTY which is really polluting, 25 | // so we remove it in favor of a SUPERLU_EMPTY token. 26 | // If EMPTY was already defined then we don't undef it. 27 | 28 | #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) 29 | # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED 30 | #elif defined(EMPTY) 31 | # undef EMPTY 32 | #endif 33 | 34 | #define SUPERLU_EMPTY (-1) 35 | 36 | namespace Eigen { struct SluMatrix; } 37 | 38 | /** \ingroup Support_modules 39 | * \defgroup SuperLUSupport_Module SuperLUSupport module 40 | * 41 | * This module provides an interface to the SuperLU library. 42 | * It provides the following factorization class: 43 | * - class SuperLU: a supernodal sequential LU factorization. 44 | * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). 45 | * 46 | * \warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported. 47 | * 48 | * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. 49 | * 50 | * \code 51 | * #include 52 | * \endcode 53 | * 54 | * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. 55 | * The dependencies depend on how superlu has been compiled. 56 | * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 57 | * 58 | */ 59 | 60 | #include "src/SuperLUSupport/SuperLUSupport.h" 61 | 62 | #include "src/Core/util/ReenableStupidWarnings.h" 63 | 64 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 65 | -------------------------------------------------------------------------------- /Eigen3/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 9 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | /** \ingroup Support_modules 20 | * \defgroup UmfPackSupport_Module UmfPackSupport module 21 | * 22 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 23 | * It provides the following factorization class: 24 | * - class UmfPackLU: a multifrontal sequential LU factorization. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 31 | * The dependencies depend on how umfpack has been compiled. 32 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/UmfPackSupport/UmfPackSupport.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 41 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/Assign.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2007 Michael Olbrich 5 | // Copyright (C) 2006-2010 Benoit Jacob 6 | // Copyright (C) 2008 Gael Guennebaud 7 | // 8 | // This Source Code Form is subject to the terms of the Mozilla 9 | // Public License v. 2.0. If a copy of the MPL was not distributed 10 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | 12 | #ifndef EIGEN_ASSIGN_H 13 | #define EIGEN_ASSIGN_H 14 | 15 | namespace Eigen { 16 | 17 | template 18 | template 19 | EIGEN_STRONG_INLINE Derived& DenseBase 20 | ::lazyAssign(const DenseBase& other) 21 | { 22 | enum{ 23 | SameType = internal::is_same::value 24 | }; 25 | 26 | EIGEN_STATIC_ASSERT_LVALUE(Derived) 27 | EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived) 28 | EIGEN_STATIC_ASSERT(SameType,YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 29 | 30 | eigen_assert(rows() == other.rows() && cols() == other.cols()); 31 | internal::call_assignment_no_alias(derived(),other.derived()); 32 | 33 | return derived(); 34 | } 35 | 36 | template 37 | template 38 | EIGEN_DEVICE_FUNC 39 | EIGEN_STRONG_INLINE Derived& DenseBase::operator=(const DenseBase& other) 40 | { 41 | internal::call_assignment(derived(), other.derived()); 42 | return derived(); 43 | } 44 | 45 | template 46 | EIGEN_DEVICE_FUNC 47 | EIGEN_STRONG_INLINE Derived& DenseBase::operator=(const DenseBase& other) 48 | { 49 | internal::call_assignment(derived(), other.derived()); 50 | return derived(); 51 | } 52 | 53 | template 54 | EIGEN_DEVICE_FUNC 55 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const MatrixBase& other) 56 | { 57 | internal::call_assignment(derived(), other.derived()); 58 | return derived(); 59 | } 60 | 61 | template 62 | template 63 | EIGEN_DEVICE_FUNC 64 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const DenseBase& other) 65 | { 66 | internal::call_assignment(derived(), other.derived()); 67 | return derived(); 68 | } 69 | 70 | template 71 | template 72 | EIGEN_DEVICE_FUNC 73 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const EigenBase& other) 74 | { 75 | internal::call_assignment(derived(), other.derived()); 76 | return derived(); 77 | } 78 | 79 | template 80 | template 81 | EIGEN_DEVICE_FUNC 82 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const ReturnByValue& other) 83 | { 84 | other.derived().evalTo(derived()); 85 | return derived(); 86 | } 87 | 88 | } // end namespace Eigen 89 | 90 | #endif // EIGEN_ASSIGN_H 91 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/DiagonalProduct.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2007-2009 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_DIAGONALPRODUCT_H 12 | #define EIGEN_DIAGONALPRODUCT_H 13 | 14 | namespace Eigen { 15 | 16 | /** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal. 17 | */ 18 | template 19 | template 20 | inline const Product 21 | MatrixBase::operator*(const DiagonalBase &a_diagonal) const 22 | { 23 | return Product(derived(),a_diagonal.derived()); 24 | } 25 | 26 | } // end namespace Eigen 27 | 28 | #endif // EIGEN_DIAGONALPRODUCT_H 29 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/MathFunctionsImpl.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com) 5 | // Copyright (C) 2016 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_MATHFUNCTIONSIMPL_H 12 | #define EIGEN_MATHFUNCTIONSIMPL_H 13 | 14 | namespace Eigen { 15 | 16 | namespace internal { 17 | 18 | /** \internal \returns the hyperbolic tan of \a a (coeff-wise) 19 | Doesn't do anything fancy, just a 13/6-degree rational interpolant which 20 | is accurate up to a couple of ulp in the range [-9, 9], outside of which 21 | the tanh(x) = +/-1. 22 | 23 | This implementation works on both scalars and packets. 24 | */ 25 | template 26 | T generic_fast_tanh_float(const T& a_x) 27 | { 28 | // Clamp the inputs to the range [-9, 9] since anything outside 29 | // this range is +/-1.0f in single-precision. 30 | const T plus_9 = pset1(9.f); 31 | const T minus_9 = pset1(-9.f); 32 | // NOTE GCC prior to 6.3 might improperly optimize this max/min 33 | // step such that if a_x is nan, x will be either 9 or -9, 34 | // and tanh will return 1 or -1 instead of nan. 35 | // This is supposed to be fixed in gcc6.3, 36 | // see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867 37 | const T x = pmax(minus_9,pmin(plus_9,a_x)); 38 | // The monomial coefficients of the numerator polynomial (odd). 39 | const T alpha_1 = pset1(4.89352455891786e-03f); 40 | const T alpha_3 = pset1(6.37261928875436e-04f); 41 | const T alpha_5 = pset1(1.48572235717979e-05f); 42 | const T alpha_7 = pset1(5.12229709037114e-08f); 43 | const T alpha_9 = pset1(-8.60467152213735e-11f); 44 | const T alpha_11 = pset1(2.00018790482477e-13f); 45 | const T alpha_13 = pset1(-2.76076847742355e-16f); 46 | 47 | // The monomial coefficients of the denominator polynomial (even). 48 | const T beta_0 = pset1(4.89352518554385e-03f); 49 | const T beta_2 = pset1(2.26843463243900e-03f); 50 | const T beta_4 = pset1(1.18534705686654e-04f); 51 | const T beta_6 = pset1(1.19825839466702e-06f); 52 | 53 | // Since the polynomials are odd/even, we need x^2. 54 | const T x2 = pmul(x, x); 55 | 56 | // Evaluate the numerator polynomial p. 57 | T p = pmadd(x2, alpha_13, alpha_11); 58 | p = pmadd(x2, p, alpha_9); 59 | p = pmadd(x2, p, alpha_7); 60 | p = pmadd(x2, p, alpha_5); 61 | p = pmadd(x2, p, alpha_3); 62 | p = pmadd(x2, p, alpha_1); 63 | p = pmul(x, p); 64 | 65 | // Evaluate the denominator polynomial p. 66 | T q = pmadd(x2, beta_6, beta_4); 67 | q = pmadd(x2, q, beta_2); 68 | q = pmadd(x2, q, beta_0); 69 | 70 | // Divide the numerator by the denominator. 71 | return pdiv(p, q); 72 | } 73 | 74 | } // end namespace internal 75 | 76 | } // end namespace Eigen 77 | 78 | #endif // EIGEN_MATHFUNCTIONSIMPL_H 79 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SELFCWISEBINARYOP_H 11 | #define EIGEN_SELFCWISEBINARYOP_H 12 | 13 | namespace Eigen { 14 | 15 | // TODO generalize the scalar type of 'other' 16 | 17 | template 18 | EIGEN_STRONG_INLINE Derived& DenseBase::operator*=(const Scalar& other) 19 | { 20 | typedef typename Derived::PlainObject PlainObject; 21 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op()); 22 | return derived(); 23 | } 24 | 25 | template 26 | EIGEN_STRONG_INLINE Derived& ArrayBase::operator+=(const Scalar& other) 27 | { 28 | typedef typename Derived::PlainObject PlainObject; 29 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op()); 30 | return derived(); 31 | } 32 | 33 | template 34 | EIGEN_STRONG_INLINE Derived& ArrayBase::operator-=(const Scalar& other) 35 | { 36 | typedef typename Derived::PlainObject PlainObject; 37 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op()); 38 | return derived(); 39 | } 40 | 41 | template 42 | EIGEN_STRONG_INLINE Derived& DenseBase::operator/=(const Scalar& other) 43 | { 44 | typedef typename Derived::PlainObject PlainObject; 45 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op()); 46 | return derived(); 47 | } 48 | 49 | } // end namespace Eigen 50 | 51 | #endif // EIGEN_SELFCWISEBINARYOP_H 52 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/Swap.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2006-2008 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SWAP_H 11 | #define EIGEN_SWAP_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // Overload default assignPacket behavior for swapping them 18 | template 19 | class generic_dense_assignment_kernel, Specialized> 20 | : public generic_dense_assignment_kernel, BuiltIn> 21 | { 22 | protected: 23 | typedef generic_dense_assignment_kernel, BuiltIn> Base; 24 | using Base::m_dst; 25 | using Base::m_src; 26 | using Base::m_functor; 27 | 28 | public: 29 | typedef typename Base::Scalar Scalar; 30 | typedef typename Base::DstXprType DstXprType; 31 | typedef swap_assign_op Functor; 32 | 33 | EIGEN_DEVICE_FUNC generic_dense_assignment_kernel(DstEvaluatorTypeT &dst, const SrcEvaluatorTypeT &src, const Functor &func, DstXprType& dstExpr) 34 | : Base(dst, src, func, dstExpr) 35 | {} 36 | 37 | template 38 | void assignPacket(Index row, Index col) 39 | { 40 | PacketType tmp = m_src.template packet(row,col); 41 | const_cast(m_src).template writePacket(row,col, m_dst.template packet(row,col)); 42 | m_dst.template writePacket(row,col,tmp); 43 | } 44 | 45 | template 46 | void assignPacket(Index index) 47 | { 48 | PacketType tmp = m_src.template packet(index); 49 | const_cast(m_src).template writePacket(index, m_dst.template packet(index)); 50 | m_dst.template writePacket(index,tmp); 51 | } 52 | 53 | // TODO find a simple way not to have to copy/paste this function from generic_dense_assignment_kernel, by simple I mean no CRTP (Gael) 54 | template 55 | void assignPacketByOuterInner(Index outer, Index inner) 56 | { 57 | Index row = Base::rowIndexByOuterInner(outer, inner); 58 | Index col = Base::colIndexByOuterInner(outer, inner); 59 | assignPacket(row, col); 60 | } 61 | }; 62 | 63 | } // namespace internal 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN_SWAP_H 68 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/VectorBlock.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_VECTORBLOCK_H 12 | #define EIGEN_VECTORBLOCK_H 13 | 14 | namespace Eigen { 15 | 16 | namespace internal { 17 | template 18 | struct traits > 19 | : public traits::Flags & RowMajorBit ? 1 : Size, 21 | traits::Flags & RowMajorBit ? Size : 1> > 22 | { 23 | }; 24 | } 25 | 26 | /** \class VectorBlock 27 | * \ingroup Core_Module 28 | * 29 | * \brief Expression of a fixed-size or dynamic-size sub-vector 30 | * 31 | * \tparam VectorType the type of the object in which we are taking a sub-vector 32 | * \tparam Size size of the sub-vector we are taking at compile time (optional) 33 | * 34 | * This class represents an expression of either a fixed-size or dynamic-size sub-vector. 35 | * It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment(Index) and 36 | * most of the time this is the only way it is used. 37 | * 38 | * However, if you want to directly maniputate sub-vector expressions, 39 | * for instance if you want to write a function returning such an expression, you 40 | * will need to use this class. 41 | * 42 | * Here is an example illustrating the dynamic case: 43 | * \include class_VectorBlock.cpp 44 | * Output: \verbinclude class_VectorBlock.out 45 | * 46 | * \note Even though this expression has dynamic size, in the case where \a VectorType 47 | * has fixed size, this expression inherits a fixed maximal size which means that evaluating 48 | * it does not cause a dynamic memory allocation. 49 | * 50 | * Here is an example illustrating the fixed-size case: 51 | * \include class_FixedVectorBlock.cpp 52 | * Output: \verbinclude class_FixedVectorBlock.out 53 | * 54 | * \sa class Block, DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index) 55 | */ 56 | template class VectorBlock 57 | : public Block::Flags & RowMajorBit ? 1 : Size, 59 | internal::traits::Flags & RowMajorBit ? Size : 1> 60 | { 61 | typedef Block::Flags & RowMajorBit ? 1 : Size, 63 | internal::traits::Flags & RowMajorBit ? Size : 1> Base; 64 | enum { 65 | IsColVector = !(internal::traits::Flags & RowMajorBit) 66 | }; 67 | public: 68 | EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock) 69 | 70 | using Base::operator=; 71 | 72 | /** Dynamic-size constructor 73 | */ 74 | EIGEN_DEVICE_FUNC 75 | inline VectorBlock(VectorType& vector, Index start, Index size) 76 | : Base(vector, 77 | IsColVector ? start : 0, IsColVector ? 0 : start, 78 | IsColVector ? size : 1, IsColVector ? 1 : size) 79 | { 80 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock); 81 | } 82 | 83 | /** Fixed-size constructor 84 | */ 85 | EIGEN_DEVICE_FUNC 86 | inline VectorBlock(VectorType& vector, Index start) 87 | : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start) 88 | { 89 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock); 90 | } 91 | }; 92 | 93 | 94 | } // end namespace Eigen 95 | 96 | #endif // EIGEN_VECTORBLOCK_H 97 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2015 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TYPE_CASTING_AVX_H 11 | #define EIGEN_TYPE_CASTING_AVX_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // For now we use SSE to handle integers, so we can't use AVX instructions to cast 18 | // from int to float 19 | template <> 20 | struct type_casting_traits { 21 | enum { 22 | VectorizedCast = 0, 23 | SrcCoeffRatio = 1, 24 | TgtCoeffRatio = 1 25 | }; 26 | }; 27 | 28 | template <> 29 | struct type_casting_traits { 30 | enum { 31 | VectorizedCast = 0, 32 | SrcCoeffRatio = 1, 33 | TgtCoeffRatio = 1 34 | }; 35 | }; 36 | 37 | 38 | 39 | template<> EIGEN_STRONG_INLINE Packet8i pcast(const Packet8f& a) { 40 | return _mm256_cvtps_epi32(a); 41 | } 42 | 43 | template<> EIGEN_STRONG_INLINE Packet8f pcast(const Packet8i& a) { 44 | return _mm256_cvtepi32_ps(a); 45 | } 46 | 47 | } // end namespace internal 48 | 49 | } // end namespace Eigen 50 | 51 | #endif // EIGEN_TYPE_CASTING_AVX_H 52 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/CUDA/Complex.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2014 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_COMPLEX_CUDA_H 11 | #define EIGEN_COMPLEX_CUDA_H 12 | 13 | // clang-format off 14 | 15 | namespace Eigen { 16 | 17 | namespace internal { 18 | 19 | #if defined(__CUDACC__) && defined(EIGEN_USE_GPU) 20 | 21 | // Many std::complex methods such as operator+, operator-, operator* and 22 | // operator/ are not constexpr. Due to this, clang does not treat them as device 23 | // functions and thus Eigen functors making use of these operators fail to 24 | // compile. Here, we manually specialize these functors for complex types when 25 | // building for CUDA to avoid non-constexpr methods. 26 | 27 | template struct scalar_sum_op> { 28 | typedef typename std::complex result_type; 29 | 30 | EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op) 31 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex operator() (const std::complex& a, const std::complex& b) const { 32 | return std::complex(numext::real(a) + numext::real(b), 33 | numext::imag(a) + numext::imag(b)); 34 | } 35 | }; 36 | 37 | template struct scalar_difference_op> { 38 | typedef typename std::complex result_type; 39 | 40 | EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op) 41 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex operator() (const std::complex& a, const std::complex& b) const { 42 | return std::complex(numext::real(a) - numext::real(b), 43 | numext::imag(a) - numext::imag(b)); 44 | } 45 | }; 46 | 47 | template struct scalar_product_op, std::complex> { 48 | enum { 49 | Vectorizable = packet_traits>::HasMul 50 | }; 51 | typedef typename std::complex result_type; 52 | 53 | EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op) 54 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex operator() (const std::complex& a, const std::complex& b) const { 55 | const T a_real = numext::real(a); 56 | const T a_imag = numext::imag(a); 57 | const T b_real = numext::real(b); 58 | const T b_imag = numext::imag(b); 59 | return std::complex(a_real * b_real - a_imag * b_imag, 60 | a_real * b_imag + a_imag * b_real); 61 | } 62 | }; 63 | 64 | template struct scalar_quotient_op, std::complex> { 65 | enum { 66 | Vectorizable = packet_traits>::HasDiv 67 | }; 68 | typedef typename std::complex result_type; 69 | 70 | EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op) 71 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex operator() (const std::complex& a, const std::complex& b) const { 72 | const T a_real = numext::real(a); 73 | const T a_imag = numext::imag(a); 74 | const T b_real = numext::real(b); 75 | const T b_imag = numext::imag(b); 76 | const T norm = T(1) / (b_real * b_real + b_imag * b_imag); 77 | return std::complex((a_real * b_real + a_imag * b_imag) * norm, 78 | (a_imag * b_real - a_real * b_imag) * norm); 79 | } 80 | }; 81 | 82 | #endif 83 | 84 | } // end namespace internal 85 | 86 | } // end namespace Eigen 87 | 88 | #endif // EIGEN_COMPLEX_CUDA_H 89 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/CUDA/MathFunctions.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2014 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MATH_FUNCTIONS_CUDA_H 11 | #define EIGEN_MATH_FUNCTIONS_CUDA_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // Make sure this is only available when targeting a GPU: we don't want to 18 | // introduce conflicts between these packet_traits definitions and the ones 19 | // we'll use on the host side (SSE, AVX, ...) 20 | #if defined(__CUDACC__) && defined(EIGEN_USE_GPU) 21 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 22 | float4 plog(const float4& a) 23 | { 24 | return make_float4(logf(a.x), logf(a.y), logf(a.z), logf(a.w)); 25 | } 26 | 27 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 28 | double2 plog(const double2& a) 29 | { 30 | using ::log; 31 | return make_double2(log(a.x), log(a.y)); 32 | } 33 | 34 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 35 | float4 plog1p(const float4& a) 36 | { 37 | return make_float4(log1pf(a.x), log1pf(a.y), log1pf(a.z), log1pf(a.w)); 38 | } 39 | 40 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 41 | double2 plog1p(const double2& a) 42 | { 43 | return make_double2(log1p(a.x), log1p(a.y)); 44 | } 45 | 46 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 47 | float4 pexp(const float4& a) 48 | { 49 | return make_float4(expf(a.x), expf(a.y), expf(a.z), expf(a.w)); 50 | } 51 | 52 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 53 | double2 pexp(const double2& a) 54 | { 55 | using ::exp; 56 | return make_double2(exp(a.x), exp(a.y)); 57 | } 58 | 59 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 60 | float4 psqrt(const float4& a) 61 | { 62 | return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w)); 63 | } 64 | 65 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 66 | double2 psqrt(const double2& a) 67 | { 68 | using ::sqrt; 69 | return make_double2(sqrt(a.x), sqrt(a.y)); 70 | } 71 | 72 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 73 | float4 prsqrt(const float4& a) 74 | { 75 | return make_float4(rsqrtf(a.x), rsqrtf(a.y), rsqrtf(a.z), rsqrtf(a.w)); 76 | } 77 | 78 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 79 | double2 prsqrt(const double2& a) 80 | { 81 | return make_double2(rsqrt(a.x), rsqrt(a.y)); 82 | } 83 | 84 | 85 | #endif 86 | 87 | } // end namespace internal 88 | 89 | } // end namespace Eigen 90 | 91 | #endif // EIGEN_MATH_FUNCTIONS_CUDA_H 92 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | /* The sin, cos, exp, and log functions of this file come from 9 | * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/ 10 | */ 11 | 12 | #ifndef EIGEN_MATH_FUNCTIONS_NEON_H 13 | #define EIGEN_MATH_FUNCTIONS_NEON_H 14 | 15 | namespace Eigen { 16 | 17 | namespace internal { 18 | 19 | template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED 20 | Packet4f pexp(const Packet4f& _x) 21 | { 22 | Packet4f x = _x; 23 | Packet4f tmp, fx; 24 | 25 | _EIGEN_DECLARE_CONST_Packet4f(1 , 1.0f); 26 | _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); 27 | _EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f); 28 | _EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647950f); 29 | _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f); 30 | _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f); 31 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f); 32 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f); 33 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500E-4f); 34 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507E-3f); 35 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073E-3f); 36 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894E-2f); 37 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459E-1f); 38 | _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201E-1f); 39 | 40 | x = vminq_f32(x, p4f_exp_hi); 41 | x = vmaxq_f32(x, p4f_exp_lo); 42 | 43 | /* express exp(x) as exp(g + n*log(2)) */ 44 | fx = vmlaq_f32(p4f_half, x, p4f_cephes_LOG2EF); 45 | 46 | /* perform a floorf */ 47 | tmp = vcvtq_f32_s32(vcvtq_s32_f32(fx)); 48 | 49 | /* if greater, substract 1 */ 50 | Packet4ui mask = vcgtq_f32(tmp, fx); 51 | mask = vandq_u32(mask, vreinterpretq_u32_f32(p4f_1)); 52 | 53 | fx = vsubq_f32(tmp, vreinterpretq_f32_u32(mask)); 54 | 55 | tmp = vmulq_f32(fx, p4f_cephes_exp_C1); 56 | Packet4f z = vmulq_f32(fx, p4f_cephes_exp_C2); 57 | x = vsubq_f32(x, tmp); 58 | x = vsubq_f32(x, z); 59 | 60 | Packet4f y = vmulq_f32(p4f_cephes_exp_p0, x); 61 | z = vmulq_f32(x, x); 62 | y = vaddq_f32(y, p4f_cephes_exp_p1); 63 | y = vmulq_f32(y, x); 64 | y = vaddq_f32(y, p4f_cephes_exp_p2); 65 | y = vmulq_f32(y, x); 66 | y = vaddq_f32(y, p4f_cephes_exp_p3); 67 | y = vmulq_f32(y, x); 68 | y = vaddq_f32(y, p4f_cephes_exp_p4); 69 | y = vmulq_f32(y, x); 70 | y = vaddq_f32(y, p4f_cephes_exp_p5); 71 | 72 | y = vmulq_f32(y, z); 73 | y = vaddq_f32(y, x); 74 | y = vaddq_f32(y, p4f_1); 75 | 76 | /* build 2^n */ 77 | int32x4_t mm; 78 | mm = vcvtq_s32_f32(fx); 79 | mm = vaddq_s32(mm, p4i_0x7f); 80 | mm = vshlq_n_s32(mm, 23); 81 | Packet4f pow2n = vreinterpretq_f32_s32(mm); 82 | 83 | y = vmulq_f32(y, pow2n); 84 | return y; 85 | } 86 | 87 | } // end namespace internal 88 | 89 | } // end namespace Eigen 90 | 91 | #endif // EIGEN_MATH_FUNCTIONS_NEON_H 92 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2015 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TYPE_CASTING_SSE_H 11 | #define EIGEN_TYPE_CASTING_SSE_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | template <> 18 | struct type_casting_traits { 19 | enum { 20 | VectorizedCast = 1, 21 | SrcCoeffRatio = 1, 22 | TgtCoeffRatio = 1 23 | }; 24 | }; 25 | 26 | template<> EIGEN_STRONG_INLINE Packet4i pcast(const Packet4f& a) { 27 | return _mm_cvttps_epi32(a); 28 | } 29 | 30 | 31 | template <> 32 | struct type_casting_traits { 33 | enum { 34 | VectorizedCast = 1, 35 | SrcCoeffRatio = 1, 36 | TgtCoeffRatio = 1 37 | }; 38 | }; 39 | 40 | template<> EIGEN_STRONG_INLINE Packet4f pcast(const Packet4i& a) { 41 | return _mm_cvtepi32_ps(a); 42 | } 43 | 44 | 45 | template <> 46 | struct type_casting_traits { 47 | enum { 48 | VectorizedCast = 1, 49 | SrcCoeffRatio = 2, 50 | TgtCoeffRatio = 1 51 | }; 52 | }; 53 | 54 | template<> EIGEN_STRONG_INLINE Packet4f pcast(const Packet2d& a, const Packet2d& b) { 55 | return _mm_shuffle_ps(_mm_cvtpd_ps(a), _mm_cvtpd_ps(b), (1 << 2) | (1 << 6)); 56 | } 57 | 58 | template <> 59 | struct type_casting_traits { 60 | enum { 61 | VectorizedCast = 1, 62 | SrcCoeffRatio = 1, 63 | TgtCoeffRatio = 2 64 | }; 65 | }; 66 | 67 | template<> EIGEN_STRONG_INLINE Packet2d pcast(const Packet4f& a) { 68 | // Simply discard the second half of the input 69 | return _mm_cvtps_pd(a); 70 | } 71 | 72 | 73 | } // end namespace internal 74 | 75 | } // end namespace Eigen 76 | 77 | #endif // EIGEN_TYPE_CASTING_SSE_H 78 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/functors/TernaryFunctors.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2016 Eugene Brevdo 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TERNARY_FUNCTORS_H 11 | #define EIGEN_TERNARY_FUNCTORS_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | //---------- associative ternary functors ---------- 18 | 19 | 20 | 21 | } // end namespace internal 22 | 23 | } // end namespace Eigen 24 | 25 | #endif // EIGEN_TERNARY_FUNCTORS_H 26 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/util/DisableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_WARNINGS_DISABLED 2 | #define EIGEN_WARNINGS_DISABLED 3 | 4 | #ifdef _MSC_VER 5 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 6 | // 4101 - unreferenced local variable 7 | // 4127 - conditional expression is constant 8 | // 4181 - qualifier applied to reference type ignored 9 | // 4211 - nonstandard extension used : redefined extern to static 10 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 11 | // 4273 - QtAlignedMalloc, inconsistent DLL linkage 12 | // 4324 - structure was padded due to declspec(align()) 13 | // 4503 - decorated name length exceeded, name was truncated 14 | // 4512 - assignment operator could not be generated 15 | // 4522 - 'class' : multiple assignment operators specified 16 | // 4700 - uninitialized local variable 'xyz' used 17 | // 4714 - function marked as __forceinline not inlined 18 | // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 19 | // 4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning) 20 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 21 | #pragma warning( push ) 22 | #endif 23 | #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800) 24 | 25 | #elif defined __INTEL_COMPILER 26 | // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) 27 | // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body 28 | // typedef that may be a reference type. 29 | // 279 - controlling expression is constant 30 | // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case. 31 | // 1684 - conversion from pointer to same-sized integral type (potential portability problem) 32 | // 2259 - non-pointer conversion from "Eigen::Index={ptrdiff_t={long}}" to "int" may lose significant bits 33 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 34 | #pragma warning push 35 | #endif 36 | #pragma warning disable 2196 279 1684 2259 37 | 38 | #elif defined __clang__ 39 | // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant 40 | // this is really a stupid warning as it warns on compile-time expressions involving enums 41 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 42 | #pragma clang diagnostic push 43 | #endif 44 | #pragma clang diagnostic ignored "-Wconstant-logical-operand" 45 | 46 | #elif defined __GNUC__ && __GNUC__>=6 47 | 48 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 49 | #pragma GCC diagnostic push 50 | #endif 51 | #pragma GCC diagnostic ignored "-Wignored-attributes" 52 | 53 | #endif 54 | 55 | #if defined __NVCC__ 56 | // Disable the "statement is unreachable" message 57 | #pragma diag_suppress code_is_unreachable 58 | // Disable the "dynamic initialization in unreachable code" message 59 | #pragma diag_suppress initialization_not_reachable 60 | // Disable the "invalid error number" message that we get with older versions of nvcc 61 | #pragma diag_suppress 1222 62 | // Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are many of them and they seem to change with every version of the compiler) 63 | #pragma diag_suppress 2527 64 | #pragma diag_suppress 2529 65 | #pragma diag_suppress 2651 66 | #pragma diag_suppress 2653 67 | #pragma diag_suppress 2668 68 | #pragma diag_suppress 2669 69 | #pragma diag_suppress 2670 70 | #pragma diag_suppress 2671 71 | #endif 72 | 73 | #endif // not EIGEN_WARNINGS_DISABLED 74 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #elif defined __GNUC__ && __GNUC__>=6 12 | #pragma GCC diagnostic pop 13 | #endif 14 | 15 | #if defined __NVCC__ 16 | // Don't reenable the diagnostic messages, as it turns out these messages need 17 | // to be disabled at the point of the template instantiation (i.e the user code) 18 | // otherwise they'll be triggered by nvcc. 19 | // #pragma diag_default code_is_unreachable 20 | // #pragma diag_default initialization_not_reachable 21 | // #pragma diag_default 2651 22 | // #pragma diag_default 2653 23 | #endif 24 | 25 | #endif 26 | 27 | #endif // EIGEN_WARNINGS_DISABLED 28 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | ******************************************************************************** 28 | * Content : Eigen bindings to LAPACKe 29 | * Real Schur needed to real unsymmetrical eigenvalues/eigenvectors. 30 | ******************************************************************************** 31 | */ 32 | 33 | #ifndef EIGEN_REAL_SCHUR_LAPACKE_H 34 | #define EIGEN_REAL_SCHUR_LAPACKE_H 35 | 36 | namespace Eigen { 37 | 38 | /** \internal Specialization for the data types supported by LAPACKe */ 39 | 40 | #define EIGEN_LAPACKE_SCHUR_REAL(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \ 41 | template<> template inline \ 42 | RealSchur >& \ 43 | RealSchur >::compute(const EigenBase& matrix, bool computeU) \ 44 | { \ 45 | eigen_assert(matrix.cols() == matrix.rows()); \ 46 | \ 47 | lapack_int n = internal::convert_index(matrix.cols()), sdim, info; \ 48 | lapack_int matrix_order = LAPACKE_COLROW; \ 49 | char jobvs, sort='N'; \ 50 | LAPACK_##LAPACKE_PREFIX_U##_SELECT2 select = 0; \ 51 | jobvs = (computeU) ? 'V' : 'N'; \ 52 | m_matU.resize(n, n); \ 53 | lapack_int ldvs = internal::convert_index(m_matU.outerStride()); \ 54 | m_matT = matrix; \ 55 | lapack_int lda = internal::convert_index(m_matT.outerStride()); \ 56 | Matrix wr, wi; \ 57 | wr.resize(n, 1); wi.resize(n, 1); \ 58 | info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)wr.data(), (LAPACKE_TYPE*)wi.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \ 59 | if(info == 0) \ 60 | m_info = Success; \ 61 | else \ 62 | m_info = NoConvergence; \ 63 | \ 64 | m_isInitialized = true; \ 65 | m_matUisUptodate = computeU; \ 66 | return *this; \ 67 | \ 68 | } 69 | 70 | EIGEN_LAPACKE_SCHUR_REAL(double, double, d, D, ColMajor, LAPACK_COL_MAJOR) 71 | EIGEN_LAPACKE_SCHUR_REAL(float, float, s, S, ColMajor, LAPACK_COL_MAJOR) 72 | EIGEN_LAPACKE_SCHUR_REAL(double, double, d, D, RowMajor, LAPACK_ROW_MAJOR) 73 | EIGEN_LAPACKE_SCHUR_REAL(float, float, s, S, RowMajor, LAPACK_ROW_MAJOR) 74 | 75 | } // end namespace Eigen 76 | 77 | #endif // EIGEN_REAL_SCHUR_LAPACKE_H 78 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/LU/Determinant.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_DETERMINANT_H 11 | #define EIGEN_DETERMINANT_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | template 18 | inline const typename Derived::Scalar bruteforce_det3_helper 19 | (const MatrixBase& matrix, int a, int b, int c) 20 | { 21 | return matrix.coeff(0,a) 22 | * (matrix.coeff(1,b) * matrix.coeff(2,c) - matrix.coeff(1,c) * matrix.coeff(2,b)); 23 | } 24 | 25 | template 26 | const typename Derived::Scalar bruteforce_det4_helper 27 | (const MatrixBase& matrix, int j, int k, int m, int n) 28 | { 29 | return (matrix.coeff(j,0) * matrix.coeff(k,1) - matrix.coeff(k,0) * matrix.coeff(j,1)) 30 | * (matrix.coeff(m,2) * matrix.coeff(n,3) - matrix.coeff(n,2) * matrix.coeff(m,3)); 31 | } 32 | 33 | template struct determinant_impl 36 | { 37 | static inline typename traits::Scalar run(const Derived& m) 38 | { 39 | if(Derived::ColsAtCompileTime==Dynamic && m.rows()==0) 40 | return typename traits::Scalar(1); 41 | return m.partialPivLu().determinant(); 42 | } 43 | }; 44 | 45 | template struct determinant_impl 46 | { 47 | static inline typename traits::Scalar run(const Derived& m) 48 | { 49 | return m.coeff(0,0); 50 | } 51 | }; 52 | 53 | template struct determinant_impl 54 | { 55 | static inline typename traits::Scalar run(const Derived& m) 56 | { 57 | return m.coeff(0,0) * m.coeff(1,1) - m.coeff(1,0) * m.coeff(0,1); 58 | } 59 | }; 60 | 61 | template struct determinant_impl 62 | { 63 | static inline typename traits::Scalar run(const Derived& m) 64 | { 65 | return bruteforce_det3_helper(m,0,1,2) 66 | - bruteforce_det3_helper(m,1,0,2) 67 | + bruteforce_det3_helper(m,2,0,1); 68 | } 69 | }; 70 | 71 | template struct determinant_impl 72 | { 73 | static typename traits::Scalar run(const Derived& m) 74 | { 75 | // trick by Martin Costabel to compute 4x4 det with only 30 muls 76 | return bruteforce_det4_helper(m,0,1,2,3) 77 | - bruteforce_det4_helper(m,0,2,1,3) 78 | + bruteforce_det4_helper(m,0,3,1,2) 79 | + bruteforce_det4_helper(m,1,2,0,3) 80 | - bruteforce_det4_helper(m,1,3,0,2) 81 | + bruteforce_det4_helper(m,2,3,0,1); 82 | } 83 | }; 84 | 85 | } // end namespace internal 86 | 87 | /** \lu_module 88 | * 89 | * \returns the determinant of this matrix 90 | */ 91 | template 92 | inline typename internal::traits::Scalar MatrixBase::determinant() const 93 | { 94 | eigen_assert(rows() == cols()); 95 | typedef typename internal::nested_eval::type Nested; 96 | return internal::determinant_impl::type>::run(derived()); 97 | } 98 | 99 | } // end namespace Eigen 100 | 101 | #endif // EIGEN_DETERMINANT_H 102 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | ******************************************************************************** 28 | * Content : Eigen bindings to LAPACKe 29 | * LU decomposition with partial pivoting based on LAPACKE_?getrf function. 30 | ******************************************************************************** 31 | */ 32 | 33 | #ifndef EIGEN_PARTIALLU_LAPACK_H 34 | #define EIGEN_PARTIALLU_LAPACK_H 35 | 36 | namespace Eigen { 37 | 38 | namespace internal { 39 | 40 | /** \internal Specialization for the data types supported by LAPACKe */ 41 | 42 | #define EIGEN_LAPACKE_LU_PARTPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \ 43 | template \ 44 | struct partial_lu_impl \ 45 | { \ 46 | /* \internal performs the LU decomposition in-place of the matrix represented */ \ 47 | static lapack_int blocked_lu(Index rows, Index cols, EIGTYPE* lu_data, Index luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \ 48 | { \ 49 | EIGEN_UNUSED_VARIABLE(maxBlockSize);\ 50 | lapack_int matrix_order, first_zero_pivot; \ 51 | lapack_int m, n, lda, *ipiv, info; \ 52 | EIGTYPE* a; \ 53 | /* Set up parameters for ?getrf */ \ 54 | matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ 55 | lda = convert_index(luStride); \ 56 | a = lu_data; \ 57 | ipiv = row_transpositions; \ 58 | m = convert_index(rows); \ 59 | n = convert_index(cols); \ 60 | nb_transpositions = 0; \ 61 | \ 62 | info = LAPACKE_##LAPACKE_PREFIX##getrf( matrix_order, m, n, (LAPACKE_TYPE*)a, lda, ipiv ); \ 63 | \ 64 | for(int i=0;i= 0); \ 67 | /* something should be done with nb_transpositions */ \ 68 | \ 69 | first_zero_pivot = info; \ 70 | return first_zero_pivot; \ 71 | } \ 72 | }; 73 | 74 | EIGEN_LAPACKE_LU_PARTPIV(double, double, d) 75 | EIGEN_LAPACKE_LU_PARTPIV(float, float, s) 76 | EIGEN_LAPACKE_LU_PARTPIV(dcomplex, lapack_complex_double, z) 77 | EIGEN_LAPACKE_LU_PARTPIV(scomplex, lapack_complex_float, c) 78 | 79 | } // end namespace internal 80 | 81 | } // end namespace Eigen 82 | 83 | #endif // EIGEN_PARTIALLU_LAPACK_H 84 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | ******************************************************************************** 28 | * Content : Eigen bindings to LAPACKe 29 | * Householder QR decomposition of a matrix w/o pivoting based on 30 | * LAPACKE_?geqrf function. 31 | ******************************************************************************** 32 | */ 33 | 34 | #ifndef EIGEN_QR_LAPACKE_H 35 | #define EIGEN_QR_LAPACKE_H 36 | 37 | namespace Eigen { 38 | 39 | namespace internal { 40 | 41 | /** \internal Specialization for the data types supported by LAPACKe */ 42 | 43 | #define EIGEN_LAPACKE_QR_NOPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \ 44 | template \ 45 | struct householder_qr_inplace_blocked \ 46 | { \ 47 | static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index = 32, \ 48 | typename MatrixQR::Scalar* = 0) \ 49 | { \ 50 | lapack_int m = (lapack_int) mat.rows(); \ 51 | lapack_int n = (lapack_int) mat.cols(); \ 52 | lapack_int lda = (lapack_int) mat.outerStride(); \ 53 | lapack_int matrix_order = (MatrixQR::IsRowMajor) ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ 54 | LAPACKE_##LAPACKE_PREFIX##geqrf( matrix_order, m, n, (LAPACKE_TYPE*)mat.data(), lda, (LAPACKE_TYPE*)hCoeffs.data()); \ 55 | hCoeffs.adjointInPlace(); \ 56 | } \ 57 | }; 58 | 59 | EIGEN_LAPACKE_QR_NOPIV(double, double, d) 60 | EIGEN_LAPACKE_QR_NOPIV(float, float, s) 61 | EIGEN_LAPACKE_QR_NOPIV(dcomplex, lapack_complex_double, z) 62 | EIGEN_LAPACKE_QR_NOPIV(scomplex, lapack_complex_float, c) 63 | 64 | } // end namespace internal 65 | 66 | } // end namespace Eigen 67 | 68 | #endif // EIGEN_QR_LAPACKE_H 69 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MAPPED_SPARSEMATRIX_H 11 | #define EIGEN_MAPPED_SPARSEMATRIX_H 12 | 13 | namespace Eigen { 14 | 15 | /** \deprecated Use Map > 16 | * \class MappedSparseMatrix 17 | * 18 | * \brief Sparse matrix 19 | * 20 | * \param _Scalar the scalar type, i.e. the type of the coefficients 21 | * 22 | * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. 23 | * 24 | */ 25 | namespace internal { 26 | template 27 | struct traits > : traits > 28 | {}; 29 | } // end namespace internal 30 | 31 | template 32 | class MappedSparseMatrix 33 | : public Map > 34 | { 35 | typedef Map > Base; 36 | 37 | public: 38 | 39 | typedef typename Base::StorageIndex StorageIndex; 40 | typedef typename Base::Scalar Scalar; 41 | 42 | inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0) 43 | : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr) 44 | {} 45 | 46 | /** Empty destructor */ 47 | inline ~MappedSparseMatrix() {} 48 | }; 49 | 50 | namespace internal { 51 | 52 | template 53 | struct evaluator > 54 | : evaluator > > 55 | { 56 | typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType; 57 | typedef evaluator > Base; 58 | 59 | evaluator() : Base() {} 60 | explicit evaluator(const XprType &mat) : Base(mat) {} 61 | }; 62 | 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN_MAPPED_SPARSEMATRIX_H 68 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseCore/SparseDot.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_DOT_H 11 | #define EIGEN_SPARSE_DOT_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | template 17 | typename internal::traits::Scalar 18 | SparseMatrixBase::dot(const MatrixBase& other) const 19 | { 20 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 21 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 22 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 23 | EIGEN_STATIC_ASSERT((internal::is_same::value), 24 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 25 | 26 | eigen_assert(size() == other.size()); 27 | eigen_assert(other.size()>0 && "you are using a non initialized vector"); 28 | 29 | internal::evaluator thisEval(derived()); 30 | typename internal::evaluator::InnerIterator i(thisEval, 0); 31 | Scalar res(0); 32 | while (i) 33 | { 34 | res += numext::conj(i.value()) * other.coeff(i.index()); 35 | ++i; 36 | } 37 | return res; 38 | } 39 | 40 | template 41 | template 42 | typename internal::traits::Scalar 43 | SparseMatrixBase::dot(const SparseMatrixBase& other) const 44 | { 45 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 46 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 47 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 48 | EIGEN_STATIC_ASSERT((internal::is_same::value), 49 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 50 | 51 | eigen_assert(size() == other.size()); 52 | 53 | internal::evaluator thisEval(derived()); 54 | typename internal::evaluator::InnerIterator i(thisEval, 0); 55 | 56 | internal::evaluator otherEval(other.derived()); 57 | typename internal::evaluator::InnerIterator j(otherEval, 0); 58 | 59 | Scalar res(0); 60 | while (i && j) 61 | { 62 | if (i.index()==j.index()) 63 | { 64 | res += numext::conj(i.value()) * j.value(); 65 | ++i; ++j; 66 | } 67 | else if (i.index() 76 | inline typename NumTraits::Scalar>::Real 77 | SparseMatrixBase::squaredNorm() const 78 | { 79 | return numext::real((*this).cwiseAbs2().sum()); 80 | } 81 | 82 | template 83 | inline typename NumTraits::Scalar>::Real 84 | SparseMatrixBase::norm() const 85 | { 86 | using std::sqrt; 87 | return sqrt(squaredNorm()); 88 | } 89 | 90 | template 91 | inline typename NumTraits::Scalar>::Real 92 | SparseMatrixBase::blueNorm() const 93 | { 94 | return internal::blueNorm_impl(*this); 95 | } 96 | } // end namespace Eigen 97 | 98 | #endif // EIGEN_SPARSE_DOT_H 99 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | template 17 | bool SparseMatrixBase::isApprox(const SparseMatrixBase& other, const RealScalar &prec) const 18 | { 19 | const typename internal::nested_eval::type actualA(derived()); 20 | typename internal::conditional::type, 22 | const PlainObject>::type actualB(other.derived()); 23 | 24 | return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm()); 25 | } 26 | 27 | } // end namespace Eigen 28 | 29 | #endif // EIGEN_SPARSE_FUZZY_H 30 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | internal::evaluator thisEval(derived()); 22 | for (Index j=0; j::InnerIterator iter(thisEval,j); iter; ++iter) 24 | res += iter.value(); 25 | return res; 26 | } 27 | 28 | template 29 | typename internal::traits >::Scalar 30 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 31 | { 32 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 33 | if(this->isCompressed()) 34 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 35 | else 36 | return Base::sum(); 37 | } 38 | 39 | template 40 | typename internal::traits >::Scalar 41 | SparseVector<_Scalar,_Options,_Index>::sum() const 42 | { 43 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 44 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 45 | } 46 | 47 | } // end namespace Eigen 48 | 49 | #endif // EIGEN_SPARSEREDUX_H 50 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseLU/SparseLU_Utils.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | 11 | #ifndef EIGEN_SPARSELU_UTILS_H 12 | #define EIGEN_SPARSELU_UTILS_H 13 | 14 | namespace Eigen { 15 | namespace internal { 16 | 17 | /** 18 | * \brief Count Nonzero elements in the factors 19 | */ 20 | template 21 | void SparseLUImpl::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) 22 | { 23 | nnzL = 0; 24 | nnzU = (glu.xusub)(n); 25 | Index nsuper = (glu.supno)(n); 26 | Index jlen; 27 | Index i, j, fsupc; 28 | if (n <= 0 ) return; 29 | // For each supernode 30 | for (i = 0; i <= nsuper; i++) 31 | { 32 | fsupc = glu.xsup(i); 33 | jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); 34 | 35 | for (j = fsupc; j < glu.xsup(i+1); j++) 36 | { 37 | nnzL += jlen; 38 | nnzU += j - fsupc + 1; 39 | jlen--; 40 | } 41 | } 42 | } 43 | 44 | /** 45 | * \brief Fix up the data storage lsub for L-subscripts. 46 | * 47 | * It removes the subscripts sets for structural pruning, 48 | * and applies permutation to the remaining subscripts 49 | * 50 | */ 51 | template 52 | void SparseLUImpl::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu) 53 | { 54 | Index fsupc, i, j, k, jstart; 55 | 56 | StorageIndex nextl = 0; 57 | Index nsuper = (glu.supno)(n); 58 | 59 | // For each supernode 60 | for (i = 0; i <= nsuper; i++) 61 | { 62 | fsupc = glu.xsup(i); 63 | jstart = glu.xlsub(fsupc); 64 | glu.xlsub(fsupc) = nextl; 65 | for (j = jstart; j < glu.xlsub(fsupc + 1); j++) 66 | { 67 | glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A 68 | nextl++; 69 | } 70 | for (k = fsupc+1; k < glu.xsup(i+1); k++) 71 | glu.xlsub(k) = nextl; // other columns in supernode i 72 | } 73 | 74 | glu.xlsub(n) = nextl; 75 | } 76 | 77 | } // end namespace internal 78 | 79 | } // end namespace Eigen 80 | #endif // EIGEN_SPARSELU_UTILS_H 81 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | /* This file is a modified version of heap_relax_snode.c file in SuperLU 11 | * -- SuperLU routine (version 3.0) -- 12 | * Univ. of California Berkeley, Xerox Palo Alto Research Center, 13 | * and Lawrence Berkeley National Lab. 14 | * October 15, 2003 15 | * 16 | * Copyright (c) 1994 by Xerox Corporation. All rights reserved. 17 | * 18 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY 19 | * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 20 | * 21 | * Permission is hereby granted to use or copy this program for any 22 | * purpose, provided the above notices are retained on all copies. 23 | * Permission to modify the code and to distribute modified code is 24 | * granted, provided the above notices are retained, and a notice that 25 | * the code was modified is included with the above copyright notice. 26 | */ 27 | 28 | #ifndef SPARSELU_RELAX_SNODE_H 29 | #define SPARSELU_RELAX_SNODE_H 30 | 31 | namespace Eigen { 32 | 33 | namespace internal { 34 | 35 | /** 36 | * \brief Identify the initial relaxed supernodes 37 | * 38 | * This routine is applied to a column elimination tree. 39 | * It assumes that the matrix has been reordered according to the postorder of the etree 40 | * \param n the number of columns 41 | * \param et elimination tree 42 | * \param relax_columns Maximum number of columns allowed in a relaxed snode 43 | * \param descendants Number of descendants of each node in the etree 44 | * \param relax_end last column in a supernode 45 | */ 46 | template 47 | void SparseLUImpl::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end) 48 | { 49 | 50 | // compute the number of descendants of each node in the etree 51 | Index parent; 52 | relax_end.setConstant(emptyIdxLU); 53 | descendants.setZero(); 54 | for (Index j = 0; j < n; j++) 55 | { 56 | parent = et(j); 57 | if (parent != n) // not the dummy root 58 | descendants(parent) += descendants(j) + 1; 59 | } 60 | // Identify the relaxed supernodes by postorder traversal of the etree 61 | Index snode_start; // beginning of a snode 62 | for (Index j = 0; j < n; ) 63 | { 64 | parent = et(j); 65 | snode_start = j; 66 | while ( parent != n && descendants(parent) < relax_columns ) 67 | { 68 | j = parent; 69 | parent = et(j); 70 | } 71 | // Found a supernode in postordered etree, j is the last column 72 | relax_end(snode_start) = StorageIndex(j); // Record last column 73 | j++; 74 | // Search for a new leaf 75 | while (descendants(j) != 0 && j < n) j++; 76 | } // End postorder traversal of the etree 77 | 78 | } 79 | 80 | } // end namespace internal 81 | 82 | } // end namespace Eigen 83 | #endif 84 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/StlSupport/details.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STL_DETAILS_H 12 | #define EIGEN_STL_DETAILS_H 13 | 14 | #ifndef EIGEN_ALIGNED_ALLOCATOR 15 | #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator 16 | #endif 17 | 18 | namespace Eigen { 19 | 20 | // This one is needed to prevent reimplementing the whole std::vector. 21 | template 22 | class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR 23 | { 24 | public: 25 | typedef size_t size_type; 26 | typedef ptrdiff_t difference_type; 27 | typedef T* pointer; 28 | typedef const T* const_pointer; 29 | typedef T& reference; 30 | typedef const T& const_reference; 31 | typedef T value_type; 32 | 33 | template 34 | struct rebind 35 | { 36 | typedef aligned_allocator_indirection other; 37 | }; 38 | 39 | aligned_allocator_indirection() {} 40 | aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} 41 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 42 | template 43 | aligned_allocator_indirection(const aligned_allocator_indirection& ) {} 44 | template 45 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 46 | ~aligned_allocator_indirection() {} 47 | }; 48 | 49 | #if EIGEN_COMP_MSVC 50 | 51 | // sometimes, MSVC detects, at compile time, that the argument x 52 | // in std::vector::resize(size_t s,T x) won't be aligned and generate an error 53 | // even if this function is never called. Whence this little wrapper. 54 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \ 55 | typename Eigen::internal::conditional< \ 56 | Eigen::internal::is_arithmetic::value, \ 57 | T, \ 58 | Eigen::internal::workaround_msvc_stl_support \ 59 | >::type 60 | 61 | namespace internal { 62 | template struct workaround_msvc_stl_support : public T 63 | { 64 | inline workaround_msvc_stl_support() : T() {} 65 | inline workaround_msvc_stl_support(const T& other) : T(other) {} 66 | inline operator T& () { return *static_cast(this); } 67 | inline operator const T& () const { return *static_cast(this); } 68 | template 69 | inline T& operator=(const OtherT& other) 70 | { T::operator=(other); return *this; } 71 | inline workaround_msvc_stl_support& operator=(const workaround_msvc_stl_support& other) 72 | { T::operator=(other); return *this; } 73 | }; 74 | } 75 | 76 | #else 77 | 78 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T 79 | 80 | #endif 81 | 82 | } 83 | 84 | #endif // EIGEN_STL_DETAILS_H 85 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/misc/Image.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MISC_IMAGE_H 11 | #define EIGEN_MISC_IMAGE_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class image_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix< 25 | typename MatrixType::Scalar, 26 | MatrixType::RowsAtCompileTime, // the image is a subspace of the destination space, whose 27 | // dimension is the number of rows of the original matrix 28 | Dynamic, // we don't know at compile time the dimension of the image (the rank) 29 | MatrixType::Options, 30 | MatrixType::MaxRowsAtCompileTime, // the image matrix will consist of columns from the original matrix, 31 | MatrixType::MaxColsAtCompileTime // so it has the same number of rows and at most as many columns. 32 | > ReturnType; 33 | }; 34 | 35 | template struct image_retval_base 36 | : public ReturnByValue > 37 | { 38 | typedef _DecompositionType DecompositionType; 39 | typedef typename DecompositionType::MatrixType MatrixType; 40 | typedef ReturnByValue Base; 41 | 42 | image_retval_base(const DecompositionType& dec, const MatrixType& originalMatrix) 43 | : m_dec(dec), m_rank(dec.rank()), 44 | m_cols(m_rank == 0 ? 1 : m_rank), 45 | m_originalMatrix(originalMatrix) 46 | {} 47 | 48 | inline Index rows() const { return m_dec.rows(); } 49 | inline Index cols() const { return m_cols; } 50 | inline Index rank() const { return m_rank; } 51 | inline const DecompositionType& dec() const { return m_dec; } 52 | inline const MatrixType& originalMatrix() const { return m_originalMatrix; } 53 | 54 | template inline void evalTo(Dest& dst) const 55 | { 56 | static_cast*>(this)->evalTo(dst); 57 | } 58 | 59 | protected: 60 | const DecompositionType& m_dec; 61 | Index m_rank, m_cols; 62 | const MatrixType& m_originalMatrix; 63 | }; 64 | 65 | } // end namespace internal 66 | 67 | #define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \ 68 | typedef typename DecompositionType::MatrixType MatrixType; \ 69 | typedef typename MatrixType::Scalar Scalar; \ 70 | typedef typename MatrixType::RealScalar RealScalar; \ 71 | typedef Eigen::internal::image_retval_base Base; \ 72 | using Base::dec; \ 73 | using Base::originalMatrix; \ 74 | using Base::rank; \ 75 | using Base::rows; \ 76 | using Base::cols; \ 77 | image_retval(const DecompositionType& dec, const MatrixType& originalMatrix) \ 78 | : Base(dec, originalMatrix) {} 79 | 80 | } // end namespace Eigen 81 | 82 | #endif // EIGEN_MISC_IMAGE_H 83 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/misc/Kernel.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MISC_KERNEL_H 11 | #define EIGEN_MISC_KERNEL_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class kernel_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix< 25 | typename MatrixType::Scalar, 26 | MatrixType::ColsAtCompileTime, // the number of rows in the "kernel matrix" 27 | // is the number of cols of the original matrix 28 | // so that the product "matrix * kernel = zero" makes sense 29 | Dynamic, // we don't know at compile-time the dimension of the kernel 30 | MatrixType::Options, 31 | MatrixType::MaxColsAtCompileTime, // see explanation for 2nd template parameter 32 | MatrixType::MaxColsAtCompileTime // the kernel is a subspace of the domain space, 33 | // whose dimension is the number of columns of the original matrix 34 | > ReturnType; 35 | }; 36 | 37 | template struct kernel_retval_base 38 | : public ReturnByValue > 39 | { 40 | typedef _DecompositionType DecompositionType; 41 | typedef ReturnByValue Base; 42 | 43 | explicit kernel_retval_base(const DecompositionType& dec) 44 | : m_dec(dec), 45 | m_rank(dec.rank()), 46 | m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank) 47 | {} 48 | 49 | inline Index rows() const { return m_dec.cols(); } 50 | inline Index cols() const { return m_cols; } 51 | inline Index rank() const { return m_rank; } 52 | inline const DecompositionType& dec() const { return m_dec; } 53 | 54 | template inline void evalTo(Dest& dst) const 55 | { 56 | static_cast*>(this)->evalTo(dst); 57 | } 58 | 59 | protected: 60 | const DecompositionType& m_dec; 61 | Index m_rank, m_cols; 62 | }; 63 | 64 | } // end namespace internal 65 | 66 | #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \ 67 | typedef typename DecompositionType::MatrixType MatrixType; \ 68 | typedef typename MatrixType::Scalar Scalar; \ 69 | typedef typename MatrixType::RealScalar RealScalar; \ 70 | typedef Eigen::internal::kernel_retval_base Base; \ 71 | using Base::dec; \ 72 | using Base::rank; \ 73 | using Base::rows; \ 74 | using Base::cols; \ 75 | kernel_retval(const DecompositionType& dec) : Base(dec) {} 76 | 77 | } // end namespace Eigen 78 | 79 | #endif // EIGEN_MISC_KERNEL_H 80 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/misc/RealSvd2x2.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2010 Benoit Jacob 5 | // Copyright (C) 2013-2016 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_REALSVD2X2_H 12 | #define EIGEN_REALSVD2X2_H 13 | 14 | namespace Eigen { 15 | 16 | namespace internal { 17 | 18 | template 19 | void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q, 20 | JacobiRotation *j_left, 21 | JacobiRotation *j_right) 22 | { 23 | using std::sqrt; 24 | using std::abs; 25 | Matrix m; 26 | m << numext::real(matrix.coeff(p,p)), numext::real(matrix.coeff(p,q)), 27 | numext::real(matrix.coeff(q,p)), numext::real(matrix.coeff(q,q)); 28 | JacobiRotation rot1; 29 | RealScalar t = m.coeff(0,0) + m.coeff(1,1); 30 | RealScalar d = m.coeff(1,0) - m.coeff(0,1); 31 | 32 | if(abs(d) < (std::numeric_limits::min)()) 33 | { 34 | rot1.s() = RealScalar(0); 35 | rot1.c() = RealScalar(1); 36 | } 37 | else 38 | { 39 | // If d!=0, then t/d cannot overflow because the magnitude of the 40 | // entries forming d are not too small compared to the ones forming t. 41 | RealScalar u = t / d; 42 | RealScalar tmp = sqrt(RealScalar(1) + numext::abs2(u)); 43 | rot1.s() = RealScalar(1) / tmp; 44 | rot1.c() = u / tmp; 45 | } 46 | m.applyOnTheLeft(0,1,rot1); 47 | j_right->makeJacobi(m,0,1); 48 | *j_left = rot1 * j_right->transpose(); 49 | } 50 | 51 | } // end namespace internal 52 | 53 | } // end namespace Eigen 54 | 55 | #endif // EIGEN_REALSVD2X2_H 56 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/misc/lapacke_mangling.h: -------------------------------------------------------------------------------- 1 | #ifndef LAPACK_HEADER_INCLUDED 2 | #define LAPACK_HEADER_INCLUDED 3 | 4 | #ifndef LAPACK_GLOBAL 5 | #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) 6 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 7 | #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) 8 | #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME 9 | #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) 10 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname 11 | #else 12 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 13 | #endif 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2016 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing common coefficient wise functions. 12 | 13 | /** \returns an expression of the difference of \c *this and \a other 14 | * 15 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 16 | * 17 | * \sa class CwiseBinaryOp, operator-=() 18 | */ 19 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,difference) 20 | 21 | /** \returns an expression of the sum of \c *this and \a other 22 | * 23 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 24 | * 25 | * \sa class CwiseBinaryOp, operator+=() 26 | */ 27 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,sum) 28 | 29 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 30 | * 31 | * The template parameter \a CustomBinaryOp is the type of the functor 32 | * of the custom operator (see class CwiseBinaryOp for an example) 33 | * 34 | * Here is an example illustrating the use of custom functors: 35 | * \include class_CwiseBinaryOp.cpp 36 | * Output: \verbinclude class_CwiseBinaryOp.out 37 | * 38 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 39 | */ 40 | template 41 | EIGEN_DEVICE_FUNC 42 | EIGEN_STRONG_INLINE const CwiseBinaryOp 43 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 44 | { 45 | return CwiseBinaryOp(derived(), other.derived(), func); 46 | } 47 | 48 | 49 | #ifndef EIGEN_PARSED_BY_DOXYGEN 50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product) 51 | #else 52 | /** \returns an expression of \c *this scaled by the scalar factor \a scalar 53 | * 54 | * \tparam T is the scalar type of \a scalar. It must be compatible with the scalar type of the given expression. 55 | */ 56 | template 57 | const CwiseBinaryOp,Derived,Constant > operator*(const T& scalar) const; 58 | /** \returns an expression of \a expr scaled by the scalar factor \a scalar 59 | * 60 | * \tparam T is the scalar type of \a scalar. It must be compatible with the scalar type of the given expression. 61 | */ 62 | template friend 63 | const CwiseBinaryOp,Constant,Derived> operator*(const T& scalar, const StorageBaseType& expr); 64 | #endif 65 | 66 | 67 | 68 | #ifndef EIGEN_PARSED_BY_DOXYGEN 69 | EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(operator/,quotient) 70 | #else 71 | /** \returns an expression of \c *this divided by the scalar value \a scalar 72 | * 73 | * \tparam T is the scalar type of \a scalar. It must be compatible with the scalar type of the given expression. 74 | */ 75 | template 76 | const CwiseBinaryOp,Derived,Constant > operator/(const T& scalar) const; 77 | #endif 78 | -------------------------------------------------------------------------------- /Eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is included into the body of the base classes supporting matrix specific coefficient-wise functions. 12 | // This include MatrixBase and SparseMatrixBase. 13 | 14 | 15 | typedef CwiseUnaryOp, const Derived> CwiseAbsReturnType; 16 | typedef CwiseUnaryOp, const Derived> CwiseAbs2ReturnType; 17 | typedef CwiseUnaryOp, const Derived> CwiseSqrtReturnType; 18 | typedef CwiseUnaryOp, const Derived> CwiseSignReturnType; 19 | typedef CwiseUnaryOp, const Derived> CwiseInverseReturnType; 20 | 21 | /// \returns an expression of the coefficient-wise absolute value of \c *this 22 | /// 23 | /// Example: \include MatrixBase_cwiseAbs.cpp 24 | /// Output: \verbinclude MatrixBase_cwiseAbs.out 25 | /// 26 | EIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value) 27 | /// 28 | /// \sa cwiseAbs2() 29 | /// 30 | EIGEN_DEVICE_FUNC 31 | EIGEN_STRONG_INLINE const CwiseAbsReturnType 32 | cwiseAbs() const { return CwiseAbsReturnType(derived()); } 33 | 34 | /// \returns an expression of the coefficient-wise squared absolute value of \c *this 35 | /// 36 | /// Example: \include MatrixBase_cwiseAbs2.cpp 37 | /// Output: \verbinclude MatrixBase_cwiseAbs2.out 38 | /// 39 | EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value) 40 | /// 41 | /// \sa cwiseAbs() 42 | /// 43 | EIGEN_DEVICE_FUNC 44 | EIGEN_STRONG_INLINE const CwiseAbs2ReturnType 45 | cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); } 46 | 47 | /// \returns an expression of the coefficient-wise square root of *this. 48 | /// 49 | /// Example: \include MatrixBase_cwiseSqrt.cpp 50 | /// Output: \verbinclude MatrixBase_cwiseSqrt.out 51 | /// 52 | EIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root) 53 | /// 54 | /// \sa cwisePow(), cwiseSquare() 55 | /// 56 | EIGEN_DEVICE_FUNC 57 | inline const CwiseSqrtReturnType 58 | cwiseSqrt() const { return CwiseSqrtReturnType(derived()); } 59 | 60 | /// \returns an expression of the coefficient-wise signum of *this. 61 | /// 62 | /// Example: \include MatrixBase_cwiseSign.cpp 63 | /// Output: \verbinclude MatrixBase_cwiseSign.out 64 | /// 65 | EIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function) 66 | /// 67 | EIGEN_DEVICE_FUNC 68 | inline const CwiseSignReturnType 69 | cwiseSign() const { return CwiseSignReturnType(derived()); } 70 | 71 | 72 | /// \returns an expression of the coefficient-wise inverse of *this. 73 | /// 74 | /// Example: \include MatrixBase_cwiseInverse.cpp 75 | /// Output: \verbinclude MatrixBase_cwiseInverse.out 76 | /// 77 | EIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse) 78 | /// 79 | /// \sa cwiseProduct() 80 | /// 81 | EIGEN_DEVICE_FUNC 82 | inline const CwiseInverseReturnType 83 | cwiseInverse() const { return CwiseInverseReturnType(derived()); } 84 | 85 | 86 | -------------------------------------------------------------------------------- /Eigen3/MINPACK_LICENSE: -------------------------------------------------------------------------------- 1 | Minpack Copyright Notice (1999) University of Chicago. All rights reserved 2 | 3 | Redistribution and use in source and binary forms, with or 4 | without modification, are permitted provided that the 5 | following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above 8 | copyright notice, this list of conditions and the following 9 | disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials 14 | provided with the distribution. 15 | 16 | 3. The end-user documentation included with the 17 | redistribution, if any, must include the following 18 | acknowledgment: 19 | 20 | "This product includes software developed by the 21 | University of Chicago, as Operator of Argonne National 22 | Laboratory. 23 | 24 | Alternately, this acknowledgment may appear in the software 25 | itself, if and wherever such third-party acknowledgments 26 | normally appear. 27 | 28 | 4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" 29 | WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE 30 | UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND 31 | THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES 33 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE 34 | OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY 35 | OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR 36 | USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF 37 | THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) 38 | DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION 39 | UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL 40 | BE CORRECTED. 41 | 42 | 5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT 43 | HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF 44 | ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, 45 | INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF 46 | ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF 47 | PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER 48 | SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT 49 | (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, 50 | EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE 51 | POSSIBILITY OF SUCH LOSS OR DAMAGES. 52 | 53 | -------------------------------------------------------------------------------- /Eigen3/README: -------------------------------------------------------------------------------- 1 | Eigen is primarily MPL2 licensed. See MPL2_LICENSE and these links: 2 | http://www.mozilla.org/MPL/2.0/ 3 | http://www.mozilla.org/MPL/2.0/FAQ.html 4 | 5 | Some files contain third-party code under BSD or LGPL licenses, whence the 6 | other *_LICENSE files here. 7 | 8 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. 9 | For this reason, the LGPL_LICENSE file contains the LGPL 2.1 text. 10 | 11 | If you want to guarantee that the Eigen code that you are #including is 12 | licensed 13 | under the MPL2 and possibly more permissive licenses (like BSD), #define this 14 | preprocessor symbol: 15 | EIGEN_MPL2_ONLY 16 | For example, with most compilers, you could add this to your project CXXFLAGS: 17 | -DEIGEN_MPL2_ONLY 18 | This will cause a compilation error to be generated if you #include any code 19 | that is LGPL licensed. 20 | -------------------------------------------------------------------------------- /doc/Development_checklist: -------------------------------------------------------------------------------- 1 | Force-field wrapper timeline and checklist: 2 | Point-charge force fields: Done (TINKER) 3 | Point-charge force fields: In progress (LAMMPS) 4 | Polarizable force fields: Done (TINKER) 5 | Polarizable force fields: Future (LAMMPS) 6 | Diffuse charges: In progress (TINKER) 7 | 8 | Simulation mode timeline and checklist: 9 | Single-point energy: Done 10 | NVT PI Monte Carlo: Done 11 | NPT PI Monte Carlo: Testing 12 | Geometry optimizations: Done 13 | Reaction pathways: Done 14 | Ensemble sampling: Testing 15 | -------------------------------------------------------------------------------- /doc/Example_input/Gaussian_files/BASIS: -------------------------------------------------------------------------------- 1 | 1 2 3 4 5 6 7 8 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 0 2 | 6-31++G** 3 | **** 4 | 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 52 53 54 55 56 58 0 5 | 6-31++G** 6 | **** 7 | 59 60 61 62 63 64 65 66 67 9 15 39 50 57 0 8 | 6-31++G** 9 | **** 10 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0 11 | 6-31++G** 12 | **** 13 | 51 0 14 | 6-31++G** 15 | **** 16 | 91 92 93 94 0 STO-2G 17 | SP 2 1.00 18 | 0.9034 1.00 1.00 19 | 0.21310 1.90904 0.57864 20 | **** 21 | 22 | 91 92 93 94 0 23 | try1 1 2 24 | S Component 25 | 1 26 | 1 7.75 16.49 27 | P 28 | 1 29 | 1 1.0 0.0 30 | -------------------------------------------------------------------------------- /doc/Example_input/NWChem_files/BASIS: -------------------------------------------------------------------------------- 1 | basis 2 | * library 6-31++G** except F2pb 3 | F2pb SP 4 | 0.90340 1.00000 1.00000 5 | 0.21310 1.90904 0.57864 6 | end 7 | ecp 8 | F2pb nelec 2 9 | F2pb ul 10 | 1 7.75 16.49 11 | end 12 | -------------------------------------------------------------------------------- /doc/Example_input/PDB_input/LICHEM_files/BASIS: -------------------------------------------------------------------------------- 1 | 2 3 4 5 6 7 8 9 10 0 2 | 6-31G* 3 | **** 4 | 11 12 13 14 15 16 17 18 19 20 0 5 | 6-31G* 6 | **** 7 | 21 22 23 24 25 26 27 28 29 30 0 8 | 6-31G* 9 | **** 10 | 31 32 33 34 35 36 37 38 39 40 0 11 | 6-31G* 12 | **** 13 | 41 42 43 44 45 46 47 48 49 50 0 14 | 6-31G* 15 | **** 16 | 51 52 53 54 55 56 57 58 59 60 0 17 | 6-31G* 18 | **** 19 | 61 62 63 64 65 66 67 68 69 70 0 20 | 6-31G* 21 | **** 22 | 71 72 73 74 75 76 77 78 79 80 0 23 | 6-31G* 24 | **** 25 | 81 82 83 84 85 86 88 0 26 | 6-31G* 27 | **** 28 | 1 87 0 STO-2G 29 | SP 2 1.00 30 | 0.9034 1.00 1.00 31 | 0.21310 1.90904 0.57864 32 | **** 33 | 34 | 1 87 0 35 | try1 1 2 36 | S Component 37 | 1 38 | 1 7.75 16.49 39 | P 40 | 1 41 | 1 1.0 0.0 42 | -------------------------------------------------------------------------------- /doc/Example_input/PDB_input/LICHEM_files/regions.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_functional: B97D 4 | QM_basis: GEN 5 | QM_memory: 10 GB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: AMOEBA 10 | Calculation_type: SP 11 | QM_atoms: 86 12 | 60 61 68 69 70 71 72 73 74 75 13 | 76 77 78 79 80 81 82 83 84 85 14 | 86 87 88 89 90 91 92 93 94 95 15 | 96 97 98 99 100 101 102 103 104 105 16 | 106 107 108 109 110 111 112 113 114 115 17 | 116 117 118 119 120 121 122 123 124 125 18 | 126 127 128 129 130 131 132 133 134 135 19 | 136 137 138 139 140 141 142 143 144 145 20 | 146 147 148 149 150 154 21 | Pseudobond_atoms: 2 22 | 59 151 23 | Boundary_atoms: 14 24 | 58 62 63 64 65 66 67 152 153 155 25 | 156 157 158 159 26 | Frozen_atoms: 0 27 | -------------------------------------------------------------------------------- /doc/Example_input/PDB_input/LICHEM_files/tinker.key: -------------------------------------------------------------------------------- 1 | parameters ../amoebapro13.prm 2 | -------------------------------------------------------------------------------- /doc/Example_input/PDB_input/Original_files/caps.xyz: -------------------------------------------------------------------------------- 1 | 12 2 | 1 C -0.921 -0.989 0.352 223 3 | 2 O -0.300 -1.974 0.716 224 4 | 3 C -2.417 -1.022 0.360 221 5 | 4 H -2.799 -0.851 -0.667 222 6 | 5 H -2.796 -0.224 1.033 222 7 | 6 H -2.787 -2.003 0.728 222 8 | 7 N 11.462 -9.657 11.410 227 9 | 8 HN 10.727 -9.617 10.703 228 10 | 9 C 11.094 -10.168 12.715 229 11 | 10 H 10.707 -11.202 12.604 230 12 | 11 H 11.945 -10.182 13.426 230 13 | 12 H 10.288 -9.531 13.140 230 14 | -------------------------------------------------------------------------------- /doc/Example_input/PDB_input/Original_files/tinker.key: -------------------------------------------------------------------------------- 1 | parameters ../amoebapro13.prm 2 | -------------------------------------------------------------------------------- /doc/Example_input/Region_files/AMOEBAQMMM_reg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_method: HF 4 | QM_basis: 6-31G* 5 | QM_memory: 1 GB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: AMOEBA 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | Pseudobond_atoms: 0 14 | Boundary_atoms: 0 15 | Frozen_atoms: 0 16 | 17 | -------------------------------------------------------------------------------- /doc/Example_input/Region_files/QMMMOpt_reg.inp: -------------------------------------------------------------------------------- 1 | Potential_Type: QMMM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 2 GB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: DFP 11 | Opt_stepsize: 1.00 12 | Max_stepsize: 0.10 13 | QM_opt_tolerance: 1e-4 14 | MM_opt_tolerance: 1e-2 15 | Max_opt_steps: 400 16 | QM_atoms: 3 17 | 3 4 5 18 | Pseudobond_atoms: 0 19 | Boundary_atoms: 0 20 | Frozen_atoms: 0 21 | -------------------------------------------------------------------------------- /doc/Example_input/Region_files/QMMMPIMC_reg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: PSI4 3 | QM_method: PBE0-D 4 | QM_basis: 6-31++G** 5 | QM_memory: 2000 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: PIMC 11 | Ensemble: NVT 12 | Temperature: 300.0 13 | Pressure: 0.0 14 | Eq_steps: 1000 15 | Prod_steps: 1000 16 | Beads: 4 17 | Acceptance_ratio: 0.35 18 | Print_steps: 10 19 | QM_atoms: 3 20 | 0 1 2 21 | Pseudobond_atoms: 0 22 | Boundary_atoms: 0 23 | Frozen_atoms: 0 24 | -------------------------------------------------------------------------------- /doc/Example_input/Region_files/QMOpt_reg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0-D 4 | QM_basis: 6-31++G** 5 | QM_memory: 2 GB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: Opt 9 | Max_stepsize: 0.10 10 | MM_opt_tolerance: 1e-2 11 | Max_Opt_Steps: 200 12 | QM_atoms: 0 13 | Pseudobond_atoms: 0 14 | Boundary_atoms: 0 15 | Frozen_atoms: 0 16 | -------------------------------------------------------------------------------- /doc/Example_input/TINKER_files/tinker.key: -------------------------------------------------------------------------------- 1 | parameters amber99_MOD.prm 2 | -------------------------------------------------------------------------------- /doc/KNOWNISSUES: -------------------------------------------------------------------------------- 1 | General: 2 | -Post-HF methods are currently only implemented in PSI4 and semiempirical 3 | methods are currently only implemented in Gaussian. 4 | 5 | NWChem interface: 6 | -NWChem calculations can only be performed with DFT. Wavefunction based 7 | methods are not implemented. 8 | -Optimizations with the native NWChem optimizer (Calculation_type: Opt) cannot 9 | be performed. However, optimizations can be performed with the LICHEM 10 | optimizers. Pure QM optimizations within NWChem will be implemented in the 11 | future. 12 | 13 | TINKER interface: 14 | -Chiral atoms with multipoles have not been thoroughly tested in QMMM 15 | simulations. 16 | 17 | LAMMPS interface: 18 | -The LAMMPS wrapper is still in the early stages of development. 19 | 20 | PIMC: 21 | -NPT Monte Carlo has a volume change bug. This is being investigated, but 22 | NPT MC is low priority. 23 | 24 | Manual: 25 | -The theory sections need citations. 26 | -Better descriptions of the simulations methods should be given (i.e. DFP vs 27 | Opt). 28 | -The theory for path-integral calculations needs to be documented. 29 | 30 | -------------------------------------------------------------------------------- /doc/images/LICHEM_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/LICHEM_logo.png -------------------------------------------------------------------------------- /doc/images/QMMM_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/QMMM_1.png -------------------------------------------------------------------------------- /doc/images/QMMM_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/QMMM_2.png -------------------------------------------------------------------------------- /doc/images/QMMM_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/QMMM_3.png -------------------------------------------------------------------------------- /doc/images/dimer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/dimer.png -------------------------------------------------------------------------------- /doc/images/trimer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/doc/images/trimer.png -------------------------------------------------------------------------------- /include/LICHEM_Hermite.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | LICHEM classes for calculating Hermite Gaussian integrals. 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_HERMITE_HEADERS 19 | #define LICHEM_HERMITE_HEADERS 20 | 21 | //Gaussian basis set classes 22 | class HermGau 23 | { 24 | //Class for Hermite Gaussians 25 | private: 26 | //Gaussian properties 27 | double mag_; //Coefficient in front of the Gaussian 28 | double alpha_; //Exponent (width) 29 | int powX_; //Power in the x direction 30 | int powY_; //Power in the y direction 31 | int powZ_; //Power in the z direction 32 | //Position 33 | double x_; //X position in Angstroms 34 | double y_; //Y position in Angstroms 35 | double z_; //Z position in Angstroms 36 | public: 37 | //Constructor 38 | HermGau(double,double,int,int,int,double,double,double); 39 | //Destructor 40 | ~HermGau(); 41 | //Functions to return private data 42 | double coeff(); //Return the coefficient (magnitude) 43 | double xPos(); //Return the x position 44 | double yPos(); //Return the y position 45 | double zPos(); //Return the z position 46 | double getAlpha(); //Return the Gaussian width 47 | int xPow(); //Return the Hermite power in the x direction 48 | int yPow(); //Return the Hermite power in the y direction 49 | int zPow(); //Return the Hermite power in the z direction 50 | //Functions for calculations 51 | double value(double,double,double); //Return the magnitude at (x,y,z) 52 | }; 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /include/LICHEM_clibs.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | Standard C++ headers used in LICHEMi 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_CLIBS 19 | #define LICHEM_CLIBS 20 | 21 | //Header files for parallelization 22 | #ifdef _OPENMP 23 | //Use OpenMP 24 | #pragma message("OpenMP is enabled.") 25 | #include 26 | #else 27 | #pragma message("OpenMP is disabled.") 28 | #endif 29 | #ifdef _OPENACC 30 | //Use OpenMP 31 | #pragma message("OpenACC is enabled.") 32 | #include 33 | #else 34 | #pragma message("OpenACC is disabled.") 35 | #endif 36 | 37 | //General header files 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | //Start: Hatice GOKCAN 52 | //End: Hatice GOKCAN 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /include/LICHEM_constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | Physical constants used in LICHEM. 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_CONST 19 | #define LICHEM_CONST 20 | 21 | //Namespace for constants 22 | namespace LICHEMConst 23 | { 24 | //Global exact constants 25 | const double pi = 4*atan(1); //Pi 26 | const double hugeNum = 1e50; //Large number to reject step 27 | const double fs2s = 1e-12; //Convert fs to s 28 | const double m2Ang = 1.0e10; //Angstroms to meters 29 | const double atm2Pa = 1.01325e5; //Atmospheres to Pascal 30 | 31 | //Global measured constants (NIST, CODATA 2010) 32 | const double epsZero = 8.54187817e-12; //Electric constant 33 | const double hbar = 6.58211928e-16; //Reduced Planck Constant (eV) 34 | const double kBoltz = 8.6173324e-5; //Boltzmann constant (eV) 35 | const double amu2kg = 1.660538921e-27; //Atomic mass units to kg 36 | const double SI2eV = 1/(1.602176565e-19); //Convert SI to eV 37 | const double elecMassSI = 9.10938291e-31; //Mass of an electron (kg) 38 | const double bohrRad = 0.52917721092; //Bohr radius (Ang) 39 | const double har2eV = 27.21138505; //Hartrees to eV 40 | const double avogNum = 6.02214129e23; //Avogadro's number 41 | const double debye2au = 0.393430307; //Convert from Debye to au 42 | const double har2Wavenum = 2.194746313702e5; //Convert a.u. to cm^-1 43 | 44 | //Global derived constants 45 | const double atm2eV = SI2eV*atm2Pa/(m2Ang*m2Ang*m2Ang); //atmA^3 to eV 46 | const double coul2eV = m2Ang/(4*pi*SI2eV*epsZero); //Coulomb to eV 47 | const double elecMass = elecMassSI/amu2kg; //Mass of an electron (amu) 48 | const double toeV = amu2kg*SI2eV/(m2Ang*m2Ang); //Convert to eV units (PIMC) 49 | const double kcal2eV = 4184*SI2eV/avogNum; //kcal/mol to eV 50 | const double au2kcal = 627.51; // au to kcal/mol 51 | }; 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /include/LICHEM_globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | Global variables used in LICHEM. 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_GLOBALS 19 | #define LICHEM_GLOBALS 20 | 21 | //Namespace for global variables 22 | namespace LICHEMGlobal 23 | { 24 | //Global variables 25 | int globalSys = 0; //Global dummy return for all system calls 26 | string xyzFilename; //Saves a filename given in the arguments 27 | string conFilename; //Saves a filename given in the arguments 28 | string regFilename; //Saves a filename given in the arguments 29 | int Nthreads = 1; //Total number of threads available 30 | int Ncpus = 1; //Number of processors for QM calculations 31 | int Nfreeze = 0; //Number of frozen atoms 32 | int Npseudo = 0; //Number of pseudo-bonds 33 | int Nbound = 0; //Number of boundary-atoms 34 | int Natoms = 0; //Total number of atoms 35 | int Nqm = 0; //Number of QM atoms 36 | int Nmm = 0; //Number of MM atoms 37 | double mcStep = 2*stepMin; //Monte Carlo step size 38 | double Lx = 10000.0; //Box length 39 | double Ly = 10000.0; //Box length 40 | double Lz = 10000.0; //Box length 41 | 42 | //Flags for simulation options 43 | bool GEM = 0; //Flag for frozen density QMMM potential 44 | bool AMOEBA = 0; //Flag for polarizable QMMM potential 45 | bool CHRG = 0; //Flag for point-charge QMMM potential 46 | bool PSI4 = 0; //Wrapper flag 47 | bool NWChem = 0; //Wrapper flag 48 | bool Gaussian = 0; //Wrapper flag 49 | bool TINKER = 0; //Wrapper flag 50 | bool LAMMPS = 0; //Wrapper flag 51 | bool PBCon = 0; //Flag for the boundary conditions 52 | bool QMMM = 0; //Flag for the type of wrapper 53 | bool MMonly = 0; //Flag for the type of wrapper 54 | bool QMonly = 0; //Flag for the type of wrapper 55 | bool OptSim = 0; //Flag for energy minimization with QM packages 56 | bool SteepSim = 0; //Flag for steepest descent minimization in LICHEM 57 | bool DFPSim = 0; //Flag for DFP minimization in LICHEM 58 | bool NEBSim = 0; //Flag for NEB path optimization in LICHEM 59 | bool PIMCSim = 0; //Flag for Monte Carlo 60 | bool FBNEBSim = 0; //Flag for force-bias NEB Monte Carlo 61 | bool FreqCalc = 0; //Flag for a frequency calculation 62 | bool SinglePoint = 0; //Flag for energy calculation 63 | bool GauExternal = 0; //Runs Gaussian with External 64 | //Start: Hatice 65 | bool QSMSim = 0; //Flag for QSM path optimization in LICHEM 66 | bool g09 = 0; //Wrapper flag 67 | //End: Hatice 68 | 69 | //Timers 70 | int startTime = 0; //Time the calculation starts 71 | int endTime = 0; //Time the calculation ends 72 | int QMTime = 0; //Sum of QM wrapper times 73 | int MMTime = 0; //Sum of MM wrapper times 74 | }; 75 | 76 | #endif 77 | 78 | -------------------------------------------------------------------------------- /include/LICHEM_matrix.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | Matrix headers and libraries used in LICHEM. 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_MATRIX 19 | #define LICHEM_MATRIX 20 | 21 | //Header files 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /include/LICHEM_options.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | Compile time options for LICHEM. 14 | 15 | */ 16 | 17 | //Make including safe 18 | #ifndef LICHEM_OPTS 19 | #define LICHEM_OPTS 20 | 21 | namespace LICHEMOpts 22 | { 23 | //Compile options 24 | const bool JOKES = 1; //Print humorous comments 25 | 26 | //Monte Carlo options 27 | const bool isotrop = 1; //Force isotropic expansion in NPT Monte Carlo 28 | const double stepMin = 0.005; //Minimum Monte Carlo step size (Angstroms) 29 | const double stepMax = 1.0; //Maximum Monte Carlo step size (Angstroms) 30 | const double centRatio = 5.0; //Scales step size for path-integral centroids 31 | const int acc_Check = 2000; //Eq. Monte Carlo steps before checking accratio 32 | 33 | //Move Probabilities for PIMC 34 | /* 35 | 36 | NB: The Monte Carlo engine allows for multi-particle moves: 37 | 38 | If (BeadProb+CentProb) > 1) then there is a chance that multiple particles 39 | move during a step. 40 | 41 | If (BeadProb+CentProb) < 1) then there is a chance that no prarticles move 42 | during a step. 43 | 44 | If (VolProb > 0) and the simulation is not periodic, then VolProb does 45 | nothing. 46 | 47 | If the simulation is periodic, multi-particle moves will be common since 48 | changing the box size moves all particles. 49 | 50 | */ 51 | double beadProb = 0.60; //Probability to move all beads for an atom 52 | double centProb = 0.50; //Probability to move a centroid 53 | double volProb = 0.35; //Volume change probability 54 | }; 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/Basis_sets.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | 14 | Compiled databases for looking up Cartesian or Hermite Gaussian basis sets 15 | 16 | Reference for basis sets: 17 | 18 | 19 | */ 20 | 21 | //Basis set definitions 22 | vector HermBasis(string Typ, string basName) 23 | { 24 | //Function to set specific Hermite basis sets 25 | bool badBasis = 0; //Flag to exit if no basis set is found 26 | vector newBasis; 27 | //NB: Organized by basis name, then element 28 | 29 | //Check for errors 30 | if (badBasis) 31 | { 32 | cerr << "Error: Basis set " << basName; 33 | cerr << " is not defined for atom " << Typ; 34 | cerr << "!!!" << '\n' << '\n'; 35 | cerr.flush(); 36 | exit(0); 37 | } 38 | //Return basis set if it was found in the database 39 | return newBasis; 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /src/Frozen_density.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | 14 | LICHEM wrapper functions for frozen density QMMM calculations using the 15 | Gaussian electrostatic model (GEM) or similar potentials 16 | 17 | Reference for GEM: 18 | 19 | 20 | Reference for conversion to point-charges: 21 | Stone, The Theory of Intermolecular Forces, (2013) 22 | Devereux et al., J. Chem. Theory Comp., 10, 10, 4229, (2014) 23 | Gao et al., Chem. Phys. Lett., 593, 165, (2014) 24 | 25 | */ 26 | 27 | //GEM utility functions 28 | double GEMC6(double C6, Coord& POSi, Coord& POSj, double Rcut) 29 | { 30 | //Function to calculate the LJ style dispersion 31 | double Eij = 0; //Dispersion energy 32 | double Rij6 = 0; //Distance between atoms 33 | //Calculate distance 34 | Rij6 = CoordDist2(POSi,POSj).vecMag(); //Rij^2 35 | //Check cutoff 36 | if (Rij6 <= (Rcut*Rcut)) 37 | { 38 | //Update energy 39 | Rij6 *= Rij6*Rij6; //Rij^6 40 | Eij -= C6/Rij6; //Dispersion energy 41 | } 42 | //Return energy 43 | return Eij; 44 | }; 45 | 46 | double GEMBuffC7(double C7, double Rmin, Coord& POSi, Coord& POSj, 47 | double Rcut) 48 | { 49 | //Function to calculate buffered 14-7 style dispersion 50 | const double A7 = -2*pow(1.07,7); //Part of C7 from the 14-7 shift 51 | double Eij = 0; //Dispersion energy 52 | double Rij = 0; //Distance between atoms 53 | //Calculate distance 54 | Rij = CoordDist2(POSi,POSj).vecMag(); //Rij^2 55 | //Check cutoff 56 | if (Rij <= (Rcut*Rcut)) 57 | { 58 | //Update energy 59 | double Rij7; 60 | Rij = sqrt(Rij); //Rij 61 | Rij /= Rmin; //Scale distance 62 | Rij += 0.07; //Add shift factor 63 | Rij7 = Rij*Rij*Rij; //Shifted Rij^3 64 | Rij7 *= Rij7*Rij; //Shifted Rij^7 65 | Eij = (A7*C7)/Rij7; //Dispersion energy 66 | } 67 | //Return energy 68 | return Eij; 69 | }; 70 | 71 | //Functions to calculate GEM energy 72 | 73 | -------------------------------------------------------------------------------- /src/LAMMPS2LICHEM.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ############################################################################### 4 | # # 5 | # LICHEM: Layered Interacting CHEmical Models # 6 | # By: Eric G. Kratz, Hatice Gokcan, Alice Walker, # 7 | # Erik Montelongo Vazquez, G. Andres Cisneros # 8 | # # 9 | # Symbiotic Computational Chemistry # 10 | # # 11 | ############################################################################### 12 | 13 | 14 | Functions to convert LAMMPS files to LICHEM format 15 | 16 | Reference for LAMMPS: 17 | Plimpton, Steve, J. Comp. Phys., 1, 117, 1, (1995) 18 | 19 | */ 20 | 21 | //Parsers 22 | 23 | -------------------------------------------------------------------------------- /src/manual/load_balance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/src/manual/load_balance.pdf -------------------------------------------------------------------------------- /src/manual/qsm_flowchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CisnerosResearch/LICHEM/ec733f082e4fdf40122da0f179a39594462d1deb/src/manual/qsm_flowchart.pdf -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/.goutputstream-UPRIQZ: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/hfreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: HF 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: LAMMPS 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/pm6reg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: SemiEmp 4 | QM_basis: PM6 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/Gau_LAMMPS/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/alkcon.inp: -------------------------------------------------------------------------------- 1 | 0 C 1 12.011 -0.1800 4 1 2 3 4 2 | 1 H 2 1.008 0.0600 1 0 3 | 2 H 2 1.008 0.0600 1 0 4 | 3 H 2 1.008 0.0600 1 0 5 | 4 C 3 12.011 0.0000 2 0 5 6 | 5 C 3 12.011 0.0000 2 4 6 7 | 6 C 1 12.011 -0.1800 4 5 7 8 9 8 | 7 H 2 1.008 0.0600 1 6 9 | 8 H 2 1.008 0.0600 1 6 10 | 9 H 2 1.008 0.0600 1 6 11 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/alkyl.xyz: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | C -2.8080576093800 1.22184282309523 -0.0016157557464 4 | H -3.3809661732000 2.03753738220000 0.44896891070000 5 | H -3.1231855277000 1.13157532040000 -1.0452369882999 6 | H -3.0877055484999 0.29684242650000 0.51099604270000 7 | C -1.4015638364429 1.46227725415637 0.09528345141635 8 | C -0.2291416490229 1.66277368076100 0.17609826610453 9 | C 1.17731270517488 1.90338465362212 0.27309746376223 10 | H 1.44829001679999 2.85765911209999 -0.1879152969000 11 | H 1.50239297180000 1.93469179129999 1.31710092500000 12 | H 1.74886371749999 1.11759090300000 -0.2293462184000 13 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/hfreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: HF 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/mmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: Charges 4 | Calculation_type: SP 5 | 6 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pbbasis.txt: -------------------------------------------------------------------------------- 1 | 2 3 0 2 | 6-31G* 3 | **** 4 | 1 4 0 STO-2G 5 | SP 2 1.00 6 | 0.9034 1.00 1.00 7 | 0.21310 1.90904 0.57864 8 | **** 9 | 10 | 1 4 0 11 | try1 1 2 12 | S Component 13 | 1 14 | 1 7.75 16.49 15 | P 16 | 1 17 | 1 1.0 0.0 18 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pbopt.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/Alkyl.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pboptreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: GEN 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: DFP 11 | Opt_stepsize: 1.00 12 | Max_stepsize: 0.10 13 | QM_opt_tolerance: 5e-4 14 | MM_opt_tolerance: 1e-2 15 | Max_opt_steps: 10 16 | QM_atoms: 2 17 | 4 5 18 | Pseudobond_atoms: 2 19 | 0 6 20 | Boundary_atoms: 6 21 | 1 2 3 7 8 9 22 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pchrg.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/TIP3P99.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pm6reg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: SemiEmp 4 | QM_basis: PM6 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/pol.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/AMOEBA14.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/polreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: AMOEBA 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: Gaussian 3 | QM_method: PBE1PBE 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/solvreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: AMOEBA 4 | Calculation_type: SP 5 | Use_solvent: Yes 6 | Solv_model: GK 7 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/Gau_TINKER/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: LAMMPS 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/NWChem_LAMMPS/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/.goutputstream-919NQZ: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/.goutputstream-EOCLQZ: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/alkcon.inp: -------------------------------------------------------------------------------- 1 | 0 C 1 12.011 -0.1800 4 1 2 3 4 2 | 1 H 2 1.008 0.0600 1 0 3 | 2 H 2 1.008 0.0600 1 0 4 | 3 H 2 1.008 0.0600 1 0 5 | 4 C 3 12.011 0.0000 2 0 5 6 | 5 C 3 12.011 0.0000 2 4 6 7 | 6 C 1 12.011 -0.1800 4 5 7 8 9 8 | 7 H 2 1.008 0.0600 1 6 9 | 8 H 2 1.008 0.0600 1 6 10 | 9 H 2 1.008 0.0600 1 6 11 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/alkyl.xyz: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | C -2.7997419912139 1.22325960929717 -0.0010453080264 4 | H -3.3736189220999 2.03863340920000 0.44938965380000 5 | H -3.1158267856999 1.13281899369999 -1.0445775953000 6 | H -3.0803535605999 0.29821845180000 0.51140461190000 7 | C -1.4013679732035 1.46233235416215 0.09530925960475 8 | C -0.2293955536610 1.66275142521655 0.17609346964712 9 | C 1.16893498205719 1.90194598996288 0.27251655140035 10 | H 1.44089703320000 2.85623929270000 -0.1883679568000 11 | H 1.49498956430000 1.93340786229999 1.31642812540000 12 | H 1.74137229499999 1.11642428300000 -0.2297901558000 13 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/mmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: Charges 4 | Calculation_type: SP 5 | 6 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pbbasis.txt: -------------------------------------------------------------------------------- 1 | basis 2 | * library 6-31G* except F2pb 3 | F2pb SP 4 | 0.90340 1.00000 1.00000 5 | 0.21310 1.90904 0.57864 6 | end 7 | ecp 8 | F2pb nelec 2 9 | F2pb ul 10 | 1 7.75 16.49 11 | end 12 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pbopt.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/Alkyl.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pboptreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: GEN 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: DFP 11 | Opt_stepsize: 1.00 12 | Max_stepsize: 0.10 13 | QM_opt_tolerance: 5e-4 14 | MM_opt_tolerance: 1e-2 15 | Max_opt_steps: 10 16 | QM_atoms: 2 17 | 4 5 18 | Pseudobond_atoms: 2 19 | 0 6 20 | Boundary_atoms: 6 21 | 1 2 3 7 8 9 22 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pchrg.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/TIP3P99.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/pol.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/AMOEBA14.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/polreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: AMOEBA 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: NWChem 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/solvreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: AMOEBA 4 | Calculation_type: SP 5 | Use_solvent: Yes 6 | Solv_model: GK 7 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/NWChem_TINKER/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/ccsdreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: CCSD 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/hfreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: HF 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: LAMMPS 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/PSI4_LAMMPS/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/.goutputstream-9G56PZ: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/.goutputstream-I0EAQZ: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/ccsdreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: CCSD 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/freqreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: Freq 9 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/hfreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: HF 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/methflbeads.xyz: -------------------------------------------------------------------------------- 1 | 18 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | F -2.6995430880980 -0.0066927924993 -0.2996097568979 10 | C -0.9460829911988 0.14527902747821 -0.0185659177105 11 | H -1.1257864999572 0.96621739416878 0.65866327420300 12 | H -0.9183393707864 -0.8667275434968 0.35551391841561 13 | H -0.7941329945437 0.33633103355310 -1.0698880157036 14 | F 0.80736439343123 0.29722391110275 0.26248385760988 15 | F -2.9440697509561 -0.0281525314020 -0.3391382383344 16 | C -0.6053137123374 0.17488541785397 0.03613831570002 17 | H -1.1473924939935 0.91787105252153 0.61613055525003 18 | H -0.9507205039454 -0.8133588832346 0.32991732611237 19 | H -0.8339491564708 0.32268717773647 -1.0165219292607 20 | F 0.80492459942297 0.29769386293468 0.26207752395536 21 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/methflcon.inp: -------------------------------------------------------------------------------- 1 | 0 F 1 18.998 0.0 0 2 | 1 C 2 12.011 0.0 0 3 | 2 H 3 1.0080 0.0 0 4 | 3 H 3 1.0080 0.0 0 5 | 4 H 3 1.0080 0.0 0 6 | 5 F 1 18.998 0.0 0 7 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/methfluor.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | F -2.6971074078726 -0.0068295917015 -0.2992353956099 4 | C -1.2868769331626 0.11573031295159 -0.0730917200317 5 | H -1.0848909399193 0.92347715668206 0.62619206588462 6 | H -0.8885421586957 -0.8077698717248 0.34004957588181 7 | H -0.7710734190392 0.32837279571647 -1.0063533446601 8 | F 1.05196874210976 0.31864925794179 0.30104008929491 9 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/mmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: Charges 4 | Calculation_type: SP 5 | 6 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/nebreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: NEB 9 | Beads: 3 10 | Opt_stepsize: 1.00 11 | Max_stepsize: 0.10 12 | Spring_constant: 1.00 13 | Frozen_ends: Yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/pbereg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | Calculation_type: SP 9 | 10 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/pchrg.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/TIP3P99.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/pchrgreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: Charges 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/pol.key: -------------------------------------------------------------------------------- 1 | parameters ../Parameters/AMOEBA14.prm 2 | 3 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/polreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QMMM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: 0 7 | QM_spin: 1 8 | MM_type: TINKER 9 | Electrostatics: AMOEBA 10 | Calculation_type: SP 11 | QM_atoms: 3 12 | 0 1 2 13 | 14 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/qsmreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: QM 2 | QM_type: PSI4 3 | QM_method: PBE0 4 | QM_basis: 6-31G* 5 | QM_memory: 256 MB 6 | QM_charge: -1 7 | QM_spin: 1 8 | Calculation_type: qsm 9 | Beads: 3 10 | nqsm: 0 11 | Frozen_ends: Yes 12 | qm_opt_tolerance: 1e-2 13 | qm_rms_force_tol: 0.025 14 | qm_max_force_tol: 0.05 15 | mm_opt_tolerance: 1e-1 16 | max_opt_steps: 10 17 | max_qm_steps: 10 18 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/solvreg.inp: -------------------------------------------------------------------------------- 1 | Potential_type: MM 2 | MM_type: TINKER 3 | Electrostatics: AMOEBA 4 | Calculation_type: SP 5 | Use_solvent: Yes 6 | Solv_model: GK 7 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/watercon.inp: -------------------------------------------------------------------------------- 1 | 0 O 1 15.995 -0.8340 2 1 2 2 | 1 H 2 1.008 0.4170 1 0 3 | 2 H 2 1.008 0.4170 1 0 4 | 3 O 1 15.995 -0.8340 2 4 5 5 | 4 H 2 1.008 0.4170 1 3 6 | 5 H 2 1.008 0.4170 1 3 7 | -------------------------------------------------------------------------------- /tests/PSI4_TINKER/waterdimer.xyz: -------------------------------------------------------------------------------- 1 | 6 2 | 3 | O 0.87273600000000 0.00000000000000 -1.24675400000000 4 | H 0.28827300000000 0.00000000000000 -2.01085300000000 5 | H 0.28827300000000 0.00000000000000 -0.48265500000000 6 | O -0.7788030000000 0.00000000000000 1.132683000000000 7 | H -0.6666820000000 0.76409900000000 1.706291000000000 8 | H -0.6666820000000 -0.7640990000000 1.706290000000000 9 | -------------------------------------------------------------------------------- /tests/QSM_MPI/BASIS: -------------------------------------------------------------------------------- 1 | 2 3 4 5 6 7 8 10 11 12 13 14 15 16 0 2 | 6-311G* 3 | **** 4 | 1 9 0 STO-2G 5 | SP 2 1.00 6 | 0.9034 1.00 1.00 7 | 0.21310 1.90904 0.57864 8 | **** 9 | 10 | 1 9 0 11 | try1 1 2 12 | S Component 13 | 1 14 | 1 7.75 16.49 15 | P 16 | 1 17 | 1 1.0 0.0 18 | 19 | -------------------------------------------------------------------------------- /tests/QSM_MPI/PBS_submit.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #PBS -N XXX 3 | #PBS -j XXX 4 | #PBS -o XXX 5 | #PBS -q XXX 6 | #PBS -l nodes=5:ppn=YYY,mem=MMM 7 | #PBS -r n 8 | 9 | cd $PBS_O_WORKDIR 10 | 11 | # do not forget to export 12 | # mpi library 13 | 14 | #--------------------------------------------------- 15 | # !!! HOSTLIST !!! 16 | # get hostnames of the nodes 17 | # and prepare host_list for run 18 | cat ${PBS_NODEFILE} > all_hosts 19 | 20 | # replace YYY below, 21 | # with the given ppn value above 22 | # i.e. if 23 | # PBS -l nodes=5:ppn=20,mem=MMM 24 | # then 25 | # /bin/sed -n '1~20p' all_hosts > host_list 26 | /bin/sed -n '1~YYYp' all_hosts > host_list 27 | #--------------------------------------------------- 28 | 29 | #--------------------------------------------------- 30 | # !!! RUN !!! 31 | 32 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 | # !!! WARNING !!! 34 | # !!! please prefer to !!! 35 | # !!! run this test on 5 nodes !!! 36 | # !!! !!! 37 | # !!! number of beads are 7, but !!! 38 | # !!! frozen end. !!! 39 | # !!! number of beads to optimize is 5, thus !!! 40 | # !!! do not use more than 5 nodes !!! 41 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 42 | # 43 | # replace NNN with number of nodes 44 | # replace YYY with ppn value 45 | 46 | mpirun -np 5 --hostfile host_list lichem.MPI -n YYY -x react.xyz -c connect.inp -r regions.inp -o qsm_mpi.xyz -l qsm_mpi.log 47 | 48 | #--------------------------------------------------- 49 | 50 | -------------------------------------------------------------------------------- /tests/QSM_MPI/connect.inp: -------------------------------------------------------------------------------- 1 | 0 H 222 1.008 0.00 1 1 2 | 1 C 221 12.011 0.00 4 0 2 3 4 3 | 2 H 222 1.008 0.00 1 1 4 | 3 H 222 1.008 0.00 1 1 5 | 4 C 223 12.011 0.00 3 1 5 6 6 | 5 O 224 15.999 0.00 1 4 7 | 6 N 7 14.007 0.00 3 4 7 8 8 | 7 H 10 1.008 0.00 1 6 9 | 8 C 8 12.011 0.00 4 6 9 10 17 10 | 9 H 12 1.008 0.00 1 8 11 | 10 C 141 12.011 0.00 4 8 11 12 13 12 | 11 H 142 1.008 0.00 1 10 13 | 12 H 142 1.008 0.00 1 10 14 | 13 C 143 12.011 0.00 3 10 14 15 15 | 14 O 144 15.999 0.00 1 13 16 | 15 O 145 15.999 0.00 2 13 16 17 | 16 H 146 1.008 0.00 1 15 18 | 17 C 9 12.011 0.00 3 8 18 19 19 | 18 O 11 15.999 0.00 1 17 20 | 19 N 227 14.007 0.00 3 17 20 21 21 | 20 H 228 1.008 0.00 1 19 22 | 21 C 229 12.011 0.00 4 19 22 23 24 23 | 22 H 230 1.008 0.00 1 21 24 | 23 H 230 1.008 0.00 1 21 25 | 24 H 230 1.008 0.00 1 21 26 | 25 H 222 1.008 0.00 1 26 27 | 26 C 221 12.011 0.00 4 25 27 28 29 28 | 27 H 222 1.008 0.00 1 26 29 | 28 H 222 1.008 0.00 1 26 30 | 29 C 223 12.011 0.00 3 26 30 31 31 | 30 O 224 15.999 0.00 1 29 32 | 31 N 7 14.007 0.00 3 29 32 33 33 | 32 H 10 1.008 0.00 1 31 34 | 33 C 8 12.011 0.00 4 31 34 35 42 35 | 34 H 12 1.008 0.00 1 33 36 | 35 C 141 12.011 0.00 4 33 36 37 38 37 | 36 H 142 1.008 0.00 1 35 38 | 37 H 142 1.008 0.00 1 35 39 | 38 C 143 12.011 0.00 3 35 39 40 40 | 39 O 144 15.999 0.00 1 38 41 | 40 O 145 15.999 0.00 2 38 41 42 | 41 H 146 1.008 0.00 1 40 43 | 42 C 9 12.011 0.00 3 33 43 44 44 | 43 O 11 15.999 0.00 1 42 45 | 44 N 227 14.007 0.00 3 42 45 46 46 | 45 H 228 1.008 0.00 1 44 47 | 46 C 229 12.011 0.00 4 44 47 48 49 48 | 47 H 230 1.008 0.00 1 46 49 | 48 H 230 1.008 0.00 1 46 50 | 49 H 230 1.008 0.00 1 46 51 | -------------------------------------------------------------------------------- /tests/QSM_MPI/react.xyz: -------------------------------------------------------------------------------- 1 | 50 2 | 3 | H 36.70927554 38.57214654 39.01366168 4 | C 37.39832132 38.77982802 38.19637352 5 | H 36.82423206 38.97247437 37.28444842 6 | H 38.03135591 37.90489042 38.02322387 7 | C 38.23319477 39.98713693 38.56115288 8 | O 38.09068633 40.59715205 39.61724069 9 | N 39.15904063 40.35990882 37.64619303 10 | H 39.19088704 39.89083233 36.73049648 11 | C 40.06487365 41.49733838 37.81930119 12 | H 40.33205961 41.60059338 38.90221515 13 | C 41.31330493 41.30334154 37.01791796 14 | H 41.13829064 41.07915166 35.96149957 15 | H 41.95906813 42.19159664 37.03484783 16 | C 42.24139874 40.23486214 37.51688127 17 | O 43.11459228 39.85139528 36.62329605 18 | O 42.19396255 39.81666412 38.66133260 19 | H 43.38966248 39.11362783 39.48330441 20 | C 39.34260859 42.79186431 37.44678657 21 | O 39.59054855 43.37871696 36.39524366 22 | N 38.40805029 43.21553322 38.33408607 23 | H 38.18864181 42.58011770 39.09518070 24 | C 37.59735828 44.39740121 38.12383028 25 | H 37.35862826 44.84940397 39.08845418 26 | H 38.16302741 45.10876521 37.52073945 27 | H 36.66529208 44.16149089 37.59851953 28 | H 49.18939544 39.13637072 35.93087397 29 | C 48.69070120 39.92413479 36.50371563 30 | H 47.71216166 40.10706237 36.05077228 31 | H 49.29051768 40.83191995 36.45719858 32 | C 48.55490951 39.50606476 37.95002081 33 | O 49.15107053 40.07559498 38.86301600 34 | N 47.70176132 38.48391743 38.19008064 35 | H 47.21954560 38.02167543 37.40642020 36 | C 47.39055213 37.97403087 39.52508884 37 | H 47.35741416 38.83536833 40.24034242 38 | C 46.04640918 37.27028640 39.56980533 39 | H 46.06513828 36.37021393 38.95228112 40 | H 45.78097318 37.01881274 40.59437321 41 | C 44.90047826 38.08145492 39.01707776 42 | O 44.13984908 38.62793738 39.92231528 43 | O 44.74273543 38.20736917 37.81035637 44 | H 43.73337434 39.19013488 37.03862621 45 | C 48.51116857 37.05316162 40.02048560 46 | O 48.35820355 35.83348275 40.06107138 47 | N 49.66332519 37.66746833 40.39073187 48 | H 49.72583551 38.65795440 40.17270800 49 | C 50.83343089 36.95984714 40.86873822 50 | H 51.02800550 37.18799295 41.92140363 51 | H 50.65471327 35.88872791 40.76881932 52 | H 51.70992602 37.23745399 40.27731164 53 | -------------------------------------------------------------------------------- /tests/QSM_MPI/regions.inp: -------------------------------------------------------------------------------- 1 | potential_type: qmmm 2 | qm_type: g16 3 | qm_method: HF 4 | qm_basis: GEN 5 | qm_memory: 80 GB 6 | qm_charge: 0 7 | qm_spin: 1 8 | mm_type: TINKER 9 | electrostatics: AMOEBA 10 | calculation_type: qsm 11 | beads: 7 12 | nqsm: 0 13 | frozen_ends: yes 14 | qm_opt_tolerance: 1e-2 15 | qm_rms_force_tol: 0.025 16 | qm_max_force_tol: 0.05 17 | mm_opt_tolerance: 1e-1 18 | max_opt_steps: 10 19 | max_qm_steps: 10 20 | pbc: no 21 | keep_files: yes 22 | debug: yes 23 | ts_freq: yes 24 | neb_atoms: 6 25 | 14 15 16 39 40 41 26 | qm_atoms: 14 27 | 10 11 12 13 14 15 16 35 36 37 28 | 38 39 40 41 29 | pseudobond_atoms: 2 30 | 8 33 31 | boundary_atoms: 10 32 | 6 7 9 17 18 31 32 34 42 43 33 | frozen_atoms: 24 34 | 0 1 2 3 4 5 19 20 21 22 35 | 23 24 25 26 27 28 29 30 44 45 36 | 46 47 48 49 37 | -------------------------------------------------------------------------------- /tests/QSM_MPI/tinker.key: -------------------------------------------------------------------------------- 1 | parameters amoebapro13.prm 2 | -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | 2 | [//]: # (Mixture of GitHub markdown and HTML. HTML is needed for formatting.) 3 | 4 | *** 5 |

6 | LICHEM: Layered Interacting CHEmical Models 7 |

8 | 9 |

By: Eric G. Kratz, Hatice Gokcan, Alice Walker, Erik Montelongo Vazquez, G. Andres Cisneros

10 | 11 |

Symbiotic Computational Chemistry

12 | *** 13 | 14 | ### LICHEM: A QMMM interface for polarizable force fields 15 | 16 | ### Test suite 17 | 18 | This directory contains calculations for testing the LICHEM wrappers, 19 | efficiency, and accuracy. 20 | 21 | Tests can be performed for pairs of QM and MM wrappers, 22 | ``` 23 | user:$ ./runtests Ncpus QMPackage MMPackage 24 | ``` 25 | or all wrappers at once, 26 | ``` 27 | user:$ ./runtests Ncpus All 28 | ``` 29 | 30 | Additionally, a dry run can be performed to check packages without perfoming 31 | the calculations. 32 | ``` 33 | user:$ ./runtests Ncpus QMPackage MMPackage Dry 34 | ``` 35 | 36 | If tests are consistently failing, please post details on the GitHub issues 37 | section. 38 | 39 | ### Notes 40 | 41 | The test suite prints run times for the tests. Since LICHEM has different 42 | settings for different wrappers, the times only represent the efficiency of 43 | the wrappers. The run times are not for the comparison of the efficiency of 44 | different packages. 45 | 46 | The test suite is not compatable with python 3.0 or higher. 47 | 48 | ###Tests 49 | 50 | [//]: # (Table entries cannot have newlines) 51 | 52 | | Test | Description | QM | MM | 53 | | :--- | :--- | :---: | :---: | 54 | | HF energy | Hartree-Fock energy calculated using only the QM wrapper. | PSI4,Gaussian | N/A | 55 | | PBE0 energy | Density functional theory energy calculated using only the QM wrapper. | PSI4,Gaussian,NWChem | N/A | 56 | | CCSD energy | Coupled-cluster energy calculated using only the QM wrapper. | PSI4 | N/A | 57 | | PM6 energy | Semi-empirical energy calculated using only the QM wrapper. | Gaussian | N/A | 58 | | Frequencies | Harmonic frequencies using only the QM wrapper. | PSI4,Gaussian,NWChem | N/A | 59 | | NEB TS energy | Nudged elastic band optimization using only the QM wrapper. | PSI4,Gaussian,NWChem | N/A | 60 | | QSM TS energy | Quadratic string method optimization using only the QM wrapper. | PSI4,Gaussian,NWChem | N/A | 61 | | TIP3P energy | MM energy of the water dimer with the TIP3P model. | N/A | TINKER | 62 | | AMOEBA/GK energy | MM energy of the water dimer in the generalized Kirkwood implicit solvent. | N/A | TINKER | 63 | | PBE0/TIP3P energy | QMMM energy of a water dimer calculated with PBE0 and TIP3P. | PSI4,Gaussian,NWChem | TINKER | 64 | | PBE0/AMOEBA energy | Polarizable QMMM energy of a water dimer calculated with PBE0 and AMOEBA. | PSI4,Gaussian,NWChem | TINKER | 65 | | DFP/Pseudobonds | QMMM Davidon-Fletcher-Powell optimization of 2-Butyne with the two methyl groups replaced by pseudobond/boundary atoms. | Gaussian,NWChem | TINKER | 66 | 67 | --------------------------------------------------------------------------------