Skip to content

Commit b3ead8b

Browse files
author
Christian Schafmeisterr
committed
Add coordinates to error
1 parent a9e3825 commit b3ead8b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/chem/minimizer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ namespace chem
103103

104104
#define MINIMIZER_ERROR(msg) ERROR(_sym_MinimizerError,core::lisp_createList(kw::_sym_message,core::Str_O::create(msg)))
105105
#define MINIMIZER_EXCEEDED_MAX_STEPS_ERROR(msg) ERROR(_sym_MinimizerExceededMaxSteps,core::lisp_createList(kw::_sym_minimizer,msg._Minimizer, kw::_sym_number_of_steps, core::make_fixnum(msg._NumberOfSteps)));
106-
#define MINIMIZER_STUCK_ERROR(msg,localSteps) ERROR(_sym_MinimizerStuck,core::lisp_createList(kw::_sym_message,core::SimpleBaseString_O::make(msg), kw::_sym_localSteps, core::clasp_make_fixnum(localSteps)))
106+
#define MINIMIZER_STUCK_ERROR(msg,localSteps,coordinates) ERROR(_sym_MinimizerStuck,core::lisp_createList(kw::_sym_message,core::SimpleBaseString_O::make(msg), kw::_sym_localSteps, core::clasp_make_fixnum(localSteps), kw::_sym_coordinates, coordinates))
107107

108108

109109

@@ -1346,7 +1346,7 @@ void Minimizer_O::_conjugateGradient(int numSteps,
13461346
//
13471347
fp = dTotalEnergyForce( pos, energyScale, force, activeAtomMask );
13481348
this->_ScoringFunction->saveCoordinatesAndForcesFromVectors(pos,force);
1349-
MINIMIZER_STUCK_ERROR("Stuck in conjugate gradients",localSteps);
1349+
MINIMIZER_STUCK_ERROR("Stuck in conjugate gradients",localSteps,pos);
13501350
}
13511351
}
13521352

src/lisp/chem-extras/chem.lisp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
(in-package :chem.extras)
22

3+
(export 'chem::coordinates :chem)
4+
35
(defparameter chem:*save-positions* nil)
46

57
(defgeneric chem:compute-merged-nonbond-force-field-for-aggregate (aggregate atom-types))

0 commit comments

Comments
 (0)