From b3fc34f2400a660ed0a04d4557659d1ea653ac2b Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Wed, 1 May 2024 09:10:30 +0200 Subject: [PATCH 01/11] Try a (dirty) fix to the i-pi neighbor list update problem --- src/MISC/fix_ipi.cpp | 33 ++++++++++++++++++++++++++++++--- src/neighbor.cpp | 7 ++++++- src/neighbor.h | 7 ++++--- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index 30a6fe893d..f9b98c0a2d 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -30,6 +30,7 @@ #include "update.h" #include +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -363,10 +364,36 @@ void FixIPI::initial_integrate(int /*vflag*/) // has to be be done before invoking Irregular::migrate_atoms() // since it requires atoms be inside simulation box + + if (neighbor->ncalls == 0) { + if (domain->triclinic) domain->x2lamda(atom->nlocal); - domain->pbc(); - domain->reset_box(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); + domain->pbc(); + domain->reset_box(); + if (domain->triclinic) domain->lamda2x(atom->nlocal); + } else { // for some reason this fails if it's called on the first step. + // "unwraps" the trajectory because we have no guarantee of what has happened + // server-side to the atoms folding + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + x[i][0] -= neighbor->xhold[i][0]; + x[i][1] -= neighbor->xhold[i][1]; + x[i][2] -= neighbor->xhold[i][2]; + } + } + if (domain->triclinic) domain->x2lamda(atom->nlocal); + domain->pbc(); + domain->reset_box(); + if (domain->triclinic) domain->lamda2x(atom->nlocal); + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + x[i][0] += neighbor->xhold[i][0]; + x[i][1] += neighbor->xhold[i][1]; + x[i][2] += neighbor->xhold[i][2]; + } + } + } + /**/ // move atoms to new processors via irregular() // only needed if migrate_check() says an atom moves to far diff --git a/src/neighbor.cpp b/src/neighbor.cpp index c5cbe0e885..10b2542ba6 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -53,6 +53,7 @@ #include #include +#include using namespace LAMMPS_NS; using namespace NeighConst; @@ -2384,12 +2385,16 @@ int Neighbor::check_distance() dely = x[i][1] - xhold[i][1]; delz = x[i][2] - xhold[i][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq > deltasq) flag = 1; + if (rsq > deltasq) { + std::cout<<"jump: "<< rsq< Date: Wed, 1 May 2024 16:09:41 +0200 Subject: [PATCH 02/11] Minimally-invasive implementation of the ipi-side modification --- src/MISC/fix_ipi.cpp | 45 ++++++++++++++++++++++++-------------------- src/neighbor.cpp | 17 +++++++++++------ src/neighbor.h | 8 ++++---- 3 files changed, 40 insertions(+), 30 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index f9b98c0a2d..54a1db1dcc 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -365,36 +365,41 @@ void FixIPI::initial_integrate(int /*vflag*/) // since it requires atoms be inside simulation box - if (neighbor->ncalls == 0) { - - if (domain->triclinic) domain->x2lamda(atom->nlocal); - domain->pbc(); - domain->reset_box(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); - } else { // for some reason this fails if it's called on the first step. - // "unwraps" the trajectory because we have no guarantee of what has happened - // server-side to the atoms folding - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - x[i][0] -= neighbor->xhold[i][0]; - x[i][1] -= neighbor->xhold[i][1]; - x[i][2] -= neighbor->xhold[i][2]; - } - } + if (neighbor->ncalls == 0) { + // just fold coordinates at the first step if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); domain->reset_box(); if (domain->triclinic) domain->lamda2x(atom->nlocal); + } else { + // "unwraps" the trajectory because we have no guarantee of what has + // happened server-side to the atoms folding, and we want to have continuous + // trajectories to build NL in a meaningful way + + auto xhold = neighbor->get_xhold(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - x[i][0] += neighbor->xhold[i][0]; - x[i][1] += neighbor->xhold[i][1]; - x[i][2] += neighbor->xhold[i][2]; + x[i][0] -= xhold[i][0]; + x[i][1] -= xhold[i][1]; + x[i][2] -= xhold[i][2]; + } + } + // applies PBC to the displacements + if (domain->triclinic) domain->x2lamda(atom->nlocal); + domain->pbc(); + domain->reset_box(); + if (domain->triclinic) domain->lamda2x(atom->nlocal); + // "unwrapped" positions + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + x[i][0] += xhold[i][0]; + x[i][1] += xhold[i][1]; + x[i][2] += xhold[i][2]; } } } - /**/ + std::cout<<"NL stats: "<ago<<" since last update\n"; // move atoms to new processors via irregular() // only needed if migrate_check() says an atom moves to far if (domain->triclinic) domain->x2lamda(atom->nlocal); diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 10b2542ba6..ccff846edd 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -53,7 +53,6 @@ #include #include -#include using namespace LAMMPS_NS; using namespace NeighConst; @@ -2385,16 +2384,12 @@ int Neighbor::check_distance() dely = x[i][1] - xhold[i][1]; delz = x[i][2] - xhold[i][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq > deltasq) { - std::cout<<"jump: "<< rsq< deltasq) flag = 1; } int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_MAX,world); if (flagall && ago == MAX(every,delay)) ndanger++; - std::cout<<" neigh update flags "<< flagall<< " "<< ago << " "<all(FLERR, "trying to access uninitialized xhold list"); + } + return xhold; +} + /* ---------------------------------------------------------------------- add pair of atoms to bondlist array will only persist until the next neighbor build diff --git a/src/neighbor.h b/src/neighbor.h index 24fcb2b993..8533fe5efa 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -58,8 +58,7 @@ class Neighbor : protected Pointers { double *bboxlo, *bboxhi; // ptrs to full domain bounding box // different for orthog vs triclinic - double **xhold; // atom coords at last neighbor build - int maxhold; // size of xhold array + // exclusion info, used by NeighPair int exclude; // 0 if no type/group exclusions, 1 if yes @@ -176,6 +175,7 @@ class Neighbor : protected Pointers { double memory_usage(); bigint last_setup_bins; // step of last neighbor::setup_bins() call + double **get_xhold(); // access the latest-computed neighbor list positions protected: int me, nprocs; @@ -191,8 +191,8 @@ class Neighbor : protected Pointers { double triggersq; // trigger = build when atom moves this dist - //double **xhold; // atom coords at last neighbor build - //int maxhold; // size of xhold array + double **xhold; // atom coords at last neighbor build + int maxhold; // size of xhold array int boxcheck; // 1 if need to store box size double boxlo_hold[3], boxhi_hold[3]; // box size at last neighbor build From fe19a7efb5b055a22ae449c90913be5131415a87 Mon Sep 17 00:00:00 2001 From: Davide Tisi <47503434+DavideTisi@users.noreply.github.com> Date: Wed, 1 May 2024 16:12:28 +0200 Subject: [PATCH 03/11] disable Nagle's algorithm for internet socket --- src/MISC/fix_ipi.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index 54a1db1dcc..bc2d4b99e9 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -49,6 +49,7 @@ using namespace FixConst; #ifndef _WIN32 #include #include +#include #include #include #include @@ -79,7 +80,7 @@ static void open_socket(int &sockfd, int inet, int port, char *host, Error *erro error: pointer to a LAMMPS Error object */ { - int ai_err; + int ai_err,flagNagle; #ifdef _WIN32 error->one(FLERR, "i-PI socket implementation requires UNIX environment"); @@ -101,6 +102,11 @@ static void open_socket(int &sockfd, int inet, int port, char *host, Error *erro sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (sockfd < 0) error->one(FLERR, "Error creating socket for fix ipi"); + // set TCP_NODELAY=1 to disable Nagle's algorithm as it slows down the small transactions for i-PI + flagNagle = 1; + int result_TCP = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flagNagle, sizeof(int)); + if (result_TCP < 0) { perror("Error setting TCP_NODELAY"); } + // makes connection if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0) error->one(FLERR, "Error opening INET socket: wrong port or server unreachable"); From ad90c9836f50a4a677cd900bc3760ca65240cea9 Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Wed, 1 May 2024 17:20:53 +0200 Subject: [PATCH 04/11] Just some additional comments, and removed debug output --- src/MISC/fix_ipi.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index bc2d4b99e9..8f4e58dcf6 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -369,8 +369,6 @@ void FixIPI::initial_integrate(int /*vflag*/) // ensure atoms are in current box & update box via shrink-wrap // has to be be done before invoking Irregular::migrate_atoms() // since it requires atoms be inside simulation box - - if (neighbor->ncalls == 0) { // just fold coordinates at the first step if (domain->triclinic) domain->x2lamda(atom->nlocal); @@ -380,7 +378,7 @@ void FixIPI::initial_integrate(int /*vflag*/) } else { // "unwraps" the trajectory because we have no guarantee of what has // happened server-side to the atoms folding, and we want to have continuous - // trajectories to build NL in a meaningful way + // trajectories to build NL in a meaningful way and as rarely as possible auto xhold = neighbor->get_xhold(); for (int i = 0; i < nlocal; i++) { @@ -395,7 +393,7 @@ void FixIPI::initial_integrate(int /*vflag*/) domain->pbc(); domain->reset_box(); if (domain->triclinic) domain->lamda2x(atom->nlocal); - // "unwrapped" positions + // recovers "unwrapped" positions for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { x[i][0] += xhold[i][0]; @@ -405,7 +403,6 @@ void FixIPI::initial_integrate(int /*vflag*/) } } - std::cout<<"NL stats: "<ago<<" since last update\n"; // move atoms to new processors via irregular() // only needed if migrate_check() says an atom moves to far if (domain->triclinic) domain->x2lamda(atom->nlocal); @@ -490,6 +487,7 @@ void FixIPI::final_integrate() retstr[0]=0; if (master) { + // check for new messages while (true) { readbuffer(ipisock, header, MSGLEN, error); header[MSGLEN]=0; @@ -502,6 +500,7 @@ void FixIPI::final_integrate() error->one(FLERR, "Got EXIT message from i-PI. Now leaving!"); if (strcmp(header,"GETFORCE ") == 0) { + // return force and energy data writebuffer(ipisock,"FORCEREADY ",MSGLEN, error); writebuffer(ipisock,(char*) &pot,8, error); writebuffer(ipisock,(char*) &nat,4, error); @@ -515,6 +514,4 @@ void FixIPI::final_integrate() } hasdata=0; -} - - +} \ No newline at end of file From 7b728cd4340312e0606a17d366050c34aa67d887 Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Wed, 1 May 2024 20:00:21 +0200 Subject: [PATCH 05/11] No need to go through the whole list if one atom has moved enough to trigger re-compute of the NL --- src/neighbor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index ccff846edd..f3390b49fe 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -2384,7 +2384,7 @@ int Neighbor::check_distance() dely = x[i][1] - xhold[i][1]; delz = x[i][2] - xhold[i][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq > deltasq) flag = 1; + if (rsq > deltasq) { flag = 1; break; } } int flagall; From bc38b559418a5ab2224b3c73740a6743704bfc2e Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Thu, 2 May 2024 08:42:53 +0200 Subject: [PATCH 06/11] Removed iostream import Leftover from debugging output --- src/MISC/fix_ipi.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index 8f4e58dcf6..dc75aca8e1 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -30,7 +30,6 @@ #include "update.h" #include -#include using namespace LAMMPS_NS; using namespace FixConst; @@ -514,4 +513,4 @@ void FixIPI::final_integrate() } hasdata=0; -} \ No newline at end of file +} From 2dc5931829ca6886b657220751f7820f47c4aa5d Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Mon, 13 May 2024 22:34:21 +0200 Subject: [PATCH 07/11] Fix whitespace --- src/MISC/fix_ipi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index dc75aca8e1..43a6ae03bb 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -368,14 +368,14 @@ void FixIPI::initial_integrate(int /*vflag*/) // ensure atoms are in current box & update box via shrink-wrap // has to be be done before invoking Irregular::migrate_atoms() // since it requires atoms be inside simulation box - if (neighbor->ncalls == 0) { + if (neighbor->ncalls == 0) { // just fold coordinates at the first step if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); domain->reset_box(); if (domain->triclinic) domain->lamda2x(atom->nlocal); - } else { - // "unwraps" the trajectory because we have no guarantee of what has + } else { + // "unwraps" the trajectory because we have no guarantee of what has // happened server-side to the atoms folding, and we want to have continuous // trajectories to build NL in a meaningful way and as rarely as possible From b5ecea502a50c5dd71aabd7f43623716fe0d0ed6 Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Tue, 14 May 2024 08:51:40 +0200 Subject: [PATCH 08/11] Changed folding logic to use minimum_image rather than pbc --- src/MISC/fix_ipi.cpp | 51 ++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index 43a6ae03bb..fcb3ed8246 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -368,37 +368,28 @@ void FixIPI::initial_integrate(int /*vflag*/) // ensure atoms are in current box & update box via shrink-wrap // has to be be done before invoking Irregular::migrate_atoms() // since it requires atoms be inside simulation box - if (neighbor->ncalls == 0) { - // just fold coordinates at the first step - if (domain->triclinic) domain->x2lamda(atom->nlocal); - domain->pbc(); - domain->reset_box(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); - } else { - // "unwraps" the trajectory because we have no guarantee of what has - // happened server-side to the atoms folding, and we want to have continuous - // trajectories to build NL in a meaningful way and as rarely as possible - auto xhold = neighbor->get_xhold(); - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - x[i][0] -= xhold[i][0]; - x[i][1] -= xhold[i][1]; - x[i][2] -= xhold[i][2]; - } - } - // applies PBC to the displacements - if (domain->triclinic) domain->x2lamda(atom->nlocal); - domain->pbc(); - domain->reset_box(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); - // recovers "unwrapped" positions - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - x[i][0] += xhold[i][0]; - x[i][1] += xhold[i][1]; - x[i][2] += xhold[i][2]; - } + // folds atomic coordinates close to the origin + if (domain->triclinic) domain->x2lamda(atom->nlocal); + domain->pbc(); + domain->reset_box(); + if (domain->triclinic) domain->lamda2x(atom->nlocal); + + // ensures continuity of trajectories relative to the + // snapshot at neighbor list creation, minimizing the + // number of neighbor list updates + auto xhold = neighbor->get_xhold(); + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + auto delx = x[i][0] - xhold[i][0]; + auto dely = x[i][1] - xhold[i][1]; + auto delz = x[i][2] - xhold[i][2]; + + domain->minimum_image(delx, dely, delz); + + x[i][0] = xhold[i][0] + delx; + x[i][1] = xhold[i][1] + dely; + x[i][2] = xhold[i][2] + delz; } } From 8f61bc57d2b46cb90f6c34a090ed73a0f4406a3a Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Wed, 22 May 2024 10:02:52 +0200 Subject: [PATCH 09/11] move xhold checks caller-side this also allows it to fall-back on do-nothing rather than crash --- src/MISC/fix_ipi.cpp | 21 +++++++++++---------- src/neighbor.cpp | 8 +++----- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index fcb3ed8246..87668b9192 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -379,20 +379,21 @@ void FixIPI::initial_integrate(int /*vflag*/) // snapshot at neighbor list creation, minimizing the // number of neighbor list updates auto xhold = neighbor->get_xhold(); - for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - auto delx = x[i][0] - xhold[i][0]; - auto dely = x[i][1] - xhold[i][1]; - auto delz = x[i][2] - xhold[i][2]; + if (xhold != NULL) { // don't wrap if xhold is not used in the NL + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + auto delx = x[i][0] - xhold[i][0]; + auto dely = x[i][1] - xhold[i][1]; + auto delz = x[i][2] - xhold[i][2]; - domain->minimum_image(delx, dely, delz); + domain->minimum_image(delx, dely, delz); - x[i][0] = xhold[i][0] + delx; - x[i][1] = xhold[i][1] + dely; - x[i][2] = xhold[i][2] + delz; + x[i][0] = xhold[i][0] + delx; + x[i][1] = xhold[i][1] + dely; + x[i][2] = xhold[i][2] + delz; + } } } - // move atoms to new processors via irregular() // only needed if migrate_check() says an atom moves to far if (domain->triclinic) domain->x2lamda(atom->nlocal); diff --git a/src/neighbor.cpp b/src/neighbor.cpp index f3390b49fe..63d14acb9a 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -2976,13 +2976,11 @@ bigint Neighbor::get_nneigh_half() return nneighhalf; } +/* ---------------------------------------------------------------------- + return the pointer containing the last positions stored by the NL builder +------------------------------------------------------------------------- */ double **Neighbor::get_xhold() { - // Returns the pointer containing the last positions stored by the NL builder, - // checking it has actually been initialized - if (maxhold == 0) { - error->all(FLERR, "trying to access uninitialized xhold list"); - } return xhold; } From aa8cd7a4b9a728e7a8faf68234c04eb96a45b7a0 Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Tue, 28 May 2024 00:07:07 +0200 Subject: [PATCH 10/11] Updated the documentation for i-PI --- doc/src/fix_ipi.rst | 48 +++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/doc/src/fix_ipi.rst b/doc/src/fix_ipi.rst index 7705f211e8..15a2235b91 100644 --- a/doc/src/fix_ipi.rst +++ b/doc/src/fix_ipi.rst @@ -35,23 +35,24 @@ Description """"""""""" This fix enables LAMMPS to be run as a client for the i-PI Python -wrapper :ref:`(IPI) ` for performing a path integral molecular dynamics -(PIMD) simulation. The philosophy behind i-PI is described in the -following publication :ref:`(IPI-CPC) `. +wrapper :ref:`(IPI) `. i-PI is a universal force engine, +designed to perform advanced molecular simulations, with a special +focus on path integral molecular dynamics (PIMD) simulation. +The philosophy behind i-PI is to separate the evaluation of the +energy and forces, which is delegated to the client, and the evolution +of the dynamics, that is the responsibility of i-PI. This approach also +simplifies combining energies computed from different codes, which +can for instance be useful to mix first-principles calculations, +empirical force fields or machine-learning potentials. +The following publication :ref:`(IPI-CPC-2014) ` discusses the +overall implementation of i-PI, and focuses on path-integral techniques, +while a later release :ref:`(IPI-CPC-2019) ` introduces several +additional features and simulation schemes. -A version of the i-PI package, containing only files needed for use -with LAMMPS, is provided in the tools/i-pi directory. See the -tools/i-pi/manual.pdf for an introduction to i-PI. The -examples/PACKAGES/i-pi directory contains example scripts for using i-PI -with LAMMPS. - -In brief, the path integral molecular dynamics is performed by the -Python wrapper, while the client (LAMMPS in this case) simply computes -forces and energy for each configuration. The communication between -the two components takes place using sockets, and is reduced to the -bare minimum. All the parameters of the dynamics are specified in the -input of i-PI, and all the parameters of the force field must be -specified as LAMMPS inputs, preceding the *fix ipi* command. +The communication between i-PI and LAMMPS takes place using sockets, +and is reduced to the bare minimum. All the parameters of the dynamics +are specified in the input of i-PI, and all the parameters of the force +field must be specified as LAMMPS inputs, preceding the *fix ipi* command. The server address must be specified by the *address* argument, and can be either the IP address, the fully-qualified name of the server, @@ -75,6 +76,14 @@ If the cell varies too wildly, it may be advisable to re-initialize these interactions at each call. This behavior can be requested by setting the *reset* switch. +Obtaining i-PI +"""""""""""""" + +A simple version of the i-PI package, containing only files needed for use +with LAMMPS, is provided in the tools/i-pi directory. We recommend you +obtain the latest stable version from the github repository of i-PI, +or from the python package index. + Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -111,9 +120,14 @@ Related commands .. _IPICPC: -**(IPI-CPC)** Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, +**(IPI-CPC-2014)** Ceriotti, More and Manolopoulos, Comp Phys Comm 185, 1019-1026 (2014). +.. _IPICPC2: + +**(IPI-CPC-2019)** Kapil et al., Comp Phys Comm 236, 214–223 (2019). + + .. _ipihome: **(IPI)** From 33351704a594fb6cfd6a0791efc8c631bb3c916c Mon Sep 17 00:00:00 2001 From: Michele Ceriotti Date: Tue, 28 May 2024 08:40:19 +0200 Subject: [PATCH 11/11] Invisible mais penible --- doc/src/fix_ipi.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/src/fix_ipi.rst b/doc/src/fix_ipi.rst index 15a2235b91..4b9bed3d26 100644 --- a/doc/src/fix_ipi.rst +++ b/doc/src/fix_ipi.rst @@ -35,23 +35,23 @@ Description """"""""""" This fix enables LAMMPS to be run as a client for the i-PI Python -wrapper :ref:`(IPI) `. i-PI is a universal force engine, +wrapper :ref:`(IPI) `. i-PI is a universal force engine, designed to perform advanced molecular simulations, with a special -focus on path integral molecular dynamics (PIMD) simulation. -The philosophy behind i-PI is to separate the evaluation of the +focus on path integral molecular dynamics (PIMD) simulation. +The philosophy behind i-PI is to separate the evaluation of the energy and forces, which is delegated to the client, and the evolution of the dynamics, that is the responsibility of i-PI. This approach also simplifies combining energies computed from different codes, which -can for instance be useful to mix first-principles calculations, -empirical force fields or machine-learning potentials. -The following publication :ref:`(IPI-CPC-2014) ` discusses the +can for instance be useful to mix first-principles calculations, +empirical force fields or machine-learning potentials. +The following publication :ref:`(IPI-CPC-2014) ` discusses the overall implementation of i-PI, and focuses on path-integral techniques, while a later release :ref:`(IPI-CPC-2019) ` introduces several -additional features and simulation schemes. +additional features and simulation schemes. -The communication between i-PI and LAMMPS takes place using sockets, -and is reduced to the bare minimum. All the parameters of the dynamics -are specified in the input of i-PI, and all the parameters of the force +The communication between i-PI and LAMMPS takes place using sockets, +and is reduced to the bare minimum. All the parameters of the dynamics +are specified in the input of i-PI, and all the parameters of the force field must be specified as LAMMPS inputs, preceding the *fix ipi* command. The server address must be specified by the *address* argument, and @@ -81,7 +81,7 @@ Obtaining i-PI A simple version of the i-PI package, containing only files needed for use with LAMMPS, is provided in the tools/i-pi directory. We recommend you -obtain the latest stable version from the github repository of i-PI, +obtain the latest stable version from the github repository of i-PI, or from the python package index. Restart, fix_modify, output, run start/stop, minimize info