Skip to content
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

Remove unused bond parameters #4079

Merged
merged 4 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/core/bonded_interactions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ target_sources(
${CMAKE_CURRENT_SOURCE_DIR}/fene.cpp
${CMAKE_CURRENT_SOURCE_DIR}/harmonic.cpp
${CMAKE_CURRENT_SOURCE_DIR}/quartic.cpp
${CMAKE_CURRENT_SOURCE_DIR}/thermalized_bond.cpp
${CMAKE_CURRENT_SOURCE_DIR}/umbrella.cpp)
${CMAKE_CURRENT_SOURCE_DIR}/thermalized_bond.cpp)
2 changes: 0 additions & 2 deletions src/core/bonded_interactions/bonded_interaction_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ auto cutoff(int type, Bond_parameters const &bp) {
return bp.ibmVolConsParameters.cutoff();
case BONDED_IA_IBM_TRIBEND:
return bp.ibm_tribend.cutoff();
case BONDED_IA_UMBRELLA:
return bp.umbrella.cutoff();
case BONDED_IA_THERMALIZED_DIST:
return bp.thermalized_bond.cutoff();
default:
Expand Down
27 changes: 0 additions & 27 deletions src/core/bonded_interactions/bonded_interaction_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include <cassert>
#include <cmath>
#include <limits>
#include <vector>

/** Type codes of bonded interactions. */
Expand Down Expand Up @@ -76,8 +75,6 @@ enum BondedInteraction : int {
BONDED_IA_IBM_VOLUME_CONSERVATION,
/** Type of bonded interaction is bending force (immersed boundary). */
BONDED_IA_IBM_TRIBEND,
/** Type of bonded interaction is umbrella. */
BONDED_IA_UMBRELLA,
/** Type of bonded interaction is thermalized distance bond. */
BONDED_IA_THERMALIZED_DIST,
};
Expand Down Expand Up @@ -178,20 +175,6 @@ struct Thermalized_bond_parameters {
double cutoff() const { return r_cut; }
};

/** Parameters for harmonic dumbbell bond Potential */
struct Harmonic_dumbbell_bond_parameters {
/** spring constant */
double k1;
/** rotation constant */
double k2;
/** equilibrium bond length */
double r;
/** cutoff bond length */
double r_cut;

double cutoff() const { return r_cut; }
};

/** Parameters for quartic bond Potential */
struct Quartic_bond_parameters {
double k0, k1;
Expand Down Expand Up @@ -277,15 +260,6 @@ struct Tabulated_bond_parameters {
}
};

/** Parameters for umbrella potential */
struct Umbrella_bond_parameters {
double k;
int dir;
double r;

double cutoff() const { return std::numeric_limits<double>::infinity(); }
};

/** Parameters for the rigid_bond/SHAKE/RATTLE ALGORITHM */
struct Rigid_bond_parameters {
/** Square of the length of Constrained Bond */
Expand Down Expand Up @@ -372,7 +346,6 @@ union Bond_parameters {
Angle_cossquare_bond_parameters angle_cossquare;
Dihedral_bond_parameters dihedral;
Tabulated_bond_parameters tab;
Umbrella_bond_parameters umbrella;
Thermalized_bond_parameters thermalized_bond;
Rigid_bond_parameters rigid_bond;
IBM_Triel_Parameters ibm_triel;
Expand Down
11 changes: 0 additions & 11 deletions src/core/bonded_interactions/thermalized_bond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,3 @@ void thermalized_bond_init() {
}
}
}

void thermalized_bond_update_params(double pref_scale) {

for (auto &bonded_ia_param : bonded_ia_params) {
if (bonded_ia_param.type == BONDED_IA_THERMALIZED_DIST) {
Thermalized_bond_parameters &t = bonded_ia_param.p.thermalized_bond;
t.pref2_com *= pref_scale;
t.pref2_dist *= pref_scale;
}
}
}
1 change: 0 additions & 1 deletion src/core/bonded_interactions/thermalized_bond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ int thermalized_bond_set_params(int bond_type, double temp_com,
double gamma_com, double temp_distance,
double gamma_distance, double r_cut);

void thermalized_bond_update_params(double pref_scale);
void thermalized_bond_init();

/** Separately thermalizes the com and distance of a particle pair.
Expand Down
50 changes: 0 additions & 50 deletions src/core/bonded_interactions/umbrella.cpp

This file was deleted.

81 changes: 0 additions & 81 deletions src/core/bonded_interactions/umbrella.hpp

This file was deleted.

3 changes: 0 additions & 3 deletions src/core/energy_inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "bonded_interactions/fene.hpp"
#include "bonded_interactions/harmonic.hpp"
#include "bonded_interactions/quartic.hpp"
#include "bonded_interactions/umbrella.hpp"
#include "nonbonded_interactions/bmhtf-nacl.hpp"
#include "nonbonded_interactions/buckingham.hpp"
#include "nonbonded_interactions/gaussian.hpp"
Expand Down Expand Up @@ -242,8 +241,6 @@ calc_bonded_energy(Bonded_ia_parameters const &iaparams, Particle const &p1,
#endif
case BONDED_IA_TABULATED_DISTANCE:
return tab_bond_energy(iaparams, dx);
case BONDED_IA_UMBRELLA:
return umbrella_pair_energy(iaparams, dx);
case BONDED_IA_VIRTUAL_BOND:
return boost::optional<double>(0);
default:
Expand Down
3 changes: 0 additions & 3 deletions src/core/forces_inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "bonded_interactions/harmonic.hpp"
#include "bonded_interactions/quartic.hpp"
#include "bonded_interactions/thermalized_bond.hpp"
#include "bonded_interactions/umbrella.hpp"
#include "immersed_boundary/ibm_tribend.hpp"
#include "immersed_boundary/ibm_triel.hpp"
#include "nonbonded_interactions/bmhtf-nacl.hpp"
Expand Down Expand Up @@ -333,8 +332,6 @@ calc_bond_pair_force(Particle const &p1, Particle const &p2,
#endif
case BONDED_IA_TABULATED_DISTANCE:
return tab_bond_force(iaparams, dx);
case BONDED_IA_UMBRELLA:
return umbrella_pair_force(iaparams, dx);
case BONDED_IA_VIRTUAL_BOND:
case BONDED_IA_RIGID_BOND:
return Utils::Vector3d{};
Expand Down
21 changes: 0 additions & 21 deletions src/python/espressomd/interactions.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,6 @@ IF TABULATED:
double min, double max,
vector[double] energy,
vector[double] force)
IF ROTATION:
cdef extern from "bonded_interactions/bonded_interaction_data.hpp":
# Parameters for the harmonic dumbbell bond potential
cdef struct Harmonic_dumbbell_bond_parameters:
double k1
double k2
double r
double r_cut
ELSE:
cdef struct Harmonic_dumbbell_bond_parameters:
double k1
double k2
double r
double r_cut

cdef extern from "bonded_interactions/bonded_interaction_data.hpp":
# Parameters for n-body tabulated potential (n=2,3,4).
Expand Down Expand Up @@ -413,12 +399,6 @@ cdef extern from "bonded_interactions/bonded_interaction_data.hpp":
double * para_b
double * para_c

# Parameters for one-directional harmonic potential
cdef struct Umbrella_bond_parameters:
double k
int dir
double r

# Parameters for subt-LJ potential
cdef struct Subt_lj_bond_parameters:
double k
Expand Down Expand Up @@ -591,6 +571,5 @@ cdef extern from "bonded_interactions/bonded_interaction_data.hpp":
BONDED_IA_IBM_TRIEL,
BONDED_IA_IBM_TRIBEND,
BONDED_IA_IBM_VOLUME_CONSERVATION,
BONDED_IA_UMBRELLA,
BONDED_IA_THERMALIZED_DIST
BONDED_IA_QUARTIC