Skip to content

Commit

Permalink
Add voronotalt headers and begin class
Browse files Browse the repository at this point in the history
  • Loading branch information
mlund committed Apr 11, 2024
1 parent 54014a2 commit 848464c
Show file tree
Hide file tree
Showing 13 changed files with 3,086 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <range/v3/numeric/accumulate.hpp>
#include <range/v3/view/zip.hpp>

#include "voronotalt/voronotalt.h" // assuming that the "voronotalt" directory is in the include path

#include <iomanip>
#include <iostream>
#include <memory>
Expand Down Expand Up @@ -2712,4 +2714,8 @@ void SavePenaltyEnergy::_sample() {
}
}

void Voronota::_sample() {
voronotalt::RadicalTessellation::Result result;
}

} // namespace Faunus::analysis
34 changes: 33 additions & 1 deletion src/analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class ElectricPotential : public Analysis {
unsigned int calculations_per_sample_event = 1;
std::string file_prefix; //!< Output filename prefix for potential histogram and correlation
struct Target {
Point position; //!< Target position
Point position; //!< Target position
Average<double> mean_potential; //!< mean potential at position
std::unique_ptr<SparseHistogram<double>> potential_histogram; //!< Histogram of observed potentials
};
Expand Down Expand Up @@ -1086,6 +1086,38 @@ class SavePenaltyEnergy : public Analysis {
SavePenaltyEnergy(const json& j, const Space& spc, const Energy::Hamiltonian& pot);
};

class Voronota : public Analysis {
private:
using average_type = Average<double>;
struct Ball {
double x;
double y;
double z;
double r;
};
struct Averages {
average_type area;
average_type area_squared;
}; //!< Placeholder class for average properties
Averages average_data; //!< Stores all averages for the selected molecule

std::unique_ptr<std::ostream> output_stream; //!< output stream

double probe_radius; //!< radius of the probe sphere
int slices_per_atom; //!< number of slices of each sphere in SASA calculation

std::string filename; //!< output file name

virtual void _to_json(json& j) const override;
virtual void _from_json(const json& input) override;
virtual void _to_disk() override;
virtual void _sample() override;

public:
Voronota(const json& j, const Space& spc);
Voronota(double probe_radius, const Space& spc);
};

} // namespace analysis

} // namespace Faunus
21 changes: 21 additions & 0 deletions src/voronotalt/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 Kliment Olechnovic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 848464c

Please sign in to comment.