Collective Variables Module - Developer Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
colvarscript.h
1 // -*- c++ -*-
2 
3 #ifndef COLVARSCRIPT_H
4 #define COLVARSCRIPT_H
5 
6 #include <string>
7 #include "colvarmodule.h"
8 #include "colvarvalue.h"
9 #include "colvarbias.h"
10 #include "colvarproxy.h"
11 
12 // Only these error values are part of the scripting interface
13 #define COLVARSCRIPT_ERROR -1
14 #define COLVARSCRIPT_OK 0
15 
16 class colvarscript {
17 
18 private:
19  colvarproxy *proxy;
20  colvarmodule *colvars;
21 
22  inline colvarscript() {} // no-argument construction forbidden
23 
24 public:
25 
26  friend class colvarproxy;
27 
29  inline ~colvarscript() {}
30 
33 
35  std::string result;
36 
38  int run(int argc, char const *argv[]);
39 
40 private:
42  int proc_colvar(int argc, char const *argv[]);
43 
45  int proc_bias(int argc, char const *argv[]);
46 
48  int proc_features(colvardeps *obj,
49  int argc, char const *argv[]);
50 
52  std::string help_string(void);
53 };
54 
55 
56 #endif
Collective variables module (main class)
Definition: colvarmodule.h:71
Interface between the collective variables module and the simulation or analysis program (NAMD...
Definition: colvarproxy.h:20
Collective variables main module.
int proxy_error
If an error is caught by the proxy through fatal_error(), this is set to COLVARSCRIPT_ERROR.
Definition: colvarscript.h:32
Definition: colvarscript.h:16
Parent class for a member object of a bias, cv or cvc etc. containing features and their dependencies...
Definition: colvardeps.h:19
std::string result
If an error is returned by one of the methods, it should set this to the error message.
Definition: colvarscript.h:35
int run(int argc, char const *argv[])
Run script command with given positional arguments.
Definition: colvarscript.cpp:49