acemd | manual | plugins | resources | change log | gallery | contact
Mailing list: acemd@googlegroups.com
Contents
Third parties available plugins
PLUMED (metadynamics, steered MD, umbrella sampling plugin)
PLUMED is a plugin for free energy calculation in molecular systems, now available for ACEMD as a plug-in. Free energy calculations can be performed as a function of many order parameters with a particular focus on biological problems using state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. The main reference is: M. Bonomi, D. Branduardi, G. Bussi, C. Camilloni, D. Provasi, P. Raiteri, D. Donadio, F. Marinelli, F. Pietrucci, R.A. Broglia and M. Parrinello, PLUMED: a portable plugin for free energy calculations with molecular dynamics, Comp. Phys. Comm. 180, 1961 (2009).
Download:
I just want the compiled version for Linux64. Download the ACEMD plumed shared library plumed-1.2.0-r1.so (compiled 14/10/2010 for Linux x64_86).
The latest version of the ACEMD-specific code in PLUMED (to be incorporated in the main distribution) plumed-ACEMD-1.2.2-r1.tgz
PLUMED's reference manual
PLUMED's source code
PLUMED demo in ACEMD
A demo on how to compute the phi-psi free energy surface of the alanine dimer, with reference results and an animation, which you can also watch online. An extract of the input file of demo is also given below:
//META_INP file PRINT W_STRIDE 100 TORSION LIST 13 15 17 1 SIGMA 0.2 TORSION LIST 15 17 1 3 SIGMA 0.2 HILLS HEIGHT 0.1 W_STRIDE 100 WELLTEMPERED SIMTEMP 300 BIASFACTOR 10 ENDMETA
//ACEMD input file ... pluginload meta plumed-1.1.0.so ;# Or just "plumed" to use the built-in version pluginarg meta input META_INP pluginarg meta boxx 65 ;# Box only required for PLUMED <= 1.2.0 pluginarg meta boxy 65 pluginarg meta boxz 65 pluginfreq 1 ...
ACEMD open plugins interface
How to write a plugin for ACEMD
A plugin offers an effective way to extend the features of ACEMD by executing a function written by you every timestep. This subroutine has access to positions, masses and charges of the atoms and can assign forces on the atoms. It is compiled as a sharable object which is dynamically loaded by ACEMD.
How to use a plugin
From the ACEMD configuration file, you can use the following TCL commands to load a plugin and assign input arguments. The plugin is then execute every timestep (unless differently specified).
pluginload {tag} {dso}: tag is a string descriptor for the plugin, dso the path to the dynamic sharable object.
pluginarg {tag} {key} {value}: to pass an argument to the plugin tag, use key, value are strings representing the tuple key=value
pluginfreq {value}: specify the frequency of execution of the plugin. Default 1, i.e every step.
Example. In your ACEMD input script simply add before the run command:
... pluginload testplug ./plugin.so pluginarg testplug one 1 pluginfreq 1 run 1000
The ACEMD plugin interface is exposed as:
struct aceplug_sim_t {
int version;
double4 *pos;
float4 *frc;
float *mass;
float *charge;
int natoms;
unsigned long step;
void *privdata;
float4 box;
};A simple example of a plugin using the interface:
#include "aceplug.h"
#include <stdio.h>
#include <stdlib.h>
//IDX can be any private data of the plugin
#define IDX 1
int aceplug_init(
struct aceplug_sim_t *s,
int argc,
char **argkey,
char **argval
) {
int i;
printf("Hello! I am plugin-example %d %d \n", IDX, s->natoms );
printf("I have %d arguments: \n", argc );
for(i=0; i < argc; i++ ) {
printf("\t[%s] = [%s]\n", argkey[i], argval[i] );
}
s->privdata = malloc( sizeof(int) );
*((int *)s->privdata) = IDX;
return 0;
}
int aceplug_update( struct aceplug_sim_t *s) {
printf("Hello! I am plugin-example [%d] there are %d atoms, iteration %d\n",
*((int *)s->privdata), s->natoms, s->step);
return 0;
}
int aceplug_terminate( void *privdata ) {
printf("Hello! I am plugin-example %d\n", *(int*)privdata );
free(privdata);
return 0;
}
DOWNLOAD interface
Here you can download the ACEMD plugin interface (distributed under the LGPL license lgpl-3.0.txt).