start of clean up

This commit is contained in:
Tom Swinburne
2020-04-17 18:11:59 +02:00
parent 6904e1e6ef
commit 0ea2eabbb2
11 changed files with 383 additions and 1437 deletions

View File

@ -26,6 +26,5 @@ make machine # for binary (machine= e.g. mpi)
To run the example from this folder:
```
mpirun -np NPROCS /path/to/lammps/src/lmp_machine < pafi.lammps
mpirun -np NPROCS /path/to/lammps/src/lmp_machine -in in.pafi.lammps
```

View File

@ -1,6 +1,7 @@
units metal
atom_style atomic
atom_modify map array sort 0 0.0
neigh_modify every 2 delay 10 check yes page 1000000 one 100000
## read in path data using fix property/atom
fix pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz
@ -9,7 +10,8 @@ run 0
## EAM potential
pair_style eam/fs
pair_coeff * * ../Fe.eam.fs Fe
pair_coeff * * Fe_M07.eam.fs Fe
mass * 55.85
thermo 100
@ -23,7 +25,7 @@ compute pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_dd
run 0
## fix name group-id hp compute-id temperature damp seed overdamped 0/1 com 0/1
fix hp all hp pa 400.0 0.1 434 overdamped 1 com 1
fix hp all pafi pa 1000.1 0.05 434 overdamped 1 com 1
run 0
variable dn equal f_hp[4]*f_hp[4] # should be zero
fix af all ave/time 1 1000 1000 f_hp[1] f_hp[2] f_hp[3] v_dn
@ -46,3 +48,4 @@ unfix hp
minimize 0 0 1000 1000
print "energy=${pe}"
write_data final.dat

View File

@ -0,0 +1,331 @@
LAMMPS (19 Mar 2020)
units metal
boundary p p p
atom_style atomic
## read in path data using fix property/atom
fix pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz
read_data test.dat fix pa NULL PafiPath
orthogonal box = (0 0 0) to (19.9872 19.9872 19.9872)
1 by 1 by 2 MPI processor grid
reading atoms ...
687 atoms
read_data CPU = 0.00923154 secs
run 0
WARNING: No pairwise cutoff or binsize set. Atom sorting therefore disabled. (../atom.cpp:1950)
WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:166)
Per MPI rank memory allocation (min/avg/max) = 2.422 | 2.422 | 2.422 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 0
Loop time of 6.9535e-06 on 2 procs for 0 steps with 687 atoms
107.9% CPU use with 2 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 6.954e-06 | | |100.00
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 0 ave 0 max 0 min
Histogram: 2 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 2 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
## EAM potential
pair_style eam/fs
pair_coeff * * Fe_M07.eam.fs Fe
mass * 55.85
thermo 100
compute pe all pe
variable pe equal pe
run 0
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 7.8
ghost atom cutoff = 7.8
binsize = 3.9, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair eam/fs, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.438 | 3.438 | 3.438 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -2828.1883 0 -2828.1883 3563.9872
Loop time of 1.475e-06 on 2 procs for 0 steps with 687 atoms
169.5% CPU use with 2 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 1.475e-06 | | |100.00
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2484 max 2465 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28898 ave 29188 max 28608 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57796
Ave neighs/atom = 84.1281
Neighbor list builds = 0
Dangerous builds = 0
print "energy=${pe}"
energy=-2828.18833783692
## compute property/atom to access relevant fields
compute pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz
run 0
Per MPI rank memory allocation (min/avg/max) = 3.438 | 3.438 | 3.438 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -2828.1883 0 -2828.1883 3563.9872
Loop time of 1.683e-06 on 2 procs for 0 steps with 687 atoms
208.0% CPU use with 2 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 1.683e-06 | | |100.00
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2484 max 2465 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28898 ave 29188 max 28608 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57796
Ave neighs/atom = 84.1281
Neighbor list builds = 0
Dangerous builds = 0
## fix name group-id hp compute-id temperature damp seed overdamped 0/1 com 0/1
fix hp all hp pa 400.0 0.1 434 overdamped 1 com 1
fix hp compute name,style: pa,property/atom
run 0
Per MPI rank memory allocation (min/avg/max) = 4.938 | 4.938 | 4.938 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -2828.1883 0 -2828.1883 3563.9872
Loop time of 2.206e-06 on 2 procs for 0 steps with 687 atoms
294.7% CPU use with 2 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 2.206e-06 | | |100.00
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2484 max 2465 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28898 ave 29188 max 28608 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57796
Ave neighs/atom = 84.1281
Neighbor list builds = 0
Dangerous builds = 0
variable dn equal f_hp[4]*f_hp[4] # should be zero
fix af all ave/time 1 1000 1000 f_hp[1] f_hp[2] f_hp[3] v_dn
variable adn equal f_af[4] # should be zero
variable apf equal f_af[1]
run 1000
Per MPI rank memory allocation (min/avg/max) = 4.938 | 4.938 | 4.938 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -2828.1883 0 -2828.1883 3563.9872
100 0 -2787.7125 0 -2787.7125 16811.138
200 0 -2787.3136 0 -2787.3136 17302.039
300 0 -2788.1621 0 -2788.1621 16576.307
400 0 -2791.1893 0 -2791.1893 15611.421
500 0 -2787.3835 0 -2787.3835 17015.601
600 0 -2791.3402 0 -2791.3402 13819.752
700 0 -2788.5604 0 -2788.5604 15661.073
800 0 -2788.26 0 -2788.26 15554.53
900 0 -2788.2513 0 -2788.2513 16693.47
1000 0 -2790.1726 0 -2790.1726 15862.893
Loop time of 2.15129 on 2 procs for 1000 steps with 687 atoms
Performance: 40.162 ns/day, 0.598 hours/ns, 464.837 timesteps/s
98.3% CPU use with 2 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.9813 | 1.993 | 2.0047 | 0.8 | 92.64
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.058066 | 0.069807 | 0.081548 | 4.4 | 3.24
Output | 0.00018995 | 0.0002629 | 0.00033584 | 0.0 | 0.01
Modify | 0.081354 | 0.081403 | 0.081452 | 0.0 | 3.78
Other | | 0.006816 | | | 0.32
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2484 max 2465 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28898 ave 29188 max 28608 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57796
Ave neighs/atom = 84.1281
Neighbor list builds = 0
Dangerous builds = 0
print "Squared displacement normal to hyperplane = ${adn} A^2"
Squared displacement normal to hyperplane = 1.92841033952627e-23 A^2
print "average projected force = ${apf} eV/A"
average projected force = 0.303660991606611 eV/A
## minimize under same constraint (temperature effectively zero)
min_style fire
minimize 0 0 1000 1000
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:190)
Parameters for fire:
dmax delaystep dtgrow dtshrink alpha0 alphashrink tmax tmin integrator halfstepback
0.1 20 1.1 0.5 0.25 0.99 10 0.02 eulerimplicit yes
Per MPI rank memory allocation (min/avg/max) = 4.938 | 4.938 | 4.938 Mbytes
Step Temp E_pair E_mol TotEng Press
1000 0 -2790.1726 0 -2790.1726 15862.893
1100 0.01395318 -2828.1875 0 -2828.1862 3564.2791
1200 1.3924969e-08 -2828.1886 0 -2828.1886 3561.3085
1300 2.7246418e-10 -2828.1886 0 -2828.1886 3561.2517
1400 1.990932e-13 -2828.1886 0 -2828.1886 3561.2506
1500 3.6357963e-16 -2828.1886 0 -2828.1886 3561.2513
1600 3.7304413e-16 -2828.1886 0 -2828.1886 3561.252
1700 3.7758424e-16 -2828.1886 0 -2828.1886 3561.2527
1800 3.7938855e-16 -2828.1886 0 -2828.1886 3561.2534
1900 3.800255e-16 -2828.1886 0 -2828.1886 3561.2542
2000 3.8025411e-16 -2828.1886 0 -2828.1886 3561.2549
Loop time of 1.14675 on 2 procs for 1000 steps with 687 atoms
97.6% CPU use with 2 MPI tasks x no OpenMP threads
Minimization stats:
Stopping criterion = max iterations
Energy initial, next-to-last, final =
-2790.17255859 -2828.18861166 -2828.18861166
Force two-norm initial, final = 27.9307 5.03831e-07
Force max component initial, final = 2.89389 1.97794e-07
Final line search alpha, max atom move = 0 0
Iterations, force evaluations = 1000 1018
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.0279 | 1.0557 | 1.0836 | 2.7 | 92.06
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.034238 | 0.062094 | 0.089951 | 11.2 | 5.41
Output | 0.00014876 | 0.00019727 | 0.00024578 | 0.0 | 0.02
Modify | 0.017477 | 0.017529 | 0.01758 | 0.0 | 1.53
Other | | 0.01121 | | | 0.98
Nlocal: 343.5 ave 345 max 342 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2476 max 2473 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28901.5 ave 30125 max 27678 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57803
Ave neighs/atom = 84.1383
Neighbor list builds = 0
Dangerous builds = 0
print "energy=${pe}"
energy=-2828.1886116623
## minimize without constraint
unfix af
unfix hp
minimize 0 0 1000 1000
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:190)
Parameters for fire:
dmax delaystep dtgrow dtshrink alpha0 alphashrink tmax tmin integrator halfstepback
0.1 20 1.1 0.5 0.25 0.99 10 0.02 eulerimplicit yes
Per MPI rank memory allocation (min/avg/max) = 4.563 | 4.563 | 4.563 Mbytes
Step Temp E_pair E_mol TotEng Press
2000 0 -2828.1886 0 -2828.1886 3561.2549
2100 0.00019671788 -2828.3784 0 -2828.3784 3831.5695
2200 1.3047007e-08 -2828.3785 0 -2828.3785 3828.431
2300 1.2837148e-11 -2828.3785 0 -2828.3785 3828.4076
2400 3.6777219e-16 -2828.3785 0 -2828.3785 3828.4068
2500 1.0710252e-18 -2828.3785 0 -2828.3785 3828.4068
2600 1.3523987e-23 -2828.3785 0 -2828.3785 3828.4068
2700 1.4824109e-25 -2828.3785 0 -2828.3785 3828.4068
2800 2.3789827e-26 -2828.3785 0 -2828.3785 3828.4068
2900 1.6175585e-25 -2828.3785 0 -2828.3785 3828.4068
3000 2.6404401e-26 -2828.3785 0 -2828.3785 3828.4068
Loop time of 1.0043 on 2 procs for 1000 steps with 687 atoms
97.4% CPU use with 2 MPI tasks x no OpenMP threads
Minimization stats:
Stopping criterion = max iterations
Energy initial, next-to-last, final =
-2828.18861166 -2828.37851625 -2828.37851625
Force two-norm initial, final = 0.380384 3.56702e-13
Force max component initial, final = 0.149002 3.48055e-14
Final line search alpha, max atom move = 0 0
Iterations, force evaluations = 1000 1029
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.93605 | 0.94701 | 0.95796 | 1.1 | 94.30
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.034637 | 0.04556 | 0.056484 | 5.1 | 4.54
Output | 0.00014805 | 0.00019121 | 0.00023438 | 0.0 | 0.02
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.01154 | | | 1.15
Nlocal: 343.5 ave 353 max 334 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 2474.5 ave 2484 max 2465 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 28898.5 ave 29188 max 28609 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 57797
Ave neighs/atom = 84.1295
Neighbor list builds = 0
Dangerous builds = 0
print "energy=${pe}"
energy=-2828.37851624648
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:04

File diff suppressed because it is too large Load Diff

3
src/.gitignore vendored
View File

@ -59,6 +59,9 @@
/fix_*cauchy.cpp
/fix_*cauchy.h
/fix_pafi*.cpp
/fix_pafi*.h
/compute_test_nbl.cpp
/compute_test_nbl.h
/pair_multi_lucy.cpp

View File

@ -22,7 +22,7 @@
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "fix_hp.h"
#include "fix_pafi.h"
#include "math_extra.h"
#include "atom.h"
#include "force.h"
@ -66,7 +66,7 @@ enum{NONE,CONSTANT,EQUAL,ATOM};
/* ---------------------------------------------------------------------- */
FixHP::FixHP(LAMMPS *lmp, int narg, char **arg) :
FixPAFI::FixPAFI(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg), idregion(NULL), random(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_user_pafi_package);
@ -156,7 +156,7 @@ FixHP::FixHP(LAMMPS *lmp, int narg, char **arg) :
results_all[i] = 0.0;
}
maxatom = 1;
memory->create(h,maxatom,3,"fixhp:h");
memory->create(h,maxatom,3,"FixPAFI:h");
// initialize Marsaglia RNG with processor-unique seed
random = new RanMars(lmp,seed + comm->me);
@ -168,7 +168,7 @@ FixHP::FixHP(LAMMPS *lmp, int narg, char **arg) :
/* ---------------------------------------------------------------------- */
FixHP::~FixHP()
FixPAFI::~FixPAFI()
{
if (copymode) return;
delete random;
@ -178,7 +178,7 @@ FixHP::~FixHP()
/* ---------------------------------------------------------------------- */
int FixHP::setmask()
int FixPAFI::setmask()
{
int mask = 0;
mask |= POST_FORCE;
@ -194,7 +194,7 @@ int FixHP::setmask()
/* ---------------------------------------------------------------------- */
void FixHP::init()
void FixPAFI::init()
{
// set index and check validity of region
// nve
@ -216,7 +216,7 @@ void FixHP::init()
}
void FixHP::setup(int vflag)
void FixPAFI::setup(int vflag)
{
if (strstr(update->integrate_style,"verlet"))
post_force(vflag);
@ -228,7 +228,7 @@ void FixHP::setup(int vflag)
}
}
void FixHP::min_setup(int vflag)
void FixPAFI::min_setup(int vflag)
{
if( strcmp(update->minimize_style,"fire")!=0 && strcmp(update->minimize_style,"quickmin")!=0 )
error->all(FLERR,"fix hp requires damped dynamics minimizer");
@ -236,7 +236,7 @@ void FixHP::min_setup(int vflag)
}
void FixHP::post_force(int vflag)
void FixPAFI::post_force(int vflag)
{
double **x = atom->x;
double **v = atom->v;
@ -257,7 +257,7 @@ void FixHP::post_force(int vflag)
if (atom->nmax > maxatom) {
maxatom = atom->nmax;
memory->destroy(h);
memory->create(h,maxatom,3,"fixhp:h");
memory->create(h,maxatom,3,"FixPAFI:h");
}
PathCompute->compute_peratom();
@ -410,7 +410,7 @@ void FixHP::post_force(int vflag)
};
void FixHP::post_force_respa(int vflag, int ilevel, int iloop)
void FixPAFI::post_force_respa(int vflag, int ilevel, int iloop)
{
// set force to desired value on requested level, 0.0 on other levels
@ -434,7 +434,7 @@ void FixHP::post_force_respa(int vflag, int ilevel, int iloop)
}
};
void FixHP::min_post_force(int vflag)
void FixPAFI::min_post_force(int vflag)
{
double **x = atom->x;
double **v = atom->v;
@ -559,14 +559,14 @@ void FixHP::min_post_force(int vflag)
}
};
double FixHP::compute_vector(int n)
double FixPAFI::compute_vector(int n)
{
return results_all[n];
};
void FixHP::initial_integrate(int vflag)
void FixPAFI::initial_integrate(int vflag)
{
double dtfm;
@ -681,7 +681,7 @@ void FixHP::initial_integrate(int vflag)
/* ---------------------------------------------------------------------- */
void FixHP::final_integrate()
void FixPAFI::final_integrate()
{
double dtfm;
@ -757,7 +757,7 @@ void FixHP::final_integrate()
/* ---------------------------------------------------------------------- */
void FixHP::initial_integrate_respa(int vflag, int ilevel, int iloop)
void FixPAFI::initial_integrate_respa(int vflag, int ilevel, int iloop)
{
dtv = step_respa[ilevel];
dtf = 0.5 * step_respa[ilevel] * force->ftm2v;
@ -771,7 +771,7 @@ void FixHP::initial_integrate_respa(int vflag, int ilevel, int iloop)
/* ---------------------------------------------------------------------- */
void FixHP::final_integrate_respa(int ilevel, int iloop)
void FixPAFI::final_integrate_respa(int ilevel, int iloop)
{
dtf = 0.5 * step_respa[ilevel] * force->ftm2v;
final_integrate();
@ -779,7 +779,7 @@ void FixHP::final_integrate_respa(int ilevel, int iloop)
/* ---------------------------------------------------------------------- */
void FixHP::reset_dt()
void FixPAFI::reset_dt()
{
dtv = update->dt;
dtf = 0.5 * update->dt * force->ftm2v;
@ -790,7 +790,7 @@ void FixHP::reset_dt()
memory usage of local atom-based array
------------------------------------------------------------------------- */
double FixHP::memory_usage()
double FixPAFI::memory_usage()
{
double bytes = 0.0;
bytes = maxatom*3 * sizeof(double);

View File

@ -13,22 +13,22 @@
#ifdef FIX_CLASS
FixStyle(hp,FixHP)
FixStyle(pafi,FixPAFI)
#else
#ifndef LMP_FIX_HP_H
#define LMP_FIX_HP_H
#ifndef LMP_FIX_PAFI_H
#define LMP_FIX_PAFI_H
#include "fix.h"
#include "compute.h"
namespace LAMMPS_NS {
class FixHP : public Fix {
class FixPAFI : public Fix {
public:
FixHP(class LAMMPS *, int, char **);
virtual ~FixHP();
FixPAFI(class LAMMPS *, int, char **);
virtual ~FixPAFI();
int setmask();
virtual void init();

View File

@ -1,12 +0,0 @@
LAMMPS package for PAFI = (Projected Average Force Integrator)
author:
Thomas D Swinburne
CNRS / CINaM Marseille
swinburne at cinam.univ-mrs.fr
tomswinburne.github.io
Code used in https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.135503
Unsupervised Calculation of Free Energy Barriers in Large Crystalline Systems
T.D. Swinburne and M.-C. Marinica
Physical Review Letters 120 (13), 135503, 2018

View File

@ -2294,11 +2294,13 @@ void *Atom::extract(char *name)
if (strcmp(name,"dpdTheta") == 0) return (void *) dpdTheta;
if (strcmp(name,"edpd_temp") == 0) return (void *) edpd_temp;
// when used with fix property/atom
int cf=0;
int idv = find_custom(name, cf);
if(idv>=0) return (void *) dvector[idv];
int vector_index, vector_type;
vector_index = lmp->atom->find_custom(name, vector_type);
if(vector_index>=0) return (void *) dvector[vector_index];
return NULL;
}

View File

@ -831,6 +831,17 @@ void lammps_gather_atoms(void *ptr, char *name,
int natoms = static_cast<int> (lmp->atom->natoms);
void *vptr = lmp->atom->extract(name);
// look for property/atom if NULL
/*int vector_index, vector_type=type;
if (vptr == NULL) {
vector_index = lmp->atom->find_custom(name, vector_type);
if(vector_index>=0 && vector_type == type) {
if(type==0) vptr = (void *) lmp->atom->ivector[vector_index];
else vptr = (void *) lmp->atom->dvector[vector_index];
}
}*/
if (vptr == NULL) {
lmp->error->warning(FLERR,"lammps_gather_atoms: unknown property name");
return;