"platforms/vscode:/vscode.git/clone" did not exist on "8148f51d4e83c7b61b68d99ab055343e50f3e805"
Commit 1d5c7417 authored by Peter Eastman's avatar Peter Eastman
Browse files

Added default values for some arguments

parent 11d2d8ae
......@@ -171,7 +171,7 @@ public:
* @param parameters the list of parameters for the new angle
* @return the index of the angle that was added
*/
int addAngle(int particle1, int particle2, int particle3, const std::vector<double>& parameters);
int addAngle(int particle1, int particle2, int particle3, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the force field parameters for an angle term.
*
......@@ -191,7 +191,7 @@ public:
* @param particle3 the index of the third particle connected by the angle
* @param parameters the list of parameters for the angle
*/
void setAngleParameters(int index, int particle1, int particle2, int particle3, const std::vector<double>& parameters);
void setAngleParameters(int index, int particle1, int particle2, int particle3, const std::vector<double>& parameters=std::vector<double>());
/**
* Update the per-angle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
......
......@@ -170,7 +170,7 @@ public:
* @param parameters the list of parameters for the new bond
* @return the index of the bond that was added
*/
int addBond(int particle1, int particle2, const std::vector<double>& parameters);
int addBond(int particle1, int particle2, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the force field parameters for a bond term.
*
......@@ -188,7 +188,7 @@ public:
* @param particle2 the index of the second particle connected by the bond
* @param parameters the list of parameters for the bond
*/
void setBondParameters(int index, int particle1, int particle2, const std::vector<double>& parameters);
void setBondParameters(int index, int particle1, int particle2, const std::vector<double>& parameters=std::vector<double>());
/**
* Update the per-bond parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
......
......@@ -237,7 +237,7 @@ public:
* If this is omitted, then particle masses will be used as weights.
* @return the index of the group that was added
*/
int addGroup(const std::vector<int>& particles, const std::vector<double>& weights = std::vector<double>());
int addGroup(const std::vector<int>& particles, const std::vector<double>& weights=std::vector<double>());
/**
* Get the properties of a group.
*
......@@ -256,7 +256,7 @@ public:
* @param weights the weight to use for each particle when computing the center position.
* If this is omitted, then particle masses will be used as weights.
*/
void setGroupParameters(int index, const std::vector<int>& particles, const std::vector<double>& weights = std::vector<double>());
void setGroupParameters(int index, const std::vector<int>& particles, const std::vector<double>& weights=std::vector<double>());
/**
* Add a bond to the force
*
......@@ -264,7 +264,7 @@ public:
* @param parameters the list of per-bond parameter values for the new bond
* @return the index of the bond that was added
*/
int addBond(const std::vector<int>& groups, const std::vector<double>& parameters);
int addBond(const std::vector<int>& groups, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the properties of a bond.
*
......@@ -280,7 +280,7 @@ public:
* @param groups the indices of the groups in the bond
* @param parameters the list of per-bond parameter values for the bond
*/
void setBondParameters(int index, const std::vector<int>& groups, const std::vector<double>& parameters);
void setBondParameters(int index, const std::vector<int>& groups, const std::vector<double>& parameters=std::vector<double>());
/**
* Add a tabulated function that may appear in the energy expression.
*
......
......@@ -219,7 +219,7 @@ public:
* @param parameters the list of per-bond parameter values for the new bond
* @return the index of the bond that was added
*/
int addBond(const std::vector<int>& particles, const std::vector<double>& parameters);
int addBond(const std::vector<int>& particles, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the properties of a bond.
*
......@@ -235,7 +235,7 @@ public:
* @param particles the indices of the particles in the bond
* @param parameters the list of per-bond parameter values for the bond
*/
void setBondParameters(int index, const std::vector<int>& particles, const std::vector<double>& parameters);
void setBondParameters(int index, const std::vector<int>& particles, const std::vector<double>& parameters=std::vector<double>());
/**
* Add a tabulated function that may appear in the energy expression.
*
......
......@@ -180,7 +180,7 @@ public:
* @param parameters the list of parameters for the new force term
* @return the index of the particle term that was added
*/
int addParticle(int particle, const std::vector<double>& parameters);
int addParticle(int particle, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the force field parameters for a force field term.
*
......@@ -196,7 +196,7 @@ public:
* @param particle the index of the particle this term is applied to
* @param parameters the list of parameters for the force field term
*/
void setParticleParameters(int index, int particle, const std::vector<double>& parameters);
void setParticleParameters(int index, int particle, const std::vector<double>& parameters=std::vector<double>());
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
......
......@@ -319,7 +319,7 @@ public:
* @param parameters the list of parameters for the new particle
* @return the index of the particle that was added
*/
int addParticle(const std::vector<double>& parameters);
int addParticle(const std::vector<double>& parameters=std::vector<double>());
/**
* Get the nonbonded force parameters for a particle.
*
......
......@@ -296,7 +296,7 @@ public:
* @param parameters the list of per-donor parameter values for the new donor
* @return the index of the donor that was added
*/
int addDonor(int d1, int d2, int d3, const std::vector<double>& parameters);
int addDonor(int d1, int d2, int d3, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the properties of a donor group.
*
......@@ -320,7 +320,7 @@ public:
* less than three particles, this must be -1.
* @param parameters the list of per-donor parameter values for the donor
*/
void setDonorParameters(int index, int d1, int d2, int d3, const std::vector<double>& parameters);
void setDonorParameters(int index, int d1, int d2, int d3, const std::vector<double>& parameters=std::vector<double>());
/**
* Add an acceptor group to the force
*
......@@ -332,7 +332,7 @@ public:
* @param parameters the list of per-acceptor parameter values for the new acceptor
* @return the index of the acceptor that was added
*/
int addAcceptor(int a1, int a2, int a3, const std::vector<double>& parameters);
int addAcceptor(int a1, int a2, int a3, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the properties of an acceptor group.
*
......@@ -356,7 +356,7 @@ public:
* less than three particles, this must be -1.
* @param parameters the list of per-acceptor parameter values for the acceptor
*/
void setAcceptorParameters(int index, int a1, int a2, int a3, const std::vector<double>& parameters);
void setAcceptorParameters(int index, int a1, int a2, int a3, const std::vector<double>& parameters=std::vector<double>());
/**
* Add a donor-acceptor pair to the list of interactions that should be excluded.
*
......
......@@ -348,7 +348,7 @@ public:
* @param type the type of the new particle
* @return the index of the particle that was added
*/
int addParticle(const std::vector<double>& parameters, int type=0);
int addParticle(const std::vector<double>& parameters=std::vector<double>(), int type=0);
/**
* Get the nonbonded force parameters for a particle.
*
......
......@@ -328,7 +328,7 @@ public:
* @param parameters the list of parameters for the new particle
* @return the index of the particle that was added
*/
int addParticle(const std::vector<double>& parameters);
int addParticle(const std::vector<double>& parameters=std::vector<double>());
/**
* Get the nonbonded force parameters for a particle.
*
......
......@@ -172,7 +172,7 @@ public:
* @param parameters the list of parameters for the new torsion
* @return the index of the torsion that was added
*/
int addTorsion(int particle1, int particle2, int particle3, int particle4, const std::vector<double>& parameters);
int addTorsion(int particle1, int particle2, int particle3, int particle4, const std::vector<double>& parameters=std::vector<double>());
/**
* Get the force field parameters for a torsion term.
*
......@@ -194,7 +194,7 @@ public:
* @param particle4 the index of the fourth particle connected by the torsion
* @param parameters the list of parameters for the torsion
*/
void setTorsionParameters(int index, int particle1, int particle2, int particle3, int particle4, const std::vector<double>& parameters);
void setTorsionParameters(int index, int particle1, int particle2, int particle3, int particle4, const std::vector<double>& parameters=std::vector<double>());
/**
* Update the per-torsion parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
......
......@@ -132,8 +132,7 @@ void testIllegalVariable() {
system.addParticle(1.0);
system.addParticle(1.0);
CustomAngleForce* force = new CustomAngleForce("theta+none");
vector<double> params;
force->addAngle(0, 1, 2, params);
force->addAngle(0, 1, 2);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -135,8 +135,7 @@ void testIllegalVariable() {
system.addParticle(1.0);
system.addParticle(1.0);
CustomBondForce* force = new CustomBondForce("r+none");
vector<double> params;
force->addBond(0, 1, params);
force->addBond(0, 1);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -264,8 +264,7 @@ void testIllegalVariable() {
vector<int> groups;
groups.push_back(0);
groups.push_back(1);
vector<double> params;
force->addBond(groups, params);
force->addBond(groups);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -317,8 +317,7 @@ void testIllegalVariable() {
vector<int> particles;
particles.push_back(0);
particles.push_back(1);
vector<double> params;
force->addBond(particles, params);
force->addBond(particles);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -171,8 +171,7 @@ void testIllegalVariable() {
System system;
system.addParticle(1.0);
CustomExternalForce* force = new CustomExternalForce("x+none");
vector<double> params;
force->addParticle(0, params);
force->addParticle(0);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -475,8 +475,7 @@ void testIllegalVariable() {
system.addParticle(1.0);
CustomGBForce* force = new CustomGBForce();
force->addComputedValue("a", "r+none", CustomGBForce::ParticlePair);
vector<double> params;
force->addParticle(params);
force->addParticle();
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -230,9 +230,8 @@ void testIllegalVariable() {
system.addParticle(1.0);
system.addParticle(1.0);
CustomHbondForce* force = new CustomHbondForce("1+none");
vector<double> params;
force->addDonor(0, -1, -1, params);
force->addAcceptor(1, -1, -1, params);
force->addDonor(0, -1, -1);
force->addAcceptor(1, -1, -1);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -711,8 +711,7 @@ void testIllegalVariable() {
System system;
system.addParticle(1.0);
CustomManyParticleForce* force = new CustomManyParticleForce(2, "x1+y2+none");
vector<double> params;
force->addParticle(params);
force->addParticle();
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -997,8 +997,7 @@ void testIllegalVariable() {
System system;
system.addParticle(1.0);
CustomNonbondedForce* force = new CustomNonbondedForce("r+none");
vector<double> params;
force->addParticle(params);
force->addParticle();
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
......@@ -173,8 +173,7 @@ void testIllegalVariable() {
system.addParticle(1.0);
system.addParticle(1.0);
CustomTorsionForce* force = new CustomTorsionForce("theta+none");
vector<double> params;
force->addTorsion(0, 1, 2, 3, params);
force->addTorsion(0, 1, 2, 3);
system.addForce(force);
VerletIntegrator integrator(0.001);
bool threwException = false;
......
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