Giter Site home page Giter Site logo

qcscine / sparrow Goto Github PK

View Code? Open in Web Editor NEW
74.0 10.0 14.0 59.61 MB

Home Page: https://scine.ethz.ch

License: BSD 3-Clause "New" or "Revised" License

CMake 0.02% TeX 0.04% C++ 99.84% Python 0.09% Mathematica 0.01% C 0.01%
chemistry computational-chemistry quantum-chemistry

sparrow's People

Contributors

reiher-research-group avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparrow's Issues

Non-symmetric Hessian matrix

I'm getting a Hessian matrix that deviates from symmetric more than I'd consider healthy. Is this reasonable? If the accuracy is worse than 1e-6 (is it using single precision?), maybe the values should be reported accordingly?

Note e.g. the elements 1,2 and 2,1:

2.923406e-06 != -1.248019e-15

   2

 O     0.00000000     0.00000000     0.32845461
 H    -0.80293794     0.00000000    -0.16422730
Program call:  sparrow -x OH.xyz -c -1 -G -H -N
Method:                  PM6
Calculation Modus:       Spin-restricted formalism
Molecular charge:        -1
Spin multiplicity:       1
Convergence threshold:   1e-05 hartree
Max Iterations:          100
Convergence accelerator: diis
Parameters:             Resources/Pm6/parameters.xml

================================================================================
Calculation: 

Energy [hartree]:
-11.19363863

Gradients [hartree/bohr]:
                        1              2              3
         1   2.274519e-02   4.978353e-17   1.395642e-02
         2  -2.274519e-02  -4.978353e-17  -1.395642e-02


Hessian [hartree/bohr^2]:
                        1              2              3              4              5
         1   1.518872e-01   2.923406e-06   8.374429e-02  -1.518657e-01   2.923406e-06
         2  -1.248019e-15   1.539823e-02  -5.442137e-15   1.818960e-16  -1.539823e-02
         3   8.373304e-02   1.793799e-06   6.678640e-02  -8.371946e-02   1.793799e-06
         4  -1.518872e-01  -2.923406e-06  -8.374429e-02   1.518657e-01  -2.923406e-06
         5   1.248019e-15  -1.539823e-02   5.442137e-15  -1.818960e-16   1.539823e-02
         6  -8.373304e-02  -1.793799e-06  -6.678640e-02   8.371946e-02  -1.793799e-06

                        6
         1  -8.372811e-02
         2   2.881844e-15
         3  -6.678190e-02
         4   8.372811e-02
         5  -2.881844e-15
         6   6.678190e-02

================================================================================

Total job duration: 1026 milliseconds.

End: Tue Dec 17 16:41:42 2019

Sparrow Build Failure due to unlinked yaml-cpp

Dear Rehier Group,

Thanks for helping earlier with Utilities. I've been debugging and reached as far as the Sparrow install. The puffin bootstrap has installed Core, Utilities, Readuct and Database but when trying to install Sparrow 5.0.0 it is unable to find yaml-cpp.

yaml-cpp is install as:
$ ls /home/njh80/modulesSource/miniforge3/envs/chemoton/lib/libyaml-cpp.so
libyaml-cpp.so libyaml-cpp.so.0.7 libyaml-cpp.so.0.7.0

I've tried adding the full path to the -RPATH as it suggests by including the cmake flag:
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/"

Any ideas as to what I've done wrong would be very helpful

OS is RedHat CentOS7. Output log is (after installing other packages via python3 -m puffin -c puffin.yaml bootstrap:

Preparing Sparrow...

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Check for working C compiler: /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/cc
-- Check for working C compiler: /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/c++
-- Check for working CXX compiler: /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Scine::UtilsOS found locally at /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/cmake/ScineUtilsOS
Cloning into 'cereal-src'...
Note: switching to 'v1.2.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 51cbda5 Merge branch 'develop' for release 1.2.2
CMake Warning (dev) at build/cereal-src/CMakeLists.txt:2 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The following variable(s) would be set to empty:

PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH

This warning is for project developers. Use -Wno-dev to suppress it.

-- Cereal was not found in your PATH, so it was downloaded.
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found Boost: /home/njh80/modulesSource/miniforge3/envs/chemoton/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: program_options filesystem
-- Found PythonInterp: /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/python3 (found version "3.8.18")
-- Cereal found locally at cereal_DIR-NOTFOUND
-- Targets to copy for python bindings: Sparrow;Scine::UtilsOS
-- Found PY_sphinx: /home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/sphinx
-- Configuring done
-- Generating done
-- Build files have been written to: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/build/sparrow/build
Scanning dependencies of target SparrowApp
[ 1%] Building CXX object src/Sparrow/CMakeFiles/SparrowApp.dir/App/CalculationHandler.cpp.o
[ 2%] Building CXX object src/Sparrow/CMakeFiles/SparrowApp.dir/App/CommandLineOptions.cpp.o
[ 2%] Building CXX object src/Sparrow/CMakeFiles/SparrowApp.dir/App/SparrowInitializer.cpp.o
[ 3%] Building CXX object src/Sparrow/CMakeFiles/SparrowApp.dir/App/main.cpp.o
[ 4%] Linking CXX executable sparrow
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: libyaml-cpp.so.0.7, needed by /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so, not found (try using -rpath or -rpath-link)
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::StartedScalar()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to vtable for YAML::BadConversion'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::insert_map_pair(YAML::detail::node&, YAML::detail::node&)' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::ostream_wrapper::write(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::memory::create_node()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::Write(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::set_null()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to vtable for YAML::InvalidNode'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to typeinfo for YAML::InvalidNode' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::set_scalar(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::end()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::~Emitter()'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::size() const'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::empty_scalar[abi:cxx11]()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::good() const'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::InvalidNode::~InvalidNode()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to typeinfo for YAML::BadSubscript'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::PrepareNode(YAML::EmitterNodeType::value)' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to typeinfo for YAML::BadConversion'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::SetMapFormat(YAML::EMITTER_MANIP)' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::convert_to_map(std::shared_ptrYAML::detail::memory_holder const&)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::PrepareIntegralStream(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >&) const' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::Write(bool)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::begin()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::SetSeqFormat(YAML::EMITTER_MANIP)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::BadConversion::~BadConversion()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::c_str() const'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to vtable for YAML::RepresentationException' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::Emitter()'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::BadSubscript::~BadSubscript()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to vtable for YAML::Exception'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::detail::node_data::mark_defined()' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::Emitter::SetLocalValue(YAML::EMITTER_MANIP)'
/home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to YAML::convert<bool>::decode(YAML::Node const&, bool&)' /home/njh80/modulesSource/miniforge3/envs/chemoton/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /rds-d7/user/njh80/hpc-work/chemoton-conda/puffin/software/install/lib/libutilsos.so: undefined reference to vtable for YAML::BadSubscript'
collect2: error: ld returned 1 exit status
make[2]: *** [src/Sparrow/sparrow] Error 1
make[1]: *** [src/Sparrow/CMakeFiles/SparrowApp.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/main.py", line 148, in
main()
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/main.py", line 134, in main
main_bootstrap(config)
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/main.py", line 73, in main_bootstrap
bootstrap(config)
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/bootstrap.py", line 85, in bootstrap
program.install(program_build_dir, install_dir, config["resources"]["cores"])
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/programs/sparrow.py", line 22, in install
self.scine_module_install(repo_dir, install_dir, ncores, add_lib=True, add_bin=True)
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/site-packages/scine_puffin/programs/program.py", line 162, in scine_module_install
subprocess.run(["make", "-j" + str(ncores), "install"], env=env, check=True)
File "/home/njh80/modulesSource/miniforge3/envs/chemoton/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['make', '-j1', 'install']' returned non-zero exit status 2.

Compile notes

Thanks for providing this package!

I want to try out molgym using this great semiempirical package, and noticed the following build issues:

  1. compiling with intel/19.0.3 leads to confusion about template arguments:
$ cmake -DCMAKE_BUILD_TYPE=Release -DSCINE_BUILD_PYTHON_BINDINGS=ON -DCMAKE_INSTALL_PREFIX=$INST -DCMAKE_CXX_COMPILER=`which icc` -DCMAKE_C_COMPILER=`which icc` ..

$ make
...

~/sparrow/src/Sparrow/Sparrow/Implementations/Nddo/Am1/AM1PairwiseRepulsion.h(91): error: no instance of overloaded function "exp" matches the argument list
            argument types are: (double)
      return res + radiusDeriv * Utils::Constants::angstrom_per_bohr * exp(-pA_.alpha() * radiusDeriv) +
                                                                       ^
~/sparrow/src/Sparrow/Sparrow/Implementations/Nddo/Am1/AM1PairwiseRepulsion.h(91): note: this candidate was rejected because arguments do not match
      return res + radiusDeriv * Utils::Constants::angstrom_per_bohr * exp(-pA_.alpha() * radiusDeriv) +
                                                                       ^
~/sparrow/src/Sparrow/Sparrow/Implementations/Nddo/Am1/AM1PairwiseRepulsion.h(91): note: this candidate was rejected because at least one template argument could not be deduced
      return res + radiusDeriv * Utils::Constants::angstrom_per_bohr * exp(-pA_.alpha() * radiusDeriv) +
                                                                       ^
~/sparrow/src/Sparrow/Sparrow/Implementations/Nddo/Am1/AM1PairwiseRepulsion.h(91): note: this candidate was rejected because arguments do not match
      return res + radiusDeriv * Utils::Constants::angstrom_per_bohr * exp(-pA_.alpha() * radiusDeriv) +
                                                                       ^
          detected during:
            instantiation of "Scine::Utils::AutomaticDifferentiation::Value1DType<O> Scine::Sparrow::nddo::AM1PairwiseRepulsion::standardParenthesis<O>(double) const [with O=Scine::Utils::DerivativeOrder::Zero]" at line 77
            instantiation of "Scine::Utils::AutomaticDifferentiation::Value1DType<O> Scine::Sparrow::nddo::AM1PairwiseRepulsion::parenthesisValue<O>(double) const [with O=Scine::Utils::DerivativeOrder::Zero]" at line 72
            instantiation of "Scine::Utils::AutomaticDifferentiation::Value1DType<O> Scine::Sparrow::nddo::AM1PairwiseRepulsion::baseTerm<O>(double) const [with O=Scine::Utils::DerivativeOrder::Zero]" at line 66
            instantiation of "Scine::Utils::AutomaticDifferentiation::Value1DType<O> Scine::Sparrow::nddo::AM1PairwiseRepulsion::calculateRepulsion<O>(double) const [with O=Scine::Utils::DerivativeOrder::Zero]" at line 23 of "~/sparrow/src/Sparrow/Sparrow/Implementations/Nddo/Am1/AM1PairwiseRepulsion.cpp"
  1. Compiling on OSX with stock clang mostly succeeds, but gives lots of warnings about C++17-style constants
$ clang++ --version
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

src/Sparrow/Sparrow/Resources/Dftb/3ob-3-1/Parameters.cpp:19443:10: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]
        {0x1.f333333333333p+2, 0x1.f666666666666p+2, 0x1.4c345fa238401p-23, -0x1.9f461446d6afap-19, 0x1.812b43ac0c844p-16, -0x1.1b403de0c351dp-14}, 
         ^

consider setting CMAKE_CXX_STANDARD.

  1. OSX filenames are case-insensitive, so the last compile step dies:
[ 89%] Linking CXX executable sparrow
cd ~/spack-src/src/Sparrow && cmake -E cmake_link_script CMakeFiles/SparrowApp.dir/link.txt --verbose=1
/usr/local/spack/lib/spack/env/clang/clang++  ... -o sparrow  ...

ld: can't write output file to 'sparrow' because that path is a directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/Sparrow/sparrow] Error 1
make[1]: *** [src/Sparrow/CMakeFiles/SparrowApp.dir/all] Error 2
make: *** [all] Error 2

Clang complaints about potential C++ ABI mismatch

Compiling sparrow with clang++ raises a warning on a potential C++ ABI mismatch on Windows platforms:

[5/164] Building CXX object src/Sparrow/CMakeFiles/Sparrow.dir/Sparrow/Implementations/Dftb/DFTBMethodWrapper.cpp.o
In file included from /home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Sparrow/Implementations/Dftb/DFTBMethodWrapper.cpp:9:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Sparrow/Implementations/Dftb/TimeDependent/LinearResponse/TDDFTBData.h:27:1: warning: 'TDDFTBData' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
struct TDDFTBData : public LinearResponseData {
^
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Sparrow/Implementations/Dftb/DFTBMethodWrapper.h:15:1: note: did you mean struct here?
class TDDFTBData;
^~~~~
struct
1 warning generated.

fail to make test

    Start 1: Sparrow
1/5 Test #1: Sparrow ..........................   Passed    5.40 sec
    Start 2: Sparrow_Python_Bindings
2/5 Test #2: Sparrow_Python_Bindings ..........   Passed    0.27 sec
    Start 3: UtilsOSTests
3/5 Test #3: UtilsOSTests .....................   Passed    0.23 sec
    Start 4: UtilsOS_Python_Bindings
4/5 Test #4: UtilsOS_Python_Bindings ..........***Failed    0.01 sec
    Start 5: Core
5/5 Test #5: Core .............................   Passed    0.00 sec

80% tests passed, 1 tests failed out of 5

Total Test time (real) =   5.92 sec

The following tests FAILED:
          4 - UtilsOS_Python_Bindings (Failed)
Errors while running CTest
Makefile:94: recipe for target 'test' failed
make: *** [test] Error 8

How can I fix it?

How I can run geometry optimization?

I was reading the manual and I cannot see anything about geometry relaxation. I see only option gradient --gradient

But I see submodule lbfgspp is compiled during installation, therefore I guess there should be some geometry optimization inside?

Memory-demanding compilation

Just gave sparrow a try after a while and immediately crashed my machine when compiling it in parallel.

It would be nice to have a note on the memory demand when building sparrow. For me I found ~5GB peak memory usage and ~3.8GB on average for a single thread. Which can hamper even a powerful machine with 64GB memory when 16 concurrent jobs are spawned (a usual process count on a desktop machine).

Is there a particular reason for the expensive compilation process (heavy use of constexpr, templates, ...)?

Strange warnings using DFTBn with spin and UHF

When running an open-shell (-u) calculation on spin polarized systems (e.g. -s 2) with one of the DFTB methods implemented in Sparrow, two conflicting messages are printed, but the calculation proceeds anyway.

Edit: I modified the source to add more decimals of precision to the printed energy, so don't worry if that looks wrong.

ehermes@<snip>$ /home/ehermes/build/sparrow/install/bin/sparrow -x test_0.xyz -u -s 2 -M DFTB3
0000001 | 2019-06-12, 16:49:45.423855 [error] - Not possible to run unrestricted calculations with this method.
0000002 | 2019-06-12, 16:49:45.513614 [warning] - The chosen spin multiplicity (2) requires an unrestricted calculation. Setting UHF calculation.
SPARROW, command-line program
Host: <snip>
Start: Wed Jun 12 16:49:45 2019

Program call:  /home/ehermes/build/sparrow/install/bin/sparrow -x test_0.xyz -u -s 2 -M DFTB3
Method:                  DFTB3
Calculation Modus:       Spin-unrestricted formalism
Molecular charge:        0
Spin multiplicity:       2
Convergence threshold:   1e-05 hartree
Max Iterations:          100
Convergence accelerator: diis
Parameters:              /home/ehermes/build/sparrow/install/resources/Parameters/Dftb/3ob-2-1/

================================================================================
Calculation:

Energy [hartree]:
-18.33615710242787

================================================================================

Total job duration: 5 milliseconds.

End: Wed Jun 12 16:49:45 2019

I don't actually know whether it's calculating with the correct spin state, but at a glance it seems to be working okay.

Support PM7

Would be useful to also have PM7 available since it would make Sparrow a serious alternative to programs like Mopac.

Verbosity setting when running in python

Thanks for developing such a powerful software, which really benefit the computational chemistry community. I was wondering if it is possible to set logger depending on desired verbosity. To be more specific, is there a way to suppress the output lines when running calculator.calculate().

Tests fail with clang 12

Building with clang 12.0.1 on MacOS results in two test failures:

[ RUN      ] Sto6gBasisTest.Pm3BasisFileIsCorrect
$SRC_DIR/src/Sparrow/Tests/Nddo/Sto6gBasisTest.cpp:144: Failure
Value of: Sto6gBasisTest::filesAreIdentical(fileName, "PM3-STO-6G.basis")
  Actual: false
Expected: true
[  FAILED  ] Sto6gBasisTest.Pm3BasisFileIsCorrect (2 ms)
[ RUN      ] Sto6gBasisTest.Pm6BasisFileIsCorrect
$SRC_DIR/src/Sparrow/Tests/Nddo/Sto6gBasisTest.cpp:151: Failure
Value of: Sto6gBasisTest::filesAreIdentical(fileName, "PM6-STO-6G.basis")
  Actual: false
Expected: true
[  FAILED  ] Sto6gBasisTest.Pm6BasisFileIsCorrect (6 ms)

...

[----------] Global test environment tear-down
[==========] 317 tests from 36 test suites ran. (9118 ms total)
[  PASSED  ] 315 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] Sto6gBasisTest.Pm3BasisFileIsCorrect
[  FAILED  ] Sto6gBasisTest.Pm6BasisFileIsCorrect

 2 FAILED TESTS
  YOU HAVE 1 DISABLED TEST

I guess this is related to clang rather than MacOS, but haven't tried reproducing on Linux yet.

Probably related to qcscine/utilities#2

CMake setup
+ cmake -DCMAKE_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_CXX_COMPILER_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_C_COMPILER_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_C_COMPILER_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_LINKER=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ld -DCMAKE_STRIP=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-strip -DCMAKE_INSTALL_NAME_TOOL=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-install_name_tool -DCMAKE_LIBTOOL=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-libtool -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_SYSROOT=/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_INSTALL_PREFIX=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place -DCMAKE_INSTALL_LIBDIR=lib '-DCMAKE_PROGRAM_PATH=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin;/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin' -B _build -G Ninja -DSCINE_MARCH=
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Scine::UtilsOS found locally at $PREFIX/lib/cmake/ScineUtilsOS
-- Cereal was not found in your PATH, so it was downloaded.
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Found Boost: $PREFIX/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: program_options filesystem 
-- Found GTest locally at: GTest::gtest
-- Found PythonInterp: /Users/runner/miniforge3/bin/python (found version "3.9.10") 
-- Doxygen not found - Documentation for Sparrow will not be built.
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_LIBDIR
    CMAKE_LIBTOOL


-- Build files have been written to: $SRC_DIR/_build

system information

     active environment : base
    active env location : /Users/runner/miniforge3
            shell level : 1
       user config file : /Users/runner/.condarc
 populated config files : /Users/runner/miniforge3/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.8
         python version : 3.9.10.final.0
       virtual packages : __osx=10.15.7=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/runner/miniforge3  (writable)
      conda av data dir : /Users/runner/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/runner/miniforge3/pkgs
                          /Users/runner/.conda/pkgs
       envs directories : /Users/runner/miniforge3/envs
                          /Users/runner/.conda/envs
               platform : osx-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.10 Darwin/19.6.0 OSX/10.15.7
                UID:GID : 501:20
             netrc file : None
           offline mode : False

installation in github actions

Do you have a tried and tested github actions script for using sparrow within projects with CI/CD?

I am trying to install Sparrow in a github actions environment for testing some python code that is supposed to use it. I am trying to run the cmake installation, but for some reason it fails at the point of downloading the dependencies using your cmake tools. Oddly enough, if I am doing the same in Docker for example it just works, with the warning about cmake version settings not provided being shown as well and ignored (likely you are calling cmake from a non toplevel directory as well?)

The error is:

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at cmake/ComponentSetup.cmake:56 (message):
  You are compiling Scine components with an architecture-specific ISA:
  -march=native.  Linking together libraries with mismatched architecture
  build flags can cause problems, in particular with Eigen.  Watch out!
Call Stack (most recent call first):
  CMakeLists.txt:16 (scine_setup_component)


CMake Error in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.23)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".


CMake Error at cmake/DownloadProject.cmake:167 (message):
  CMake step for googletest failed: 1
Call Stack (most recent call first):
  cmake/ImportGTest.cmake:16 (download_project)
  cmake/ComponentSetup.cmake:63 (import_gtest)
  CMakeLists.txt:16 (scine_setup_component)


-- Configuring incomplete, errors occurred!
See also "/opt/sparrow/build/CMakeFiles/CMakeOutput.log".
##[error]Process completed with exit code 1.

and the whole action file is as follows, that reproduces this:

name: Sparrow installation

on:
  push:

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v3
        with:
          python-version: '3.9'

      - name: Install dependencies / apt-get
        run: |
          sudo apt-get update -y
          sudo apt-get install -y \
            cmake \
            libeigen3-dev \
            libboost-all-dev \
            --

      - name: Download Sparrow
        working-directory: /opt
        run: |
          # clone Sparrow
          git clone https://github.com/qcscine/sparrow.git --branch=2.0.1 --single-branch --depth 1 --recursive

      - name: Setup Sparrow for Installation
        working-directory: /opt/sparrow
        run: |
          mkdir build install
          cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DSCINE_BUILD_PYTHON_BINDINGS=ON

      - name: Build & Install Sparrow
        working-directory: /opt/sparrow
        run: |
          cmake --build ./build
          cmake --install ./build

      - name: Sparrow path
        run: |
          export PATH="/opt/sparrow/install/bin:$PATH"
          export PYTHONPATH=$PYTHONPATH:/opt/sparrow/install/lib/python3.9/site-packages
          export SCINE_MODULE_PATH=/opt/sparrow/install/lib



I have taken this stripped-down version of the installation scripts and put them into a puclic repo as well for you to see:
https://github.com/stenczelt/actions-test/runs/6746640491

Saving a Molden file?

I'm curious to try sparrow with Avogadro 2 - one thing I'd really like is to visualize the MOs using a Molden or WFN file, cube, etc.

Any way to save the wavefunction, electron density, etc.?

make failed because of multiple errors

Hello!
I'm trying to install sparrow on a cluster, but it cannot succeed in make action, then give me following errors. Is there somebody can help me with these issues? Thanks very much
error.log

Problem with Python Bingins

I was following manual run CMake with -DSCINE_BUILD_PYTHON_BINDINGS=ON

but the python libraries are in different dirctory, in manula is this

export PYTHONPATH=$PYTHONPATH:<source code directory>/install/lib/python<version>/site-packages

but in reality it is here:

export PYTHONPATH=$PYTHONPATH:<source code directory>/install/local/lib/python<version>/site-packages

However the bigger problem is that there is no python binding for scine_utilities therefoere I get this error

prokop@DesktopGTX3060:~/git_SW/sparrow/build/install/local/lib/python3.10/dist-packages$ python
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scine_sparrow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/prokop/git_SW/sparrow/build/install/local/lib/python3.10/dist-packages/scine_sparrow/__init__.py", line 7, in <module>
    import scine_utilities as utils
ModuleNotFoundError: No module named 'scine_utilities'
>>> import scine_utilities

Running PM6-D3H4 or DFTB-D3(BJ)

Can I use sparrow to calculate the implemented methods together with dispersion corrections? Trying -M PM6-D3H4 stops the program. Without dispersion corrections the methods implemented by sparrow are not really usable for any ground state calculation.

Python is not imported if tests are disabled

Enabling the Python bindings and turning off the tests will not import Python and therefore fail to install

❯ cmake -B __build -G Ninja -DSCINE_BUILD_TESTS=OFF -DSCINE_BUILD_PYTHON_BINDINGS=ON -DCMAKE_INSTALL_PREFIX=ON -DCMAKE_INSTALL_PREFIX=$PWD/PREFIX -DSCINE_MARCH=""
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to default 'RelWithDebInfo'
-- Scine::UtilsOS found locally at /home/awvwgk/projects/src/git/scine/sparrow/PREFIX/lib/cmake/ScineUtilsOS
CMake Deprecation Warning at __build/cereal-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at __build/cereal-src/CMakeLists.txt:2 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
    cereal_VERSION
    cereal_VERSION_MAJOR
    cereal_VERSION_MINOR
    cereal_VERSION_PATCH
    cereal_VERSION_TWEAK
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Cereal was not found in your PATH, so it was downloaded.
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: program_options filesystem 
-- Targets to copy for python bindings: Sparrow;Scine::UtilsOS
-- Could NOT find PY_sphinx (missing: PY_SPHINX) 
-- Sphinx python package not found, cannot build python documentation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/awvwgk/projects/src/git/scine/sparrow/__build

The generated install code is missing the Python interpreter which should invoke pip:

❯ cat __build/src/Sparrow/cmake_install.cmake
...
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
  execute_process(COMMAND  -m pip install --prefix=/home/awvwgk/projects/src/git/scine/sparrow/PREFIX --upgrade --no-deps /home/awvwgk/projects/src/git/scine/sparrow/__build/src/Sparrow
                     RESULT_VARIABLE retcode)
     if(NOT ${retcode} EQUAL 0)
       message(FATAL_ERROR "Fatal error when installing Python module using PIP.")
     endif()
endif()

Potential fix:

diff --git a/src/Sparrow/CMakeLists.txt b/src/Sparrow/CMakeLists.txt
index 3d67744..9562705 100644
--- a/src/Sparrow/CMakeLists.txt
+++ b/src/Sparrow/CMakeLists.txt
@@ -17,6 +17,10 @@ if(NOT TARGET Boost::filesystem OR NOT TARGET Boost::program_options)
   find_package(Boost REQUIRED COMPONENTS program_options filesystem)
 endif()
 
+if(SCINE_BUILD_TESTS OR SCINE_BUILD_PYTHON_BINDINGS)
+  find_package(PythonInterp REQUIRED)
+endif()
+
 # Sparrow is a Scine module and is always shared, never linked against
 add_library(Sparrow SHARED ${SPARROW_MODULE_FILES})
 
@@ -87,7 +91,6 @@ if(SCINE_BUILD_TESTS)
     ${CMAKE_DL_LIBS}
   )
   add_test(NAME Sparrow COMMAND Sparrow_tests)
-  find_package(PythonInterp REQUIRED)
   if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
     set(TEST_SELECTION "::TestSparrowFast")
   else()

Zero exit code on failure

After finally getting to test Sparrow, I did find that the error reporting is not reliable, especially in case of wrong command-line options the exit status is not non-zero:

❯ sparrow --structure t.xyz --method pm7
Method PM7 is not available.

Sparrow flies away...
❯ echo $?
0

It would be preferable to signal failure via a non-zero exit status IMO.

Compilation fails with GCC 11

Configured Sparrow 3.0.0 with

❯ cmake -B _build -G Ninja -DSCINE_MARCH="" -DCMAKE_INSTALL_PREFIX=$PWD/PREFIX
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: system filesystem 
-- Found GTest locally at: GTest::gtest
-- Scine::Core was not found in your PATH, so it was downloaded.
-- yaml-cpp was not found in your PATH, so it was downloaded.
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.58.0")  
-- Eigen3 version: 3.4.0
-- IRC was not found in your PATH, so it was downloaded.
-- Found MKL: /opt/intel/mkl/include  
-- Found Intel MKL libraries:
-- /opt/intel/mkl/include 
-- /opt/intel/mkl/lib/intel64/libmkl_avx2.so 
-- /opt/intel/mkl/lib/intel64/libmkl_vml_avx2.so 
-- /opt/intel/mkl/lib/intel64/libmkl_core.so 
-- /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so 
-- /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so 
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found MKL for use with Eigen3
-- Found GTest locally at: GTest::gtest
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: filesystem system 
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Scine::UtilsOS was not found in your PATH, so it was downloaded.
CMake Deprecation Warning at _build/cereal-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at _build/cereal-src/CMakeLists.txt:2 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Cereal was not found in your PATH, so it was downloaded.
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: program_options filesystem 
-- Found GTest locally at: GTest::gtest
-- Found PythonInterp: /usr/bin/python (found version "3.10.1") 
-- Cereal found locally at cereal_DIR-NOTFOUND
-- Configuring done
-- Generating done
-- Build files have been written to: /home/awvwgk/projects/src/git/scine/sparrow/_build

using GCC 11

❯ c++ --version
c++ (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compilation fails with due to std::transform and std::all_of in NddoParamters:

[467/485] Building CXX object src/Sparrow/Embed/CMakeFiles/Embed.dir/NddoParameters.cpp.o
FAILED: src/Sparrow/Embed/CMakeFiles/Embed.dir/NddoParameters.cpp.o 
/usr/bin/c++ -DBOOST_ALL_DYN_LINK -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DEIGEN_USE_MKL_ALL -I/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed -I/home/awvwgk/projects/src/git/scine/sparrow/_build/src/Sparrow -I/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow -I/home/awvwgk/projects/src/git/scine/sparrow/_build/scine-utils-os-src/src/Utils -I/opt/intel/mkl/include -I/home/awvwgk/projects/src/git/scine/sparrow/_build/scine-core-src/src/Core -I/home/awvwgk/projects/src/git/scine/sparrow/_build/cereal-src/include -isystem /usr/include/eigen3 -Wall -Wextra -Wpedantic -O2 -g -DNDEBUG -fopenmp -std=gnu++14 -MD -MT src/Sparrow/Embed/CMakeFiles/Embed.dir/NddoParameters.cpp.o -MF src/Sparrow/Embed/CMakeFiles/Embed.dir/NddoParameters.cpp.o.d -o src/Sparrow/Embed/CMakeFiles/Embed.dir/NddoParameters.cpp.o -c /home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/NddoParameters.cpp
In file included from /home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/NddoParameters.cpp:8:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h: In function ‘std::string lower(std::string)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h:102:8: error: ‘transform’ is not a member of ‘std’
  102 |   std::transform(std::begin(a), std::end(a), std::begin(a), [](unsigned char c) { return std::tolower(c); });
      |        ^~~~~~~~~
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h: In function ‘std::string upper(std::string)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h:107:8: error: ‘transform’ is not a member of ‘std’
  107 |   std::transform(std::begin(a), std::end(a), std::begin(a), [](unsigned char c) { return std::toupper(c); });
      |        ^~~~~~~~~

and DftbParameterSet:

[469/485] Building CXX object src/Sparrow/Embed/CMakeFiles/Embed.dir/DftbParameterSet.cpp.o
FAILED: src/Sparrow/Embed/CMakeFiles/Embed.dir/DftbParameterSet.cpp.o 
/usr/bin/c++ -DBOOST_ALL_DYN_LINK -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DEIGEN_USE_MKL_ALL -I/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed -I/home/awvwgk/projects/src/git/scine/sparrow/_build/src/Sparrow -I/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow -I/home/awvwgk/projects/src/git/scine/sparrow/_build/scine-utils-os-src/src/Utils -I/opt/intel/mkl/include -I/home/awvwgk/projects/src/git/scine/sparrow/_build/scine-core-src/src/Core -I/home/awvwgk/projects/src/git/scine/sparrow/_build/cereal-src/include -isystem /usr/include/eigen3 -Wall -Wextra -Wpedantic -O2 -g -DNDEBUG -fopenmp -std=gnu++14 -MD -MT src/Sparrow/Embed/CMakeFiles/Embed.dir/DftbParameterSet.cpp.o -MF src/Sparrow/Embed/CMakeFiles/Embed.dir/DftbParameterSet.cpp.o.d -o src/Sparrow/Embed/CMakeFiles/Embed.dir/DftbParameterSet.cpp.o -c /home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp
In file included from /home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp:8:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h: In function ‘std::string lower(std::string)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h:102:8: error: ‘transform’ is not a member of ‘std’
  102 |   std::transform(std::begin(a), std::end(a), std::begin(a), [](unsigned char c) { return std::tolower(c); });
      |        ^~~~~~~~~
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h: In function ‘std::string upper(std::string)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/Common.h:107:8: error: ‘transform’ is not a member of ‘std’
  107 |   std::transform(std::begin(a), std::end(a), std::begin(a), [](unsigned char c) { return std::toupper(c); });
      |        ^~~~~~~~~
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp: In function ‘std::string {anonymous}::setIdentifier(std::string)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp:50:8: error: ‘transform’ is not a member of ‘std’
   50 |   std::transform(std::begin(a), std::end(a), std::begin(a), [](const char x) {
      |        ^~~~~~~~~
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp: In function ‘std::ostream& {anonymous}::operator<<(std::ostream&, const Indented<std::array<std::vector<double>, 28> >&)’:
/home/awvwgk/projects/src/git/scine/sparrow/src/Sparrow/Embed/DftbParameterSet.cpp:88:14: error: ‘all_of’ is not a member of ‘std’
   88 |     if (std::all_of(std::begin(col), std::end(col), [](const double v) { return v == 0.0; })) {
      |              ^~~~~~

The thermochemistry results does not appear in python

Hello

`calculator.set_required_properties([su.Property.Energy, su.Property.Gradients, su.Property.AtomicHessians, su.Property.Thermochemistry, su.Property.Hessian])

print(results.thermochemistry)`

I got all the results except thermochemistry results

scine_utilities.ThermochemicalComponentsContainer object at 0x7a14b9d2e730

Implicit solvation

Is there a possibility to use the methods implemented in Sparrow with an implicit solvation model, either of the generalized Born type (GBSA, ALPB, ...) or the polarizable continuum type (COSMO, CPCM, ...)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.