@@ -217,7 +217,7 @@ void Input::reader(const PCMInput & host_input)
217
217
mode_ = std::string (" IMPLICIT" );
218
218
219
219
std::string name = trim_and_upper (host_input.solvent );
220
- if (name.empty ()) {
220
+ if (name.empty () || name == " EXPLICIT " ) {
221
221
hasSolvent_ = false ;
222
222
// Get the probe radius
223
223
probeRadius_ = host_input.probe_radius * angstromToBohr ();
@@ -259,6 +259,13 @@ void Input::reader(const PCMInput & host_input)
259
259
isDynamic_ = false ;
260
260
261
261
providedBy_ = std::string (" host-side" );
262
+
263
+ // Fill the input wrapping structs
264
+ insideGreenData_ = greenData (derivativeInsideType_, integratorType_, profileType_, epsilonInside_, integratorScaling_);
265
+ outsideStaticGreenData_ = greenData (derivativeOutsideType_,
266
+ integratorType_, profileType_, epsilonStaticOutside_, integratorScaling_);
267
+ outsideDynamicGreenData_ = greenData (derivativeOutsideType_,
268
+ integratorType_, profileType_, epsilonDynamicOutside_, integratorScaling_);
262
269
}
263
270
264
271
void Input::semanticCheck ()
@@ -280,9 +287,9 @@ void Input::initMolecule()
280
287
j += 4 ;
281
288
}
282
289
// 3. list of atoms and list of spheres
283
- double factor = angstromToBohr ();
284
290
std::vector<Atom> radiiSet;
285
291
std::vector<Atom> atoms;
292
+ atoms.reserve (nuclei);
286
293
if ( radiiSet_ == " UFF" ) {
287
294
radiiSet = initUFF ();
288
295
radiiSetName_ = " UFF" ;
@@ -296,15 +303,15 @@ void Input::initMolecule()
296
303
for (int i = 0 ; i < charges.size (); ++i) {
297
304
int index = int (charges (i)) - 1 ;
298
305
atoms.push_back (radiiSet[index]);
299
- if (scaling_) atoms[index ].radiusScaling = 1.2 ;
306
+ if (scaling_) atoms[i ].radiusScaling = 1.2 ;
300
307
}
301
308
// Based on the creation mode (Implicit or Atoms)
302
309
// the spheres list might need postprocessing
303
310
if ( mode_ == " IMPLICIT" || mode_ == " ATOMS" ) {
304
311
for (int i = 0 ; i < charges.size (); ++i) {
305
- int index = int ( charges (i)) - 1 ;
306
- double radius = radiiSet[index ].radius * factor;
307
- if (scaling_) radius *= 1.2 ;
312
+ // Convert to Bohr and multiply by scaling factor (alpha)
313
+ double radius = atoms[i ].radius * angstromToBohr ()
314
+ * atoms[i]. radiusScaling ;
308
315
spheres_.push_back (Sphere (centers.col (i), radius));
309
316
}
310
317
if (mode_ == " ATOMS" ) {
@@ -348,48 +355,45 @@ cavityData Input::cavityParams()
348
355
greenData Input::insideGreenParams ()
349
356
{
350
357
if (insideGreenData_.empty ) {
351
- int profile = profilePolicy (" UNIFORM" );
352
- insideGreenData_ = greenData (derivativeInsideType_, integratorType_, profile, epsilonInside_, integratorScaling_);
358
+ insideGreenData_ = greenData (derivativeInsideType_, integratorType_, profileType_, epsilonInside_, integratorScaling_);
353
359
}
354
360
return insideGreenData_;
355
361
}
356
362
357
363
greenData Input::outsideStaticGreenParams ()
358
364
{
359
- if (outsideStaticGreenData_.empty ) {
360
- int profile = profilePolicy (" UNIFORM" );
361
- outsideStaticGreenData_ = greenData (derivativeOutsideType_,
362
- integratorType_, profile, epsilonStaticOutside_, integratorScaling_);
363
- if (not hasSolvent_) {
364
- outsideStaticGreenData_.howProfile = profileType_;
365
- outsideStaticGreenData_.epsilon1 = epsilonStatic1_;
366
- outsideStaticGreenData_.epsilon2 = epsilonStatic2_;
367
- outsideStaticGreenData_.center = center_;
368
- outsideStaticGreenData_.width = width_;
369
- outsideStaticGreenData_.origin << origin_[0 ], origin_[1 ], origin_[2 ];
370
- outsideStaticGreenData_.maxL = maxL_;
371
- }
365
+ if (outsideStaticGreenData_.empty ) {
366
+ outsideStaticGreenData_ = greenData (derivativeOutsideType_,
367
+ integratorType_, profileType_, epsilonStaticOutside_, integratorScaling_);
368
+ if (not hasSolvent_) {
369
+ outsideStaticGreenData_.howProfile = profileType_;
370
+ outsideStaticGreenData_.epsilon1 = epsilonStatic1_;
371
+ outsideStaticGreenData_.epsilon2 = epsilonStatic2_;
372
+ outsideStaticGreenData_.center = center_;
373
+ outsideStaticGreenData_.width = width_;
374
+ outsideStaticGreenData_.origin << origin_[0 ], origin_[1 ], origin_[2 ];
375
+ outsideStaticGreenData_.maxL = maxL_;
372
376
}
373
- return outsideStaticGreenData_;
377
+ }
378
+ return outsideStaticGreenData_;
374
379
}
375
380
376
381
greenData Input::outsideDynamicGreenParams ()
377
382
{
378
- if (outsideDynamicGreenData_.empty ) {
379
- int profile = profilePolicy (" UNIFORM" );
380
- outsideDynamicGreenData_ = greenData (derivativeOutsideType_,
381
- integratorType_, profile, epsilonDynamicOutside_, integratorScaling_);
382
- if (not hasSolvent_) {
383
- outsideDynamicGreenData_.howProfile = profileType_;
384
- outsideDynamicGreenData_.epsilon1 = epsilonDynamic1_;
385
- outsideDynamicGreenData_.epsilon2 = epsilonDynamic2_;
386
- outsideDynamicGreenData_.center = center_;
387
- outsideDynamicGreenData_.width = width_;
388
- outsideDynamicGreenData_.origin << origin_[0 ], origin_[1 ], origin_[2 ];
389
- outsideDynamicGreenData_.maxL = maxL_;
390
- }
383
+ if (outsideDynamicGreenData_.empty ) {
384
+ outsideDynamicGreenData_ = greenData (derivativeOutsideType_,
385
+ integratorType_, profileType_, epsilonDynamicOutside_, integratorScaling_);
386
+ if (not hasSolvent_) {
387
+ outsideDynamicGreenData_.howProfile = profileType_;
388
+ outsideDynamicGreenData_.epsilon1 = epsilonDynamic1_;
389
+ outsideDynamicGreenData_.epsilon2 = epsilonDynamic2_;
390
+ outsideDynamicGreenData_.center = center_;
391
+ outsideDynamicGreenData_.width = width_;
392
+ outsideDynamicGreenData_.origin << origin_[0 ], origin_[1 ], origin_[2 ];
393
+ outsideDynamicGreenData_.maxL = maxL_;
391
394
}
392
- return outsideDynamicGreenData_;
395
+ }
396
+ return outsideDynamicGreenData_;
393
397
}
394
398
395
399
solverData Input::solverParams ()
0 commit comments