| 1 |
|
#ifndef __SIMSETUP_H__ |
| 2 |
|
#define __SIMSETUP_H__ |
| 3 |
|
#include <string> |
| 4 |
+ |
#include "StringUtils.hpp" |
| 5 |
|
#include "MakeStamps.hpp" |
| 6 |
|
#include "Globals.hpp" |
| 7 |
|
#include "ForceFields.hpp" |
| 13 |
|
// this routine is defined in BASS_interface.cpp |
| 14 |
|
extern void set_interface_stamps( MakeStamps* ms, Globals* g ); |
| 15 |
|
|
| 16 |
< |
string getPrefix(const string& str ){ |
| 16 |
< |
string prefix; |
| 17 |
< |
string suffix; |
| 18 |
< |
int pos; |
| 16 |
> |
string getPrefix(const string& str ); |
| 17 |
|
|
| 20 |
– |
pos = str.rfind("."); |
| 21 |
– |
|
| 22 |
– |
if (pos >= 0) { |
| 23 |
– |
prefix = str.substr(0, pos); |
| 24 |
– |
suffix = str.substr(pos, str.size()); |
| 25 |
– |
|
| 26 |
– |
// leave .bass there in case we've reverted to old habits |
| 27 |
– |
if (!strcasecmp(suffix.c_str()), ".md") || !strcasecmp(suffix.c_str(), ".bass")) |
| 28 |
– |
return prefix; |
| 29 |
– |
else |
| 30 |
– |
return str; |
| 31 |
– |
|
| 32 |
– |
} else |
| 33 |
– |
return str; |
| 34 |
– |
}; |
| 35 |
– |
|
| 18 |
|
class SimSetup{ |
| 19 |
|
|
| 20 |
|
public: |
| 27 |
|
void parseFile( char* fileName ); |
| 28 |
|
void createSim( void ); |
| 29 |
|
|
| 30 |
< |
|
| 30 |
> |
ForceFields* getForceField() {return the_ff;} |
| 31 |
|
private: |
| 32 |
|
|
| 33 |
|
#ifdef IS_MPI |