88 |
|
the_extendedsystem = new ExtendedSystem( simnfo ); |
89 |
|
the_extendedsystem->setTargetTemp(the_globals->getTargetTemp()); |
90 |
|
the_extendedsystem->setTargetPressure(the_globals->getTargetPressure()); |
91 |
+ |
the_extendedsystem->setQmass(the_globals->getQmass()); |
92 |
+ |
the_extendedsystem->setTauRelax(the_globals->getTauRelax()); |
93 |
|
} else if ( !strcasecmp( ensemble, "NVT") ) { |
94 |
|
the_extendedsystem = new ExtendedSystem( simnfo ); |
95 |
|
the_extendedsystem->setTargetTemp(the_globals->getTargetTemp()); |
96 |
+ |
the_extendedsystem->setQmass(the_globals->getQmass()); |
97 |
|
} else if ( !strcasecmp( ensemble, "NVE") ) { |
98 |
|
} else { |
99 |
|
sprintf( painCave.errMsg, |
109 |
|
strcpy( simnfo->mixingRule, the_globals->getMixingRule() ); |
110 |
|
simnfo->usePBC = the_globals->getPBC(); |
111 |
|
|
112 |
< |
if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF(); |
112 |
> |
int usesDipoles = 0; |
113 |
> |
if( !strcmp( force_field, "TraPPE_Ex" ) ){ |
114 |
> |
the_ff = new TraPPE_ExFF(); |
115 |
> |
usesDipoles = 1; |
116 |
> |
} |
117 |
|
else if( !strcasecmp( force_field, "LJ" ) ) the_ff = new LJ_FF(); |
118 |
|
else{ |
119 |
|
sprintf( painCave.errMsg, |
485 |
|
} |
486 |
|
simnfo->dielectric = the_globals->getDielectric(); |
487 |
|
} else { |
488 |
< |
if (simnfo->n_dipoles) { |
488 |
> |
if (usesDipoles) { |
489 |
|
|
490 |
|
if( !the_globals->haveECR() ){ |
491 |
|
sprintf( painCave.errMsg, |
492 |
< |
"SimSetup Warning: using default value of 1/2 the smallest" |
492 |
> |
"SimSetup Warning: using default value of 1/2 the smallest " |
493 |
|
"box length for the electrostaticCutoffRadius.\n" |
494 |
|
"I hope you have a very fast processor!\n"); |
495 |
|
painCave.isFatal = 0; |
505 |
|
|
506 |
|
if( !the_globals->haveEST() ){ |
507 |
|
sprintf( painCave.errMsg, |
508 |
< |
"SimSetup Warning: using default value of 5% of the" |
508 |
> |
"SimSetup Warning: using default value of 5%% of the " |
509 |
|
"electrostaticCutoffRadius for the " |
510 |
|
"electrostaticSkinThickness\n" |
511 |
|
); |
680 |
|
|
681 |
|
// new AllLong( simnfo ); |
682 |
|
|
676 |
– |
if( !strcmp( force_field, "TraPPE_Ex" ) ) new Symplectic(simnfo, |
677 |
– |
the_ff, |
678 |
– |
the_extendedsystem); |
679 |
– |
if( !strcmp( force_field, "LJ" ) ) new Verlet( *simnfo, |
680 |
– |
the_ff, |
681 |
– |
the_extendedsystem ); |
683 |
|
|
684 |
+ |
if( !strcmp( force_field, "TraPPE_Ex" ) ){ |
685 |
+ |
new Symplectic(simnfo, the_ff, the_extendedsystem); |
686 |
+ |
std::cerr << "called new Symplecic\n"; |
687 |
+ |
fprintf( stderr, "called new Symplectic. stderr\n" ); |
688 |
+ |
} |
689 |
+ |
else if( !strcmp( force_field, "LJ" ) ){ |
690 |
+ |
new Verlet( *simnfo, the_ff, the_extendedsystem ); |
691 |
+ |
std::cerr << "called new Verlet\n"; |
692 |
+ |
fprintf( stderr, "called new Verlet. stderr\n" ); |
693 |
+ |
} |
694 |
+ |
else { |
695 |
+ |
std::cerr << "I'm a bug.\n"; |
696 |
+ |
fprintf( stderr, "Ima bug. stderr %s\n", force_field); |
697 |
+ |
} |
698 |
|
#ifdef IS_MPI |
699 |
|
mpiSim->mpiRefresh(); |
700 |
|
#endif |