Skip to content

[WIP] Tessellationless integration grid #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [Unreleased]

### Added

- A new cavity generator using the C. S. Pomelli's [TsLess algorithm](http://dx.doi.org/10.1002/jcc.20076)

## [Version 1.1.11] - 2017-10-25

### Added
Expand Down Expand Up @@ -352,7 +358,6 @@
## v1.0.0 - 2014-09-30 [YANKED]

[Unreleased]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.10...HEAD
[Version 1.1.11]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.10...v1.1.11
[Version 1.1.10]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.9...v1.1.10
[Version 1.1.9]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.8...v1.1.9
[Version 1.1.8]: https://github.com/PCMSolver/pcmsolver/compare/v1.1.7...v1.1.8
Expand Down
1 change: 1 addition & 0 deletions include/Citation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ inline std::string citation_message() {
rest << " U. Ekstroem (automatic differentiation library)" << std::endl;
rest << " J. Juselius (input parsing library and CMake framework)"
<< std::endl;
rest << " C. S. Pomelli (TsLess cavity library)" << std::endl;
rest << " Theory: - J. Tomasi, B. Mennucci and R. Cammi:" << std::endl;
rest << " \"Quantum Mechanical Continuum Solvation Models\", Chem. "
"Rev., 105 (2005) 2999"
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ add_subdirectory(metal)
add_subdirectory(bi_operators)
add_subdirectory(pedra)
add_subdirectory(solver)
add_subdirectory(tsless)
add_subdirectory(utils)

list(APPEND _objects $<TARGET_OBJECTS:cavity>
Expand All @@ -19,6 +20,7 @@ list(APPEND _objects $<TARGET_OBJECTS:cavity>
$<TARGET_OBJECTS:bi_operators>
$<TARGET_OBJECTS:pedra>
$<TARGET_OBJECTS:solver>
$<TARGET_OBJECTS:tsless>
$<TARGET_OBJECTS:utils>
$<TARGET_OBJECTS:getkw>
)
Expand Down
4 changes: 2 additions & 2 deletions src/cavity/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# List of headers
list(APPEND headers_list Cavity.hpp ICavity.hpp CavityData.hpp Element.hpp GePolCavity.hpp RestartCavity.hpp)
list(APPEND headers_list Cavity.hpp ICavity.hpp CavityData.hpp Element.hpp GePolCavity.hpp RestartCavity.hpp TsLessCavity.hpp)

# List of sources
list(APPEND sources_list ICavity.cpp Element.cpp GePolCavity.cpp RestartCavity.cpp)
list(APPEND sources_list ICavity.cpp Element.cpp GePolCavity.cpp RestartCavity.cpp TsLessCavity.cpp)

add_library(cavity OBJECT ${sources_list} ${headers_list})
set_target_properties(cavity PROPERTIES POSITION_INDEPENDENT_CODE 1 )
Expand Down
2 changes: 2 additions & 0 deletions src/cavity/Cavity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "GePolCavity.hpp"
#include "ICavity.hpp"
#include "RestartCavity.hpp"
#include "TsLessCavity.hpp"
#include "utils/Factory.hpp"

/*!
Expand All @@ -51,6 +52,7 @@ inline Factory<detail::CreateCavity> bootstrapFactory() {

factory_.subscribe("GEPOL", createGePolCavity);
factory_.subscribe("RESTART", createRestartCavity);
factory_.subscribe("TSLESS", createTsLessCavity);

return factory_;
}
Expand Down
13 changes: 5 additions & 8 deletions src/cavity/GePolCavity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,9 @@ void GePolCavity::build(const std::string & suffix,
int maxsph,
int maxvert) {

// This is a wrapper for the generatecavity_cpp function defined in the Fortran
// code PEDRA.
// Here we allocate the necessary arrays to be passed to PEDRA, in particular we
// allow
// for the insertion of additional spheres as in the most general formulation of
// the
// This is a wrapper for the generatecavity_cpp function defined in the Fortran code PEDRA.
// Here we allocate the necessary arrays to be passed to PEDRA, in particular we allow
// for the insertion of additional spheres as in the most general formulation of the
// GePol algorithm.

double * xtscor = new double[maxts];
Expand Down Expand Up @@ -173,7 +170,7 @@ void GePolCavity::build(const std::string & suffix,
int len_f_pedra = std::strlen(pedra.str().c_str());
// Go PEDRA, Go!
TIMER_ON("GePolCavity::generatecavity_cpp");
generatecavity_cpp(&maxts,
pedra_driver(&maxts,
&maxsph,
&maxvert,
xtscor,
Expand Down Expand Up @@ -416,7 +413,7 @@ std::ostream & GePolCavity::printCavity(std::ostream & os) {
os << boost::format(" %s") % "Du";
os << boost::format("%9.4f") % (sphereRadius_(idx) * bohrToAngstrom());
os << boost::format(" %1.2f ") % 1.00;
os << boost::format("%10.6f ") % (sphereCenter_(0, idx) * bohrToAngstrom());
os << boost::format("%10.6f ") % (sphereCenter_(0, idx) * bohrToAngstrom());
os << boost::format(" %10.6f ") % (sphereCenter_(1, idx) * bohrToAngstrom());
os << boost::format(" %10.6f ") % (sphereCenter_(2, idx) * bohrToAngstrom());
os << std::endl;
Expand Down
81 changes: 36 additions & 45 deletions src/cavity/GePolCavity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <vector>

#include "Config.hpp"
#include "FCMangle.hpp"

namespace pcm {
struct CavityData;
Expand Down Expand Up @@ -94,18 +95,7 @@ class GePolCavity __final : public ICavity {
void writeOFF(const std::string & suffix);
};

/*! \fn extern "C" void generatecavity_cpp(int * maxts, int * maxsph, int * maxvert,
* double * xtscor, double * ytscor, double * ztscor,
* double * ar,
* double * xsphcor, double * ysphcor, double *
* zsphcor, double * rsph,
* int * nts, int * ntsirr, int * nesfp, int *
* addsph,
* double * xe, double * ye, double * ze, double *
* rin,
* double * avgArea, double * rsolv, double * ret,
* int * nr_gen, int * gen1, int * gen2, int * gen3,
* int * nvert, double * vert, double * centr)
/*! \brief Interface to the Fortran PEDRA code
* \param[in] maxts maximum number of tesserae allowed
* \param[in] maxsph maximum number of spheres allowed
* \param[in] maxvert maximum number of vertices allowed
Expand Down Expand Up @@ -144,39 +134,40 @@ class GePolCavity __final : public ICavity {
* \param[out] vert coordinates of tesserae vertices
* \param[out] centr centers of arcs defining the edges of the tesserae
*/
extern "C" void generatecavity_cpp(int * maxts,
int * maxsph,
int * maxvert,
double * xtscor,
double * ytscor,
double * ztscor,
double * ar,
double * xsphcor,
double * ysphcor,
double * zsphcor,
double * rsph,
int * nts,
int * ntsirr,
int * nesfp,
int * addsph,
double * xe,
double * ye,
double * ze,
double * rin,
double * masses,
double * avgArea,
double * rsolv,
double * ret,
int * nr_gen,
int * gen1,
int * gen2,
int * gen3,
int * nvert,
double * vert,
double * centr,
int * isphe,
const char * pedra,
int * len_f_pedra);
#define pedra_driver FortranCInterface_GLOBAL_(pedra_driver, PEDRA_DRIVER)
extern "C" void pedra_driver(int * maxts,
int * maxsph,
int * maxvert,
double * xtscor,
double * ytscor,
double * ztscor,
double * ar,
double * xsphcor,
double * ysphcor,
double * zsphcor,
double * rsph,
int * nts,
int * ntsirr,
int * nesfp,
int * addsph,
double * xe,
double * ye,
double * ze,
double * rin,
double * masses,
double * avgArea,
double * rsolv,
double * ret,
int * nr_gen,
int * gen1,
int * gen2,
int * gen3,
int * nvert,
double * vert,
double * centr,
int * isphe,
const char * pedra,
int * len_f_pedra);

ICavity * createGePolCavity(const CavityData & data);
} // namespace cavity
Expand Down
Loading