C++ wrapper for plumed.
More...
#include <Plumed.h>
|
| Plumed (const Plumed &) |
| Copy constructor is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure. More...
|
|
Plumed & | operator= (const Plumed &) |
| Assignment operator is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure. More...
|
|
|
plumed | main |
|
bool | cloned |
| keeps track if the object was created from scratch using the defaults destructor (cloned=false) or if it was imported from C or FORTRAN (cloned-true). More...
|
|
C++ wrapper for plumed.
This class provides a C++ interface to PLUMED.
Definition at line 314 of file Plumed.h.
PLMD::Plumed::Plumed |
( |
const char * |
c | ) |
|
|
inline |
Clone a Plumed object from a FORTRAN char* handler.
- Parameters
-
c | The FORTRAN handler (a char[32]). |
- Attention
- The Plumed object created in this manner will not finalize the corresponding plumed structure. It is expected that the FORTRAN code calls plumed_c_finalize for it
Definition at line 433 of file Plumed.h.
PLMD::Plumed::Plumed |
( |
plumed |
p | ) |
|
|
inline |
Clone a Plumed object from a C plumed structure.
- Parameters
-
- Attention
- The Plumed object created in this manner will not finalize the corresponding plumed structure. It is expected that the C code calls plumed_finalize for it
Definition at line 439 of file Plumed.h.
PLMD::Plumed::Plumed |
( |
const Plumed & |
| ) |
|
|
private |
Copy constructor is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure.
PLMD::Plumed::~Plumed |
( |
| ) |
|
|
inlinevirtual |
Destructor.
Destructor is virtual so as to allow correct inheritance from Plumed object. To avoid linking problems with g++, I specify "inline" also here (in principle it should be enough to specify it down in the definition of the function, but for some reason that I do not understand g++ does not inline it properly in that case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the way it is done here seems to work properly).
Definition at line 460 of file Plumed.h.
void PLMD::Plumed::cmd |
( |
const char * |
key, |
|
|
const void * |
val = NULL |
|
) |
| |
|
inline |
Send a command to this plumed object.
- Parameters
-
key | The name of the command to be executed |
val | The argument. It is declared as const to allow calls like p.cmd("A","B"), but for some choice of key it can change the content |
Definition at line 455 of file Plumed.h.
void PLMD::Plumed::gcmd |
( |
const char * |
key, |
|
|
const void * |
val |
|
) |
| |
|
inlinestatic |
Send a command to global-plumed.
- Parameters
-
key | The name of the command to be executed |
val | The argument. It is declared as const to allow calls like gcmd("A","B"), but for some choice of key it can change the content |
Definition at line 475 of file Plumed.h.
void PLMD::Plumed::gcreate |
( |
| ) |
|
|
inlinestatic |
Initialize global-plumed.
Definition at line 470 of file Plumed.h.
void PLMD::Plumed::gfinalize |
( |
| ) |
|
|
inlinestatic |
Finalize global-plumed.
Definition at line 480 of file Plumed.h.
bool PLMD::Plumed::ginitialized |
( |
| ) |
|
|
inlinestatic |
Check if global-plumed has been initialized.
- Returns
- true if global plumed object (see global()) is initialized (i.e. if gcreate() has been called), false otherwise.
Definition at line 465 of file Plumed.h.
Plumed PLMD::Plumed::global |
( |
| ) |
|
|
inlinestatic |
bool PLMD::Plumed::installed |
( |
| ) |
|
|
inlinestatic |
Check if plumed is installed (for runtime binding)
- Returns
- true if plumed is installed, false otherwise
Definition at line 422 of file Plumed.h.
PLMD::Plumed::operator plumed |
( |
| ) |
const |
|
inline |
Retrieve the C plumed structure for this object.
Definition at line 445 of file Plumed.h.
Assignment operator is disabled (private and unimplemented) The problem here is that after copying it will not be clear who is going to finalize the corresponding plumed structure.
void PLMD::Plumed::toFortran |
( |
char * |
c | ) |
const |
|
inline |
Retrieve a FORTRAN handler for this object.
- Parameters
-
c | The FORTRAN handler (a char[32]). |
Definition at line 450 of file Plumed.h.
bool PLMD::Plumed::cloned |
|
private |
keeps track if the object was created from scratch using the defaults destructor (cloned=false) or if it was imported from C or FORTRAN (cloned-true).
In the latter case, the plumed_finalize() method is not called when destructing the object, since it is expected to be finalized in the C/FORTRAN code
Definition at line 323 of file Plumed.h.
The documentation for this class was generated from the following file: