git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3320 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2009-11-06 15:38:50 +00:00
parent 4615e25278
commit fa3a647a74
9 changed files with 1489 additions and 3 deletions

View File

@ -16,7 +16,8 @@ OBJ = $(SRC:.cpp=.o)
PACKAGE = asphere class2 colloid dipole dpd gpu granular \
kspace manybody meam molecule opt peri poems prd reax xtc
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-ewaldn user-smd
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-ewaldn \
user-imd user-smd
PACKALL = $(PACKAGE) $(PACKUSER)

View File

@ -10,3 +10,6 @@ LAMMPS input script. This fix can be employed to either do concurrent
coupling of MD with FE-based physics surrogates or on-the-fly
post-processing of atomic information to continuum fields. See the
doc page for the fix atc command to get started.
There are example scripts for using this package with LAMMPS in
examples/USER/atc.

View File

@ -18,8 +18,8 @@ and angle_style cg/cmm.
See the documentation files for these commands for details.
There is also an cg-cmm example directory under examples/USER with
sample inputs and outputs.
There are example scripts for using this package with LAMMPS in
examples/USER/cg-cmm.
These styles allow coarse grained MD simulations with the
parametrization of Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007)

20
src/USER-IMD/Install.csh Normal file
View File

@ -0,0 +1,20 @@
# Install/unInstall package classes in LAMMPS
if ($1 == 1) then
cp -p style_user_imd.h ..
cp -p fix_imd.cpp ..
cp -p fix_imd.h ..
else if ($1 == 0) then
rm ../style_user_imd.h
touch ../style_user_imd.h
rm ../fix_imd.cpp
rm ../fix_imd.h
endif

17
src/USER-IMD/README Normal file
View File

@ -0,0 +1,17 @@
The files in this directory are a user-contributed package for LAMMPS.
The person who created these files is Axel Kohlmeyer
(axel.kohlmeyer@temple.edu). Contact him directly if you
have questions or for example scripts that use it.
This package implements a "fix imd" command which can be used in a
LAMMPS input script. IMD stands for interactive molecular dynamics,
and allows realtime visualization and manipulation of MD simulations
through the IMD protocol, initially implemented in VMD and NAMD.
There are example scripts for using this package with LAMMPS in
examples/USER/imd.
This software includes code developed by the Theoretical and Computational
Biophysics Group in the Beckman Institute for Advanced Science and
Technology at the University of Illinois at Urbana-Champaign.

1325
src/USER-IMD/fix_imd.cpp Normal file

File diff suppressed because it is too large Load Diff

99
src/USER-IMD/fix_imd.h Normal file
View File

@ -0,0 +1,99 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
The FixIMD class contains code from VMD and NAMD which is copyrighted
by the Board of Trustees of the University of Illinois and is free to
use with LAMMPS according to point 2 of the UIUC license (10% clause):
" Licensee may, at its own expense, create and freely distribute
complimentary works that interoperate with the Software, directing others to
the TCBG server to license and obtain the Software itself. Licensee may, at
its own expense, modify the Software to make derivative works. Except as
explicitly provided below, this License shall apply to any derivative work
as it does to the original Software distributed by Illinois. Any derivative
work should be clearly marked and renamed to notify users that it is a
modified version and not the original Software distributed by Illinois.
Licensee agrees to reproduce the copyright notice and other proprietary
markings on any derivative work and to include in the documentation of such
work the acknowledgement:
"This software includes code developed by the Theoretical and Computational
Biophysics Group in the Beckman Institute for Advanced Science and
Technology at the University of Illinois at Urbana-Champaign."
Licensee may redistribute without restriction works with up to 1/2 of their
non-comment source code derived from at most 1/10 of the non-comment source
code developed by Illinois and contained in the Software, provided that the
above directions for notice and acknowledgement are observed. Any other
distribution of the Software or any derivative work requires a separate
license with Illinois. Licensee may contact Illinois (vmd@ks.uiuc.edu) to
negotiate an appropriate license for such distribution."
------------------------------------------------------------------------- */
#ifndef FIX_IMD_H
#define FIX_IMD_H
#include "fix.h"
namespace LAMMPS_NS {
class FixIMD : public Fix {
public:
FixIMD(class LAMMPS *, int, char **);
~FixIMD();
int setmask();
void init();
void setup(int);
void post_force(int);
void post_force_respa(int, int, int);
double memory_usage();
private:
int imd_port;
void *localsock;
void *clientsock;
int num_coords; // total number of atoms controlled by this fix
int size_one; // bytes per atom in communication buffer.
int maxbuf; // size of atom communication buffer.
void *comm_buf; // communication buffer
void *idmap; // hash for mapping atom indices to consistent order.
int *rev_idmap; // list of the hash keys for reverse mapping.
int imd_forces; // number of forces communicated via IMD.
void *force_buf; // force data buffer
double imd_fscale; // scale factor for forces. in case VMD's units are off.
int imd_inactive; // true if IMD connection stopped.
int imd_terminate; // true if IMD requests termination of run.
int imd_trate; // IMD transmission rate.
int unwrap_flag; // true if coordinates need to be unwrapped before sending
int me; // my MPI rank in this "world".
int nlevels_respa; // flag to determine respa levels.
};
}
#endif
// Local Variables:
// mode: c++
// compile-command: "make -j4 openmpi"
// c-basic-offset: 2
// fill-column: 76
// indent-tabs-mode: nil
// End:

View File

@ -0,0 +1,20 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FixInclude
#include "fix_imd.h"
#endif
#ifdef FixClass
FixStyle(imd,FixIMD)
#endif

View File

@ -19,4 +19,5 @@
#include "style_user_cd_eam.h"
#include "style_user_cg_cmm.h"
#include "style_user_ewaldn.h"
#include "style_user_imd.h"
#include "style_user_smd.h"