Commit 48401def authored by Christoph Junghans's avatar Christoph Junghans

make format

parent 255ba962
Pipeline #91268746 failed with stages
in 5 minutes and 1 second
...@@ -40,7 +40,9 @@ class PotentialFunction { ...@@ -40,7 +40,9 @@ class PotentialFunction {
// set ith parameter // set ith parameter
void setParam(const long int i, const double val) { _lam(i) = val; } void setParam(const long int i, const double val) { _lam(i) = val; }
// set ith parameter among those to be optimized // set ith parameter among those to be optimized
virtual void setOptParam(const long int i, const double val) { setParam(i, val); } virtual void setOptParam(const long int i, const double val) {
setParam(i, val);
}
// set minimum r value to avoid large values // set minimum r value to avoid large values
void setMinDist(const double min) { _min = min; } void setMinDist(const double min) { _min = min; }
// set cut-off value // set cut-off value
......
...@@ -35,7 +35,8 @@ class PotentialFunctionCBSPL : public PotentialFunction { ...@@ -35,7 +35,8 @@ class PotentialFunctionCBSPL : public PotentialFunction {
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double CalculateDF(const long int i, const double r) const override; double CalculateDF(const long int i, const double r) const override;
// calculate second derivative w.r.t. ith parameter // calculate second derivative w.r.t. ith parameter
double CalculateD2F(const long int i, const long int j, const double r) const override; double CalculateD2F(const long int i, const long int j,
const double r) const override;
long int getOptParamSize() const override; long int getOptParamSize() const override;
......
...@@ -36,7 +36,8 @@ class PotentialFunctionLJ126 : public PotentialFunction { ...@@ -36,7 +36,8 @@ class PotentialFunctionLJ126 : public PotentialFunction {
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double CalculateDF(const long int i, const double r) const override; double CalculateDF(const long int i, const double r) const override;
// calculate second derivative w.r.t. ith parameter // calculate second derivative w.r.t. ith parameter
double CalculateD2F(const long int i, const long int j, const double r) const override; double CalculateD2F(const long int i, const long int j,
const double r) const override;
}; };
} // namespace csg } // namespace csg
} // namespace votca } // namespace votca
......
...@@ -33,7 +33,8 @@ class PotentialFunctionLJG : public PotentialFunction { ...@@ -33,7 +33,8 @@ class PotentialFunctionLJG : public PotentialFunction {
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double CalculateDF(const long int i, const double r) const override; double CalculateDF(const long int i, const double r) const override;
// calculate second derivative w.r.t. ith parameter // calculate second derivative w.r.t. ith parameter
double CalculateD2F(const long int i, const long int j, const double r) const override; double CalculateD2F(const long int i, const long int j,
const double r) const override;
}; };
} // namespace csg } // namespace csg
} // namespace votca } // namespace votca
......
...@@ -66,7 +66,9 @@ class XYZReader : public TrajectoryReader, public TopologyReader { ...@@ -66,7 +66,9 @@ class XYZReader : public TrajectoryReader, public TopologyReader {
return container.size(); return container.size();
} }
long int getContainerSize(Topology &container) { return container.BeadCount(); } long int getContainerSize(Topology &container) {
return container.BeadCount();
}
template <bool topology, class T> template <bool topology, class T>
void AddAtom(T &container, std::string name, int id, void AddAtom(T &container, std::string name, int id,
......
...@@ -219,7 +219,8 @@ bool DLPOLYTopologyReader::ReadTopology(string file, Topology &top) { ...@@ -219,7 +219,8 @@ bool DLPOLYTopologyReader::ReadTopology(string file, Topology &top) {
#endif #endif
// read molecule // read molecule
unique_ptr<long int[]> id_map = unique_ptr<long int[]>{new long int[natoms]}; unique_ptr<long int[]> id_map =
unique_ptr<long int[]>{new long int[natoms]};
for (int i = 0; i < natoms;) { // i is altered in repeater loop for (int i = 0; i < natoms;) { // i is altered in repeater loop
stringstream sl(_NextKeyline(fl, WhiteSpace)); stringstream sl(_NextKeyline(fl, WhiteSpace));
......
...@@ -190,7 +190,7 @@ void H5MDTrajectoryReader::Initialize(Topology &top) { ...@@ -190,7 +190,7 @@ void H5MDTrajectoryReader::Initialize(Topology &top) {
hsize_t dims[3]; hsize_t dims[3];
rank_ = H5Sget_simple_extent_dims(fs_atom_position_, dims, nullptr); rank_ = H5Sget_simple_extent_dims(fs_atom_position_, dims, nullptr);
N_particles_ = dims[1]; N_particles_ = dims[1];
vec_components_ =(int) dims[2]; vec_components_ = (int)dims[2];
max_idx_frame_ = dims[0] - 1; max_idx_frame_ = dims[0] - 1;
// TODO: reads mass, charge and particle type. // TODO: reads mass, charge and particle type.
......
...@@ -232,7 +232,8 @@ double PotentialFunctionCBSPL::CalculateF(const double r) const { ...@@ -232,7 +232,8 @@ double PotentialFunctionCBSPL::CalculateF(const double r) const {
} }
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double PotentialFunctionCBSPL::CalculateDF(const long int i, const double r) const { double PotentialFunctionCBSPL::CalculateDF(const long int i,
const double r) const {
// since first _nexcl parameters are not optimized for stability reasons // since first _nexcl parameters are not optimized for stability reasons
......
...@@ -36,7 +36,8 @@ double PotentialFunctionLJ126::CalculateF(const double r) const { ...@@ -36,7 +36,8 @@ double PotentialFunctionLJ126::CalculateF(const double r) const {
} }
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double PotentialFunctionLJ126::CalculateDF(const long int i, const double r) const { double PotentialFunctionLJ126::CalculateDF(const long int i,
const double r) const {
if (r >= _min && r <= _cut_off) { if (r >= _min && r <= _cut_off) {
......
...@@ -38,7 +38,8 @@ double PotentialFunctionLJG::CalculateF(const double r) const { ...@@ -38,7 +38,8 @@ double PotentialFunctionLJG::CalculateF(const double r) const {
} }
// calculate first derivative w.r.t. ith parameter // calculate first derivative w.r.t. ith parameter
double PotentialFunctionLJG::CalculateDF(const long int i, const double r) const { double PotentialFunctionLJG::CalculateDF(const long int i,
const double r) const {
if (r >= _min && r <= _cut_off) { if (r >= _min && r <= _cut_off) {
......
...@@ -164,7 +164,8 @@ void CGForceMatching::BeginEvaluate(Topology *top, Topology *top_atom) { ...@@ -164,7 +164,8 @@ void CGForceMatching::BeginEvaluate(Topology *top, Topology *top_atom) {
} }
} }
CGForceMatching::SplineInfo::SplineInfo(long int index, bool bonded_, long int matr_pos_, CGForceMatching::SplineInfo::SplineInfo(long int index, bool bonded_,
long int matr_pos_,
votca::tools::Property *options) { votca::tools::Property *options) {
// initialize standard data // initialize standard data
splineIndex = index; splineIndex = index;
...@@ -568,8 +569,8 @@ void CGForceMatching::EvalBonded(Topology *conf, SplineInfo *sinfo) { ...@@ -568,8 +569,8 @@ void CGForceMatching::EvalBonded(Topology *conf, SplineInfo *sinfo) {
for (Interaction *inter : interList) { for (Interaction *inter : interList) {
long int beads_in_int = inter->BeadCount(); // 2 for bonds, 3 for angles, 4 for long int beads_in_int = inter->BeadCount(); // 2 for bonds, 3 for angles, 4
// dihedrals // for dihedrals
votca::tools::CubicSpline &SP = sinfo->Spline; votca::tools::CubicSpline &SP = sinfo->Spline;
......
...@@ -128,7 +128,8 @@ void CsgREupdate::BeginEvaluate(Topology *top, Topology *top_atom) { ...@@ -128,7 +128,8 @@ void CsgREupdate::BeginEvaluate(Topology *top, Topology *top_atom) {
double *rdfnorm = new double(); double *rdfnorm = new double();
if (prop->get("type1").value() == prop->get("type2").value()) { if (prop->get("type1").value() == prop->get("type2").value()) {
*rdfnorm = (double)(beads1.size() * beads2.size()) / 2. / top->BoxVolume(); *rdfnorm =
(double)(beads1.size() * beads2.size()) / 2. / top->BoxVolume();
} else { } else {
*rdfnorm = (double)(beads1.size() * beads2.size()) / top->BoxVolume(); *rdfnorm = (double)(beads1.size() * beads2.size()) / top->BoxVolume();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment