# | Line 333 | Line 333 | void SimSetup::createSim( void ){ | |
---|---|---|
333 | ||
334 | // get some of the tricky things that may still be in the globals | |
335 | ||
336 | – | if( simnfo->n_dipoles ){ |
337 | – | |
338 | – | if( !the_globals->haveRRF() ){ |
339 | – | sprintf( painCave.errMsg, |
340 | – | "SimSetup Error, system has dipoles, but no rRF was set.\n"); |
341 | – | painCave.isFatal = 1; |
342 | – | simError(); |
343 | – | } |
344 | – | if( !the_globals->haveDielectric() ){ |
345 | – | sprintf( painCave.errMsg, |
346 | – | "SimSetup Error, system has dipoles, but no" |
347 | – | " dielectric was set.\n" ); |
348 | – | painCave.isFatal = 1; |
349 | – | simError(); |
350 | – | } |
351 | – | |
352 | – | simnfo->rRF = the_globals->getRRF(); |
353 | – | simnfo->dielectric = the_globals->getDielectric(); |
354 | – | } |
355 | – | |
356 | – | #ifdef IS_MPI |
357 | – | strcpy( checkPointMsg, "rRf and dielectric check out" ); |
358 | – | MPIcheckPoint(); |
359 | – | #endif // is_mpi |
336 | ||
337 | if( the_globals->haveBox() ){ | |
338 | simnfo->box_x = the_globals->getBox(); | |
# | Line 424 | Line 400 | void SimSetup::createSim( void ){ | |
400 | if( tot_torsions ){ | |
401 | makeTorsions(); | |
402 | } | |
427 | – | |
403 | ||
404 | ||
405 | + | if (the_globals->getUseRF() ) { |
406 | + | simnfo->useReactionField = 1; |
407 | + | |
408 | + | if( !the_globals->haveECR() ){ |
409 | + | sprintf( painCave.errMsg, |
410 | + | "SimSetup Warning: using default value of 1/2 the smallest " |
411 | + | "box length for the electrostaticCutoffRadius.\n" |
412 | + | "I hope you have a very fast processor!\n"); |
413 | + | painCave.isFatal = 0; |
414 | + | simError(); |
415 | + | double smallest; |
416 | + | smallest = simnfo->box_x; |
417 | + | if (simnfo->box_y <= smallest) smallest = simnfo->box_y; |
418 | + | if (simnfo->box_z <= smallest) smallest = simnfo->box_z; |
419 | + | simnfo->ecr = 0.5 * smallest; |
420 | + | } else { |
421 | + | simnfo->ecr = the_globals->getECR(); |
422 | + | } |
423 | ||
424 | + | if( !the_globals->haveEST() ){ |
425 | + | sprintf( painCave.errMsg, |
426 | + | "SimSetup Warning: using default value of 0.05 * the " |
427 | + | "electrostaticCutoffRadius for the electrostaticSkinThickness\n" |
428 | + | ); |
429 | + | painCave.isFatal = 0; |
430 | + | simError(); |
431 | + | simnfo->est = 0.05 * simnfo->ecr; |
432 | + | } else { |
433 | + | simnfo->est = the_globals->getEST(); |
434 | + | } |
435 | + | |
436 | + | if(!the_globals->haveDielectric() ){ |
437 | + | sprintf( painCave.errMsg, |
438 | + | "SimSetup Error: You are trying to use Reaction Field without" |
439 | + | "setting a dielectric constant!\n" |
440 | + | ); |
441 | + | painCave.isFatal = 1; |
442 | + | simError(); |
443 | + | } |
444 | + | simnfo->dielectric = the_globals->getDielectric(); |
445 | + | } else { |
446 | + | if (simnfo->n_dipoles) { |
447 | + | |
448 | + | if( !the_globals->haveECR() ){ |
449 | + | sprintf( painCave.errMsg, |
450 | + | "SimSetup Warning: using default value of 1/2 the smallest" |
451 | + | "box length for the electrostaticCutoffRadius.\n" |
452 | + | "I hope you have a very fast processor!\n"); |
453 | + | painCave.isFatal = 0; |
454 | + | simError(); |
455 | + | double smallest; |
456 | + | smallest = simnfo->box_x; |
457 | + | if (simnfo->box_y <= smallest) smallest = simnfo->box_y; |
458 | + | if (simnfo->box_z <= smallest) smallest = simnfo->box_z; |
459 | + | simnfo->ecr = 0.5 * smallest; |
460 | + | } else { |
461 | + | simnfo->ecr = the_globals->getECR(); |
462 | + | } |
463 | + | |
464 | + | if( !the_globals->haveEST() ){ |
465 | + | sprintf( painCave.errMsg, |
466 | + | "SimSetup Warning: using default value of 5% of the" |
467 | + | "electrostaticCutoffRadius for the " |
468 | + | "electrostaticSkinThickness\n" |
469 | + | ); |
470 | + | painCave.isFatal = 0; |
471 | + | simError(); |
472 | + | simnfo->est = 0.05 * simnfo->ecr; |
473 | + | } else { |
474 | + | simnfo->est = the_globals->getEST(); |
475 | + | } |
476 | + | } |
477 | + | } |
478 | ||
479 | + | #ifdef IS_MPI |
480 | + | strcpy( checkPointMsg, "electrostatic parameters check out" ); |
481 | + | MPIcheckPoint(); |
482 | + | #endif // is_mpi |
483 | ||
484 | if( the_globals->haveInitialConfig() ){ | |
485 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |