| 780 |
|
// make the integrator |
| 781 |
|
|
| 782 |
|
|
| 783 |
< |
NVT* myNVT = NULL; |
| 783 |
> |
NVT* myNVT = NULL; |
| 784 |
> |
NPTi* myNPTi = NULL; |
| 785 |
> |
NPTf* myNPTf = NULL; |
| 786 |
|
switch( ensembleCase ){ |
| 787 |
|
|
| 788 |
|
case NVE_ENS: |
| 795 |
|
|
| 796 |
|
if (the_globals->haveTauThermostat()) |
| 797 |
|
myNVT->setTauThermostat(the_globals->getTauThermostat()); |
| 798 |
< |
// else if (the_globals->haveQmass()) |
| 797 |
< |
// myNVT->setQmass(the_globals->getQmass()); |
| 798 |
> |
|
| 799 |
|
else { |
| 800 |
|
sprintf( painCave.errMsg, |
| 801 |
|
"SimSetup error: If you use the NVT\n" |
| 802 |
< |
" ensemble, you must set either tauThermostat or qMass.\n" |
| 803 |
< |
" Neither of these was found in the BASS file.\n"); |
| 802 |
> |
" ensemble, you must set tauThermostat.\n"); |
| 803 |
> |
painCave.isFatal = 1; |
| 804 |
> |
simError(); |
| 805 |
> |
} |
| 806 |
> |
break; |
| 807 |
> |
|
| 808 |
> |
case NPTi_ENS: |
| 809 |
> |
myNPTi = new NPTi( simnfo, the_ff ); |
| 810 |
> |
myNPTi->setTargetTemp( the_globals->getTargetTemp()); |
| 811 |
> |
|
| 812 |
> |
if (the_globals->haveTargetPressure()) |
| 813 |
> |
myNPTi->setTargetPressure(the_globals->getTargetPressure()); |
| 814 |
> |
else { |
| 815 |
> |
sprintf( painCave.errMsg, |
| 816 |
> |
"SimSetup error: If you use a constant pressure\n" |
| 817 |
> |
" ensemble, you must set targetPressure in the BASS file.\n"); |
| 818 |
> |
painCave.isFatal = 1; |
| 819 |
> |
simError(); |
| 820 |
> |
} |
| 821 |
> |
|
| 822 |
> |
if( the_globals->haveTauThermostat() ) |
| 823 |
> |
myNPTi->setTauThermostat( the_globals->getTauThermostat() ); |
| 824 |
> |
else{ |
| 825 |
> |
sprintf( painCave.errMsg, |
| 826 |
> |
"SimSetup error: If you use an NPT\n" |
| 827 |
> |
" ensemble, you must set tauThermostat.\n"); |
| 828 |
> |
painCave.isFatal = 1; |
| 829 |
> |
simError(); |
| 830 |
> |
} |
| 831 |
> |
|
| 832 |
> |
if( the_globals->haveTauBarostat() ) |
| 833 |
> |
myNPTi->setTauBarostat( the_globals->getTauBarostat() ); |
| 834 |
> |
else{ |
| 835 |
> |
sprintf( painCave.errMsg, |
| 836 |
> |
"SimSetup error: If you use an NPT\n" |
| 837 |
> |
" ensemble, you must set tauBarostat.\n"); |
| 838 |
> |
painCave.isFatal = 1; |
| 839 |
> |
simError(); |
| 840 |
> |
} |
| 841 |
> |
break; |
| 842 |
> |
|
| 843 |
> |
case NPTf_ENS: |
| 844 |
> |
myNPTf = new NPTf( simnfo, the_ff ); |
| 845 |
> |
myNPTf->setTargetTemp( the_globals->getTargetTemp()); |
| 846 |
> |
|
| 847 |
> |
if (the_globals->haveTargetPressure()) |
| 848 |
> |
myNPTf->setTargetPressure(the_globals->getTargetPressure()); |
| 849 |
> |
else { |
| 850 |
> |
sprintf( painCave.errMsg, |
| 851 |
> |
"SimSetup error: If you use a constant pressure\n" |
| 852 |
> |
" ensemble, you must set targetPressure in the BASS file.\n"); |
| 853 |
> |
painCave.isFatal = 1; |
| 854 |
> |
simError(); |
| 855 |
> |
} |
| 856 |
> |
|
| 857 |
> |
if( the_globals->haveTauThermostat() ) |
| 858 |
> |
myNPTf->setTauThermostat( the_globals->getTauThermostat() ); |
| 859 |
> |
else{ |
| 860 |
> |
sprintf( painCave.errMsg, |
| 861 |
> |
"SimSetup error: If you use an NPT\n" |
| 862 |
> |
" ensemble, you must set tauThermostat.\n"); |
| 863 |
|
painCave.isFatal = 1; |
| 864 |
|
simError(); |
| 865 |
|
} |
| 866 |
+ |
|
| 867 |
+ |
if( the_globals->haveTauBarostat() ) |
| 868 |
+ |
myNPTf->setTauBarostat( the_globals->getTauBarostat() ); |
| 869 |
+ |
else{ |
| 870 |
+ |
sprintf( painCave.errMsg, |
| 871 |
+ |
"SimSetup error: If you use an NPT\n" |
| 872 |
+ |
" ensemble, you must set tauBarostat.\n"); |
| 873 |
+ |
painCave.isFatal = 1; |
| 874 |
+ |
simError(); |
| 875 |
+ |
} |
| 876 |
|
break; |
| 877 |
+ |
|
| 878 |
+ |
|
| 879 |
|
|
| 880 |
|
default: |
| 881 |
|
sprintf( painCave.errMsg, |