mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
- put SnapshotVect in the RDKit namespace
This commit is contained in:
@@ -185,7 +185,7 @@ int ForceField::minimize(unsigned int maxIts, double forceTol,
|
||||
return minimize(0, NULL, maxIts, forceTol, energyTol);
|
||||
}
|
||||
|
||||
int ForceField::minimize(unsigned int snapshotFreq, SnapshotVect *snapshotVect,
|
||||
int ForceField::minimize(unsigned int snapshotFreq, RDKit::SnapshotVect *snapshotVect,
|
||||
unsigned int maxIts, double forceTol, double energyTol) {
|
||||
PRECONDITION(df_init, "not initialized");
|
||||
PRECONDITION(static_cast<unsigned int>(d_numPoints) == d_positions.size(),
|
||||
|
||||
@@ -129,7 +129,7 @@ class ForceField {
|
||||
- 0: indicates success
|
||||
- 1: the minimization did not converge in \c maxIts iterations.
|
||||
*/
|
||||
int minimize(unsigned int snapshotFreq, SnapshotVect *snapshotVect,
|
||||
int minimize(unsigned int snapshotFreq, RDKit::SnapshotVect *snapshotVect,
|
||||
unsigned int maxIts = 200, double forceTol = 1e-4,
|
||||
double energyTol = 1e-6);
|
||||
|
||||
|
||||
@@ -132,11 +132,11 @@ PyObject *ForceFieldGetExtraPointLoc(PyForceField *self, unsigned int idx) {
|
||||
|
||||
python::tuple PyForceField::minimizeTrajectory(unsigned int snapshotFreq, int maxIts, double forceTol, double energyTol) {
|
||||
PRECONDITION(this->field, "no force field");
|
||||
SnapshotVect snapshotVect;
|
||||
RDKit::SnapshotVect snapshotVect;
|
||||
int resInt = this->field->minimize(snapshotFreq, &snapshotVect,
|
||||
maxIts, forceTol, energyTol);
|
||||
python::list l;
|
||||
for (SnapshotVect::const_iterator it = snapshotVect.begin(); it != snapshotVect.end(); ++it)
|
||||
for (RDKit::SnapshotVect::const_iterator it = snapshotVect.begin(); it != snapshotVect.end(); ++it)
|
||||
l.append(new RDKit::Snapshot(*it));
|
||||
return python::make_tuple(resInt, l);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
namespace RDKit {
|
||||
class Snapshot;
|
||||
class Trajectory;
|
||||
typedef std::vector<Snapshot> SnapshotVect;
|
||||
}
|
||||
typedef std::vector<RDKit::Snapshot> SnapshotVect;
|
||||
|
||||
namespace RDKit {
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ class Trajectory {
|
||||
\param dimension represents the dimensionality of this Trajectory's coordinate tuples;
|
||||
this is normally 2 (2D coordinates) or 3 (3D coordinates)
|
||||
\param numPoints is the number of coordinate tuples associated to each Snapshot
|
||||
\param snapshotVect (optional, defaults to NULL) is a pointer to a snapshotVect
|
||||
\param snapshotVect (optional, defaults to NULL) is a pointer to a SnapshotVect
|
||||
used to initialize the Trajectory; if not NULL, the Trajectory takes ownership
|
||||
of the snapshotVect
|
||||
of the SnapshotVect
|
||||
*/
|
||||
Trajectory(unsigned int dimension, unsigned int numPoints, SnapshotVect *snapshotVect = NULL);
|
||||
/*! \brief Copy constructor
|
||||
|
||||
@@ -184,7 +184,7 @@ template <typename EnergyFunctor, typename GradientFunctor>
|
||||
int minimize(unsigned int dim, double *pos, double gradTol,
|
||||
unsigned int &numIters, double &funcVal, EnergyFunctor func,
|
||||
GradientFunctor gradFunc, unsigned int snapshotFreq,
|
||||
SnapshotVect *snapshotVect, double funcTol = TOLX,
|
||||
RDKit::SnapshotVect *snapshotVect, double funcTol = TOLX,
|
||||
unsigned int maxIts = MAXITS) {
|
||||
RDUNUSED_PARAM(funcTol);
|
||||
PRECONDITION(pos, "bad input array");
|
||||
|
||||
Reference in New Issue
Block a user