mirror of https://github.com/lammps/lammps.git
Rename compute to entropy/atom
This commit is contained in:
parent
b2e6863d93
commit
86519ce213
|
@ -851,6 +851,7 @@ package"_Section_start.html#start_3.
|
|||
"dpd"_compute_dpd.html,
|
||||
"dpd/atom"_compute_dpd_atom.html,
|
||||
"edpd/temp/atom"_compute_edpd_temp_atom.html,
|
||||
"entropy/atom"_compute_entropy_atom.html,
|
||||
"fep"_compute_fep.html,
|
||||
"force/tally"_compute_tally.html,
|
||||
"heat/flux/tally"_compute_tally.html,
|
||||
|
@ -861,7 +862,6 @@ package"_Section_start.html#start_3.
|
|||
"meso/t/atom"_compute_meso_t_atom.html,
|
||||
"pe/tally"_compute_tally.html,
|
||||
"pe/mol/tally"_compute_tally.html,
|
||||
"pentropy/atom"_compute_pentropy_atom.html,
|
||||
"pressure/uef"_compute_pressure_uef.html,
|
||||
"saed"_compute_saed.html,
|
||||
"smd/contact/radius"_compute_smd_contact_radius.html,
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
|
||||
:line
|
||||
|
||||
compute pentropy/atom command :h3
|
||||
compute entropy/atom command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID pentropy/atom sigma cutoff keyword value ... :pre
|
||||
compute ID group-ID entropy/atom sigma cutoff keyword value ... :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command :l
|
||||
pentropy/atom = style name of this compute command :l
|
||||
entropy/atom = style name of this compute command :l
|
||||
sigma = width of gaussians used in the g(r) smoothening :l
|
||||
cutoff = cutoff for the g(r) calculation :l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
|
@ -27,9 +27,9 @@ keyword = {avg} or {local}
|
|||
|
||||
[Examples:]
|
||||
|
||||
compute 1 all pentropy/atom 0.25 5.
|
||||
compute 1 all pentropy/atom 0.25 5. avg yes 5.
|
||||
compute 1 all pentropy/atom 0.125 7.3 avg yes 5.1 local yes :pre
|
||||
compute 1 all entropy/atom 0.25 5.
|
||||
compute 1 all entropy/atom 0.25 5. avg yes 5.
|
||||
compute 1 all entropy/atom 0.125 7.3 avg yes 5.1 local yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
@ -87,11 +87,11 @@ inhomogeneus systems such as those that have surfaces.
|
|||
Here are typical input parameters for fcc aluminum (lattice
|
||||
constant 4.05 Angstroms),
|
||||
|
||||
compute 1 all pentropy/atom 0.25 5.7 avg yes 3.7 :pre
|
||||
compute 1 all entropy/atom 0.25 5.7 avg yes 3.7 :pre
|
||||
|
||||
and for bcc sodium (lattice constant 4.23 Angstroms),
|
||||
|
||||
compute 1 all pentropy/atom 0.25 7.3 avg yes 5.1 :pre
|
||||
compute 1 all entropy/atom 0.25 7.3 avg yes 5.1 :pre
|
||||
|
||||
|
||||
[Output info:]
|
||||
|
@ -106,7 +106,11 @@ The pair entropy values have units of the Boltzmann constant. They are
|
|||
always negative, and lower values (lower entropy) correspond to more
|
||||
ordered environments.
|
||||
|
||||
[Restrictions:] none
|
||||
[Restrictions:]
|
||||
|
||||
This compute is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
|
@ -31,6 +31,7 @@ Computes :h1
|
|||
compute_dpd
|
||||
compute_dpd_atom
|
||||
compute_edpd_temp_atom
|
||||
compute_entropy_atom
|
||||
compute_erotate_asphere
|
||||
compute_erotate_rigid
|
||||
compute_erotate_sphere
|
||||
|
@ -63,7 +64,6 @@ Computes :h1
|
|||
compute_pair_local
|
||||
compute_pe
|
||||
compute_pe_atom
|
||||
compute_pentropy_atom
|
||||
compute_plasticity_atom
|
||||
compute_pressure
|
||||
compute_pressure_uef
|
||||
|
|
|
@ -315,6 +315,7 @@ compute_displace_atom.html
|
|||
compute_dpd.html
|
||||
compute_dpd_atom.html
|
||||
compute_edpd_temp_atom.html
|
||||
compute_entropy_atom.html
|
||||
compute_erotate_asphere.html
|
||||
compute_erotate_rigid.html
|
||||
compute_erotate_sphere.html
|
||||
|
@ -347,7 +348,6 @@ compute_pair.html
|
|||
compute_pair_local.html
|
||||
compute_pe.html
|
||||
compute_pe_atom.html
|
||||
compute_pentropy_atom.html
|
||||
compute_plasticity_atom.html
|
||||
compute_pressure.html
|
||||
compute_pressure_uef.html
|
||||
|
|
|
@ -16,13 +16,13 @@ neighbor 4. bin
|
|||
|
||||
# Define computes
|
||||
# Global density, no average
|
||||
compute 1 all pentropy/atom 0.25 7.75
|
||||
compute 1 all entropy/atom 0.25 7.75
|
||||
# Local density, no average
|
||||
compute 2 all pentropy/atom 0.25 7.75 local yes
|
||||
compute 2 all entropy/atom 0.25 7.75 local yes
|
||||
# Global density, average over neighbors
|
||||
compute 3 all pentropy/atom 0.25 7.75 avg yes 5.
|
||||
compute 3 all entropy/atom 0.25 7.75 avg yes 5.
|
||||
# Local density, average over neighbors
|
||||
compute 4 all pentropy/atom 0.25 7.75 avg yes 5. local yes
|
||||
compute 4 all entropy/atom 0.25 7.75 avg yes 5. local yes
|
||||
|
||||
dump myDump all custom 500 dump.interface id type x y z c_1 c_2 c_3 c_4
|
||||
|
|
@ -28,13 +28,13 @@ neighbor 4. bin
|
|||
|
||||
# Define computes
|
||||
# Global density, no average
|
||||
compute 1 all pentropy/atom 0.25 7.75
|
||||
compute 1 all entropy/atom 0.25 7.75
|
||||
# Local density, no average
|
||||
compute 2 all pentropy/atom 0.25 7.75 local yes
|
||||
compute 2 all entropy/atom 0.25 7.75 local yes
|
||||
# Global density, average over neighbors
|
||||
compute 3 all pentropy/atom 0.25 7.75 avg yes 5.
|
||||
compute 3 all entropy/atom 0.25 7.75 avg yes 5.
|
||||
# Local density, average over neighbors
|
||||
compute 4 all pentropy/atom 0.25 7.75 avg yes 5. local yes
|
||||
compute 4 all entropy/atom 0.25 7.75 avg yes 5. local yes
|
||||
|
||||
dump myDump all custom 500 dump.interface id type x y z c_1 c_2 c_3 c_4
|
||||
|
||||
|
@ -43,10 +43,10 @@ fix 1 all nph x 1. 1. 10.
|
|||
fix 2 all temp/csvr 350. 350. 0.1 64582
|
||||
|
||||
run 100000
|
||||
WARNING: More than one compute pentropy/atom (../compute_pentropy_atom.cpp:138)
|
||||
WARNING: More than one compute pentropy/atom (../compute_pentropy_atom.cpp:138)
|
||||
WARNING: More than one compute pentropy/atom (../compute_pentropy_atom.cpp:138)
|
||||
WARNING: More than one compute pentropy/atom (../compute_pentropy_atom.cpp:138)
|
||||
WARNING: More than one compute entropy/atom (../compute_entropy_atom.cpp:138)
|
||||
WARNING: More than one compute entropy/atom (../compute_entropy_atom.cpp:138)
|
||||
WARNING: More than one compute entropy/atom (../compute_entropy_atom.cpp:138)
|
||||
WARNING: More than one compute entropy/atom (../compute_entropy_atom.cpp:138)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
|
@ -59,22 +59,22 @@ Neighbor list info ...
|
|||
pair build: half/bin/newton/tri
|
||||
stencil: half/bin/3d/newton/tri
|
||||
bin: standard
|
||||
(2) compute pentropy/atom, perpetual
|
||||
(2) compute entropy/atom, perpetual
|
||||
attributes: full, newton on, ghost
|
||||
pair build: full/bin/ghost
|
||||
stencil: full/ghost/bin/3d
|
||||
bin: standard
|
||||
(3) compute pentropy/atom, perpetual, copy from (2)
|
||||
(3) compute entropy/atom, perpetual, copy from (2)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(4) compute pentropy/atom, perpetual, copy from (2)
|
||||
(4) compute entropy/atom, perpetual, copy from (2)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
(5) compute pentropy/atom, perpetual, copy from (2)
|
||||
(5) compute entropy/atom, perpetual, copy from (2)
|
||||
attributes: full, newton on, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
|
@ -29,7 +29,7 @@ bond_style harmonic/shift/cut, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
|||
compute ackland/atom, Gerolf Ziegenhain, gerolf at ziegenhain.com, 4 Oct 2007
|
||||
compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013
|
||||
compute cnp/atom, Paulo Branicio (USC), branicio at usc.edu, 31 May 2017
|
||||
compute pentropy/atom, Pablo M. Piaggi (EPFL), , 15 June 2018
|
||||
compute entropy/atom, Pablo Piaggi (EPFL), pablo.piaggi at epfl.ch, 15 June 2018
|
||||
compute temp/rotate, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
compute PRESSURE/GREM, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
dihedral_style cosine/shift/exp, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include "compute_pentropy_atom.h"
|
||||
#include "compute_entropy_atom.h"
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
#include "modify.h"
|
||||
|
@ -40,13 +40,13 @@ using namespace MathConst;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePairEntropyAtom::
|
||||
ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
ComputeEntropyAtom::
|
||||
ComputeEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
pair_entropy(NULL), pair_entropy_avg(NULL)
|
||||
{
|
||||
if (narg < 5 || narg > 10)
|
||||
error->all(FLERR,"Illegal compute pentropy/atom command; wrong number"
|
||||
error->all(FLERR,"Illegal compute entropy/atom command; wrong number"
|
||||
" of arguments");
|
||||
|
||||
// Arguments are: sigma cutoff avg yes/no cutoff2 local yes/no
|
||||
|
@ -59,10 +59,10 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
// the g(r)
|
||||
|
||||
sigma = force->numeric(FLERR,arg[3]);
|
||||
if (sigma < 0.0) error->all(FLERR,"Illegal compute pentropy/atom"
|
||||
if (sigma < 0.0) error->all(FLERR,"Illegal compute entropy/atom"
|
||||
" command; negative sigma");
|
||||
cutoff = force->numeric(FLERR,arg[4]);
|
||||
if (cutoff < 0.0) error->all(FLERR,"Illegal compute pentropy/atom"
|
||||
if (cutoff < 0.0) error->all(FLERR,"Illegal compute entropy/atom"
|
||||
" command; negative cutoff");
|
||||
|
||||
avg_flag = 0;
|
||||
|
@ -73,24 +73,24 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"avg") == 0) {
|
||||
if (iarg+2 > narg)
|
||||
error->all(FLERR,"Illegal compute pentropy/atom;"
|
||||
error->all(FLERR,"Illegal compute entropy/atom;"
|
||||
" missing arguments after avg");
|
||||
if (strcmp(arg[iarg+1],"yes") == 0) avg_flag = 1;
|
||||
else if (strcmp(arg[iarg+1],"no") == 0) avg_flag = 0;
|
||||
else error->all(FLERR,"Illegal compute pentropy/atom;"
|
||||
else error->all(FLERR,"Illegal compute entropy/atom;"
|
||||
" argument after avg should be yes or no");
|
||||
cutoff2 = force->numeric(FLERR,arg[iarg+2]);
|
||||
if (cutoff2 < 0.0) error->all(FLERR,"Illegal compute pentropy/atom"
|
||||
if (cutoff2 < 0.0) error->all(FLERR,"Illegal compute entropy/atom"
|
||||
" command; negative cutoff2");
|
||||
cutsq2 = cutoff2*cutoff2;
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg],"local") == 0) {
|
||||
if (strcmp(arg[iarg+1],"yes") == 0) local_flag = 1;
|
||||
else if (strcmp(arg[iarg+1],"no") == 0) local_flag = 0;
|
||||
else error->all(FLERR,"Illegal compute pentropy/atom;"
|
||||
else error->all(FLERR,"Illegal compute entropy/atom;"
|
||||
" argument after local should be yes or no");
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal compute pentropy/atom; argument after"
|
||||
} else error->all(FLERR,"Illegal compute entropy/atom; argument after"
|
||||
" sigma and cutoff should be avg or local");
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePairEntropyAtom::~ComputePairEntropyAtom()
|
||||
ComputeEntropyAtom::~ComputeEntropyAtom()
|
||||
{
|
||||
memory->destroy(pair_entropy);
|
||||
if (avg_flag) memory->destroy(pair_entropy_avg);
|
||||
|
@ -118,7 +118,7 @@ ComputePairEntropyAtom::~ComputePairEntropyAtom()
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePairEntropyAtom::init()
|
||||
void ComputeEntropyAtom::init()
|
||||
{
|
||||
if (force->pair == NULL)
|
||||
error->all(FLERR,"Compute centro/atom requires a pair style be"
|
||||
|
@ -126,16 +126,16 @@ void ComputePairEntropyAtom::init()
|
|||
|
||||
if ( (cutoff+cutoff2) > (force->pair->cutforce + neighbor->skin) )
|
||||
{
|
||||
error->all(FLERR,"Compute pentropy/atom cutoff is longer than the"
|
||||
error->all(FLERR,"Compute entropy/atom cutoff is longer than the"
|
||||
" pairwise cutoff. Increase the neighbor list skin"
|
||||
" distance.");
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < modify->ncompute; i++)
|
||||
if (strcmp(modify->compute[i]->style,"pentropy/atom") == 0) count++;
|
||||
if (strcmp(modify->compute[i]->style,"entropy/atom") == 0) count++;
|
||||
if (count > 1 && comm->me == 0)
|
||||
error->warning(FLERR,"More than one compute pentropy/atom");
|
||||
error->warning(FLERR,"More than one compute entropy/atom");
|
||||
|
||||
// need a full neighbor list with neighbors of the ghost atoms
|
||||
|
||||
|
@ -151,14 +151,14 @@ void ComputePairEntropyAtom::init()
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePairEntropyAtom::init_list(int id, NeighList *ptr)
|
||||
void ComputeEntropyAtom::init_list(int id, NeighList *ptr)
|
||||
{
|
||||
list = ptr;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputePairEntropyAtom::compute_peratom()
|
||||
void ComputeEntropyAtom::compute_peratom()
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
||||
|
@ -179,15 +179,15 @@ void ComputePairEntropyAtom::compute_peratom()
|
|||
if (!avg_flag) {
|
||||
memory->destroy(pair_entropy);
|
||||
nmax = atom->nmax;
|
||||
memory->create(pair_entropy,nmax,"pentropy/atom:pair_entropy");
|
||||
memory->create(pair_entropy,nmax,"entropy/atom:pair_entropy");
|
||||
vector_atom = pair_entropy;
|
||||
} else {
|
||||
memory->destroy(pair_entropy);
|
||||
memory->destroy(pair_entropy_avg);
|
||||
nmax = atom->nmax;
|
||||
memory->create(pair_entropy,nmax,"pentropy/atom:pair_entropy");
|
||||
memory->create(pair_entropy,nmax,"entropy/atom:pair_entropy");
|
||||
memory->create(pair_entropy_avg,nmax,
|
||||
"pentropy/atom:pair_entropy_avg");
|
||||
"entropy/atom:pair_entropy_avg");
|
||||
vector_atom = pair_entropy_avg;
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void ComputePairEntropyAtom::compute_peratom()
|
|||
memory usage of local atom-based array
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double ComputePairEntropyAtom::memory_usage()
|
||||
double ComputeEntropyAtom::memory_usage()
|
||||
{
|
||||
double bytes;
|
||||
if (!avg_flag) {
|
|
@ -13,21 +13,21 @@
|
|||
|
||||
#ifdef COMPUTE_CLASS
|
||||
|
||||
ComputeStyle(pentropy/atom,ComputePairEntropyAtom)
|
||||
ComputeStyle(entropy/atom,ComputeEntropyAtom)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef COMPUTE_PAIR_ENTROPY_ATOM_H
|
||||
#define COMPUTE_PAIR_ENTROPY_ATOM_H
|
||||
#ifndef COMPUTE_ENTROPY_ATOM_H
|
||||
#define COMPUTE_ENTROPY_ATOM_H
|
||||
|
||||
#include "compute.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class ComputePairEntropyAtom : public Compute {
|
||||
class ComputeEntropyAtom : public Compute {
|
||||
public:
|
||||
ComputePairEntropyAtom(class LAMMPS *, int, char **);
|
||||
~ComputePairEntropyAtom();
|
||||
ComputeEntropyAtom(class LAMMPS *, int, char **);
|
||||
~ComputeEntropyAtom();
|
||||
void init();
|
||||
void init_list(int, class NeighList *);
|
||||
void compute_peratom();
|
||||
|
@ -59,13 +59,13 @@ Self-explanatory. Check the input script syntax and compare to the
|
|||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Compute pentropy/atom requires a pair style be defined
|
||||
E: Compute entropy/atom requires a pair style be defined
|
||||
|
||||
This is because the computation of the pair entropy values
|
||||
uses a pairwise neighbor list.
|
||||
|
||||
W: More than one compute pentropy/atom
|
||||
W: More than one compute entropy/atom
|
||||
|
||||
It is not efficient to use compute pentropy/atom more than once.
|
||||
It is not efficient to use compute entropy/atom more than once.
|
||||
|
||||
*/
|
Loading…
Reference in New Issue