1 |
|
#ifndef __SIMSETUP_H__ |
2 |
|
#define __SIMSETUP_H__ |
3 |
< |
|
3 |
> |
#include <string> |
4 |
|
#include "MakeStamps.hpp" |
5 |
|
#include "Globals.hpp" |
6 |
|
#include "ForceFields.hpp" |
8 |
|
#include "ReadWrite.hpp" |
9 |
|
#include "AllIntegrator.hpp" |
10 |
|
|
11 |
+ |
using namespace std; |
12 |
|
// this routine is defined in BASS_interface.cpp |
13 |
|
extern void set_interface_stamps( MakeStamps* ms, Globals* g ); |
14 |
|
|
15 |
+ |
string getPrefix(const string& str ){ |
16 |
+ |
string prefix; |
17 |
+ |
string suffix; |
18 |
+ |
int pos; |
19 |
+ |
|
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 |
+ |
|
36 |
|
class SimSetup{ |
37 |
|
|
38 |
|
public: |
74 |
|
|
75 |
|
#endif //is_mpi |
76 |
|
|
77 |
< |
void initFromBass( void ); |
77 |
> |
void initFromMetaDataFile( void ); |
78 |
|
void makeMolecules( void ); |
79 |
|
void makeElement( double x, double y, double z ); |
80 |
|
|