"vscode:/vscode.git/clone" did not exist on "447238ded2e791378ee21eeb208b559203b04f5d"
Unverified Commit 2abeb801 authored by Yannick Lemke's avatar Yannick Lemke Committed by GitHub
Browse files

fix(openmmapi): move getNum...() definitions to implementation files (#5009)



Fixes #5001.
Signed-off-by: default avatarYannick Lemke <yannick.lemke@posteo.de>
parent d47ea1de
...@@ -177,28 +177,20 @@ public: ...@@ -177,28 +177,20 @@ public:
* *
* This should be the same number of particles as the System * This should be the same number of particles as the System
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of Forces included in the ATMForce. * Get the number of Forces included in the ATMForce.
*/ */
int getNumForces() const { int getNumForces() const;
return forces.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the algebraic expression that gives the energy of the system * Get the algebraic expression that gives the energy of the system
*/ */
......
...@@ -61,15 +61,11 @@ public: ...@@ -61,15 +61,11 @@ public:
/** /**
* Get the number of maps that have been defined. * Get the number of maps that have been defined.
*/ */
int getNumMaps() const { int getNumMaps() const;
return maps.size();
}
/** /**
* Get the number of CMAP torsion terms in the potential function * Get the number of CMAP torsion terms in the potential function
*/ */
int getNumTorsions() const { int getNumTorsions() const;
return torsions.size();
}
/** /**
* Create a new map that can be used for torsion pairs. * Create a new map that can be used for torsion pairs.
* *
......
...@@ -94,28 +94,20 @@ public: ...@@ -94,28 +94,20 @@ public:
/** /**
* Get the number of angles for which force field parameters have been defined. * Get the number of angles for which force field parameters have been defined.
*/ */
int getNumAngles() const { int getNumAngles() const;
return angles.size();
}
/** /**
* Get the number of per-angle parameters that the interaction depends on. * Get the number of per-angle parameters that the interaction depends on.
*/ */
int getNumPerAngleParameters() const { int getNumPerAngleParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy for each angle * Get the algebraic expression that gives the interaction energy for each angle
*/ */
......
...@@ -94,28 +94,20 @@ public: ...@@ -94,28 +94,20 @@ public:
/** /**
* Get the number of bonds for which force field parameters have been defined. * Get the number of bonds for which force field parameters have been defined.
*/ */
int getNumBonds() const { int getNumBonds() const;
return bonds.size();
}
/** /**
* Get the number of per-bond parameters that the interaction depends on. * Get the number of per-bond parameters that the interaction depends on.
*/ */
int getNumPerBondParameters() const { int getNumPerBondParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy for each bond * Get the algebraic expression that gives the interaction energy for each bond
*/ */
......
...@@ -84,28 +84,20 @@ public: ...@@ -84,28 +84,20 @@ public:
/** /**
* Get the number of collective variables that the interaction depends on. * Get the number of collective variables that the interaction depends on.
*/ */
int getNumCollectiveVariables() const { int getNumCollectiveVariables() const;
return variables.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the algebraic expression that gives the energy of the system * Get the algebraic expression that gives the energy of the system
*/ */
......
...@@ -144,54 +144,38 @@ public: ...@@ -144,54 +144,38 @@ public:
/** /**
* Get the number of groups used to define each bond. * Get the number of groups used to define each bond.
*/ */
int getNumGroupsPerBond() const { int getNumGroupsPerBond() const;
return groupsPerBond;
}
/** /**
* Get the number of particle groups that have been defined. * Get the number of particle groups that have been defined.
*/ */
int getNumGroups() const { int getNumGroups() const;
return groups.size();
}
/** /**
* Get the number of bonds for which force field parameters have been defined. * Get the number of bonds for which force field parameters have been defined.
*/ */
int getNumBonds() const { int getNumBonds() const;
return bonds.size();
}
/** /**
* Get the number of per-bond parameters that the interaction depends on. * Get the number of per-bond parameters that the interaction depends on.
*/ */
int getNumPerBondParameters() const { int getNumPerBondParameters() const;
return bondParameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
* *
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. * @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/ */
int getNumFunctions() const { int getNumFunctions() const;
return functions.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy of each bond * Get the algebraic expression that gives the interaction energy of each bond
*/ */
......
...@@ -138,48 +138,34 @@ public: ...@@ -138,48 +138,34 @@ public:
/** /**
* Get the number of particles used to define each bond. * Get the number of particles used to define each bond.
*/ */
int getNumParticlesPerBond() const { int getNumParticlesPerBond() const;
return particlesPerBond;
}
/** /**
* Get the number of bonds for which force field parameters have been defined. * Get the number of bonds for which force field parameters have been defined.
*/ */
int getNumBonds() const { int getNumBonds() const;
return bonds.size();
}
/** /**
* Get the number of per-bond parameters that the interaction depends on. * Get the number of per-bond parameters that the interaction depends on.
*/ */
int getNumPerBondParameters() const { int getNumPerBondParameters() const;
return bondParameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
* *
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. * @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/ */
int getNumFunctions() const { int getNumFunctions() const;
return functions.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy of each bond * Get the algebraic expression that gives the interaction energy of each bond
*/ */
......
...@@ -106,21 +106,15 @@ public: ...@@ -106,21 +106,15 @@ public:
/** /**
* Get the number of particles for which force field parameters have been defined. * Get the number of particles for which force field parameters have been defined.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of per-particle parameters that the force depends on * Get the number of per-particle parameters that the force depends on
*/ */
int getNumPerParticleParameters() const { int getNumPerParticleParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the force depends on. * Get the number of global parameters that the force depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the algebraic expression that gives the potential energy of each particle * Get the algebraic expression that gives the potential energy of each particle
*/ */
......
...@@ -193,60 +193,42 @@ public: ...@@ -193,60 +193,42 @@ public:
/** /**
* Get the number of particles for which force field parameters have been defined. * Get the number of particles for which force field parameters have been defined.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of particle pairs whose interactions should be excluded. * Get the number of particle pairs whose interactions should be excluded.
*/ */
int getNumExclusions() const { int getNumExclusions() const;
return exclusions.size();
}
/** /**
* Get the number of per-particle parameters that the interaction depends on. * Get the number of per-particle parameters that the interaction depends on.
*/ */
int getNumPerParticleParameters() const { int getNumPerParticleParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
* *
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. * @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/ */
int getNumFunctions() const { int getNumFunctions() const;
return functions.size();
}
/** /**
* Get the number of per-particle computed values the interaction depends on. * Get the number of per-particle computed values the interaction depends on.
*/ */
int getNumComputedValues() const { int getNumComputedValues() const;
return computedValues.size();
}
/** /**
* Get the number of terms in the energy computation. * Get the number of terms in the energy computation.
*/ */
int getNumEnergyTerms() const { int getNumEnergyTerms() const;
return energyTerms.size();
}
/** /**
* Get the method used for handling long range nonbonded interactions. * Get the method used for handling long range nonbonded interactions.
*/ */
......
...@@ -138,53 +138,37 @@ public: ...@@ -138,53 +138,37 @@ public:
/** /**
* Get the number of donors for which force field parameters have been defined. * Get the number of donors for which force field parameters have been defined.
*/ */
int getNumDonors() const { int getNumDonors() const;
return donors.size();
}
/** /**
* Get the number of acceptors for which force field parameters have been defined. * Get the number of acceptors for which force field parameters have been defined.
*/ */
int getNumAcceptors() const { int getNumAcceptors() const;
return acceptors.size();
}
/** /**
* Get the number of donor-acceptor pairs whose interactions should be excluded. * Get the number of donor-acceptor pairs whose interactions should be excluded.
*/ */
int getNumExclusions() const { int getNumExclusions() const;
return exclusions.size();
}
/** /**
* Get the number of per-donor parameters that the interaction depends on. * Get the number of per-donor parameters that the interaction depends on.
*/ */
int getNumPerDonorParameters() const { int getNumPerDonorParameters() const;
return donorParameters.size();
}
/** /**
* Get the number of per-acceptor parameters that the interaction depends on. * Get the number of per-acceptor parameters that the interaction depends on.
*/ */
int getNumPerAcceptorParameters() const { int getNumPerAcceptorParameters() const;
return acceptorParameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
* *
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. * @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/ */
int getNumFunctions() const { int getNumFunctions() const;
return functions.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy between a donor and an acceptor * Get the algebraic expression that gives the interaction energy between a donor and an acceptor
*/ */
......
...@@ -389,27 +389,19 @@ public: ...@@ -389,27 +389,19 @@ public:
/** /**
* Get the number of global variables that have been defined. * Get the number of global variables that have been defined.
*/ */
int getNumGlobalVariables() const { int getNumGlobalVariables() const;
return globalNames.size();
}
/** /**
* Get the number of per-DOF variables that have been defined. * Get the number of per-DOF variables that have been defined.
*/ */
int getNumPerDofVariables() const { int getNumPerDofVariables() const;
return perDofNames.size();
}
/** /**
* Get the number of computation steps that have been added. * Get the number of computation steps that have been added.
*/ */
int getNumComputations() const { int getNumComputations() const;
return computations.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Define a new global variable. * Define a new global variable.
* *
......
...@@ -240,39 +240,27 @@ public: ...@@ -240,39 +240,27 @@ public:
/** /**
* Get the number of particles in each set for which the energy is evaluated * Get the number of particles in each set for which the energy is evaluated
*/ */
int getNumParticlesPerSet() const { int getNumParticlesPerSet() const;
return particlesPerSet;
}
/** /**
* Get the number of particles for which force field parameters have been defined. * Get the number of particles for which force field parameters have been defined.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of particle pairs whose interactions should be excluded. * Get the number of particle pairs whose interactions should be excluded.
*/ */
int getNumExclusions() const { int getNumExclusions() const;
return exclusions.size();
}
/** /**
* Get the number of per-particle parameters that the interaction depends on. * Get the number of per-particle parameters that the interaction depends on.
*/ */
int getNumPerParticleParameters() const { int getNumPerParticleParameters() const;
return particleParameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy of each bond * Get the algebraic expression that gives the interaction energy of each bond
*/ */
......
...@@ -195,60 +195,42 @@ public: ...@@ -195,60 +195,42 @@ public:
/** /**
* Get the number of particles for which force field parameters have been defined. * Get the number of particles for which force field parameters have been defined.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of particle pairs whose interactions should be excluded. * Get the number of particle pairs whose interactions should be excluded.
*/ */
int getNumExclusions() const { int getNumExclusions() const;
return exclusions.size();
}
/** /**
* Get the number of per-particle parameters that the interaction depends on. * Get the number of per-particle parameters that the interaction depends on.
*/ */
int getNumPerParticleParameters() const { int getNumPerParticleParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
*/ */
int getNumTabulatedFunctions() const { int getNumTabulatedFunctions() const;
return functions.size();
}
/** /**
* Get the number of tabulated functions that have been defined. * Get the number of tabulated functions that have been defined.
* *
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead. * @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/ */
int getNumFunctions() const { int getNumFunctions() const;
return functions.size();
}
/** /**
* Get the number of per-particle computed values the interaction depends on. * Get the number of per-particle computed values the interaction depends on.
*/ */
int getNumComputedValues() const { int getNumComputedValues() const;
return computedValues.size();
}
/** /**
* Get the number of interaction groups that have been defined. * Get the number of interaction groups that have been defined.
*/ */
int getNumInteractionGroups() const { int getNumInteractionGroups() const;
return interactionGroups.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy between two particles * Get the algebraic expression that gives the interaction energy between two particles
*/ */
......
...@@ -104,28 +104,20 @@ public: ...@@ -104,28 +104,20 @@ public:
/** /**
* Get the number of torsions for which force field parameters have been defined. * Get the number of torsions for which force field parameters have been defined.
*/ */
int getNumTorsions() const { int getNumTorsions() const;
return torsions.size();
}
/** /**
* Get the number of per-torsion parameters that the interaction depends on. * Get the number of per-torsion parameters that the interaction depends on.
*/ */
int getNumPerTorsionParameters() const { int getNumPerTorsionParameters() const;
return parameters.size();
}
/** /**
* Get the number of global parameters that the interaction depends on. * Get the number of global parameters that the interaction depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the number of global parameters with respect to which the derivative of the energy * Get the number of global parameters with respect to which the derivative of the energy
* should be computed. * should be computed.
*/ */
int getNumEnergyParameterDerivatives() const { int getNumEnergyParameterDerivatives() const;
return energyParameterDerivatives.size();
}
/** /**
* Get the algebraic expression that gives the interaction energy for each torsion * Get the algebraic expression that gives the interaction energy for each torsion
*/ */
......
...@@ -77,9 +77,7 @@ public: ...@@ -77,9 +77,7 @@ public:
/** /**
* Get the number of global parameters that the energy depends on. * Get the number of global parameters that the energy depends on.
*/ */
int getNumGlobalParameters() const { int getNumGlobalParameters() const;
return globalParameters.size();
}
/** /**
* Get the algebraic expression that defines the energy. * Get the algebraic expression that defines the energy.
*/ */
......
...@@ -133,9 +133,7 @@ public: ...@@ -133,9 +133,7 @@ public:
/** /**
* Get the number of type pairs that have been added to the integrator. * Get the number of type pairs that have been added to the integrator.
*/ */
int getNumTypePairs() const { int getNumTypePairs() const;
return pairs.size();
}
/** /**
* Add a type pair. This overrides the default friction and cutoff distance for interactions * Add a type pair. This overrides the default friction and cutoff distance for interactions
* between particles of two particular types. * between particles of two particular types.
......
...@@ -83,9 +83,7 @@ public: ...@@ -83,9 +83,7 @@ public:
/** /**
* Get the number of particles in the system. * Get the number of particles in the system.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Add the GBSA parameters for a particle. This should be called once for each particle * Add the GBSA parameters for a particle. This should be called once for each particle
* in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle. * in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.
......
...@@ -106,15 +106,11 @@ public: ...@@ -106,15 +106,11 @@ public:
/** /**
* Get the number of particles for which force field parameters have been defined. * Get the number of particles for which force field parameters have been defined.
*/ */
int getNumParticles() const { int getNumParticles() const;
return particles.size();
}
/** /**
* Get the number of special interactions that should be calculated differently from other interactions. * Get the number of special interactions that should be calculated differently from other interactions.
*/ */
int getNumExceptions() const { int getNumExceptions() const;
return exceptions.size();
}
/** /**
* Get the method used for handling long range interactions. * Get the method used for handling long range interactions.
*/ */
......
...@@ -56,9 +56,7 @@ public: ...@@ -56,9 +56,7 @@ public:
/** /**
* Get the number of harmonic bond angle terms in the potential function * Get the number of harmonic bond angle terms in the potential function
*/ */
int getNumAngles() const { int getNumAngles() const;
return angles.size();
}
/** /**
* Add an angle term to the force field. * Add an angle term to the force field.
* *
......
...@@ -56,9 +56,7 @@ public: ...@@ -56,9 +56,7 @@ public:
/** /**
* Get the number of harmonic bond stretch terms in the potential function * Get the number of harmonic bond stretch terms in the potential function
*/ */
int getNumBonds() const { int getNumBonds() const;
return bonds.size();
}
/** /**
* Add a bond term to the force field. * Add a bond term to the force field.
* *
......
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