Merge branch 'master' into fix-compiler-warnings

This commit is contained in:
Axel Kohlmeyer
2019-10-25 14:07:50 -04:00
237 changed files with 6899 additions and 6429 deletions

View File

@ -53,7 +53,7 @@ include(CheckCCompilerFlag)
include(CheckIncludeFileCXX) include(CheckIncludeFileCXX)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel") if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict -std=c++11")
endif() endif()
option(DISABLE_CXX11_REQUIREMENT "Disable check that requires C++11 for compiling LAMMPS" OFF) option(DISABLE_CXX11_REQUIREMENT "Disable check that requires C++11 for compiling LAMMPS" OFF)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,9 @@
\documentstyle[12pt]{article}
\pagestyle{empty}
\begin{document}
\begin{eqnarray*}
k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}}
\end{eqnarray*}
\end{document}

Binary file not shown.

View File

@ -48,8 +48,8 @@ $$ \mathbf{G}_{12} = \mathbf{A}_1^T \mathbf{S}_1^2 \mathbf{A}_1 +
\mathbf{G}_2. $$ \mathbf{G}_2. $$
Let the relative energy matrices $\mathbf{E}_i = \mbox{diag} Let the relative energy matrices $\mathbf{E}_i = \mbox{diag}
(\epsilon_{ia}, \epsilon_{ib}, \epsilon_{ic})$ be given by (\epsilon_{ia}^{-1/\mu}, \epsilon_{ib}^{-1/\mu}, \epsilon_{ic}^{-1/\mu})$
the relative well depths (dimensionless energy scales be given by the relative well depths (dimensionless energy scales
inversely proportional to the well-depths of the respective inversely proportional to the well-depths of the respective
orthogonal configurations of the interacting molecules). The orthogonal configurations of the interacting molecules). The
$\chi$ orientation-dependent energy based on the user-specified $\chi$ orientation-dependent energy based on the user-specified
@ -62,8 +62,8 @@ $$ \hat{\mathbf{r}}_{12} = { \mathbf{r}_{12} } / |\mathbf{r}_{12}|, $$
and and
$$ \mathbf{B}_{12} = \mathbf{A}_1^T \mathbf{E}_1^2 \mathbf{A}_1 + $$ \mathbf{B}_{12} = \mathbf{A}_1^T \mathbf{E}_1 \mathbf{A}_1 +
\mathbf{A}_2^T \mathbf{E}_2^2 \mathbf{A}_2 = \mathbf{B}_1 + \mathbf{A}_2^T \mathbf{E}_2 \mathbf{A}_2 = \mathbf{B}_1 +
\mathbf{B}_2. $$ \mathbf{B}_2. $$
Here, we use the distance of closest approach approximation given by the Here, we use the distance of closest approach approximation given by the

View File

@ -266,7 +266,7 @@ either 'none' or 'charges.' Further details are provided in the
discussion of the 'update_edges' keyword. The fourth optional section discussion of the 'update_edges' keyword. The fourth optional section
begins with the keyword 'Constraints' and lists additional criteria begins with the keyword 'Constraints' and lists additional criteria
that must be satisfied in order for the reaction to occur. Currently, that must be satisfied in order for the reaction to occur. Currently,
there are two types of constraints available, as discussed below. there are three types of constraints available, as discussed below.
A sample map file is given below: A sample map file is given below:
@ -320,6 +320,27 @@ the central atom). Angles must be specified in degrees. This
constraint can be used to enforce a certain orientation between constraint can be used to enforce a certain orientation between
reacting molecules. reacting molecules.
The constraint of type 'arrhenius' imposes an additional reaction
probability according to the temperature-dependent Arrhenius equation:
:c,image(Eqs/fix_bond_react.jpg)
The Arrhenius constraint has the following syntax:
arrhenius {A} {n} {E_a} {seed} :pre
where 'arrhenius' is the required keyword, {A} is the pre-exponential
factor, {n} is the exponent of the temperature dependence, {E_a} is
the activation energy ("units"_units.html of energy), and {seed} is a
random number seed. The temperature is defined as the instantaneous
temperature averaged over all atoms in the reaction site, and is
calculated in the same manner as for example
"compute_temp_chunk"_compute_temp_chunk.html. Currently, there are no
options for additional temperature averaging or velocity-biased
temperature calculations. A uniform random number between 0 and 1 is
generated using {seed}; if this number is less than the result of the
Arrhenius equation above, the reaction is permitted to occur.
Once a reaction site has been successfully identified, data structures Once a reaction site has been successfully identified, data structures
within LAMMPS that store bond topology are updated to reflect the within LAMMPS that store bond topology are updated to reflect the
post-reacted molecule template. All force fields with fixed bonds, post-reacted molecule template. All force fields with fixed bonds,
@ -395,7 +416,7 @@ will apply to all reactions.
Computationally, each timestep this fix operates, it loops over Computationally, each timestep this fix operates, it loops over
neighbor lists (for bond-forming reactions) and computes distances neighbor lists (for bond-forming reactions) and computes distances
between pairs of atoms in the list. It also communicates between between pairs of atoms in the list. It also communicates between
neighboring processors to coordinate which bonds are created and/or neighboring processors to coordinate which bonds are created and/or
removed. All of these operations increase the cost of a timestep. Thus removed. All of these operations increase the cost of a timestep. Thus
you should be cautious about invoking this fix too frequently. you should be cautious about invoking this fix too frequently.

View File

@ -23,7 +23,7 @@ style1 = {hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxs
style2 = {oxdna/excv} or {oxdna/stk} or {oxdna/hbond} or {oxdna/xstk} or {oxdna/coaxstk} style2 = {oxdna/excv} or {oxdna/stk} or {oxdna/hbond} or {oxdna/xstk} or {oxdna/coaxstk}
args = list of arguments for these particular styles :ul args = list of arguments for these particular styles :ul
{oxdna/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 {oxdna/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength) seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength)
T = temperature (oxDNA units, 0.1 = 300 K) T = temperature (oxDNA units, 0.1 = 300 K)
xi = temperature-independent coefficient in stacking strength xi = temperature-independent coefficient in stacking strength
@ -36,7 +36,7 @@ args = list of arguments for these particular styles :ul
pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk
pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna/stk seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna/stk seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -51,7 +51,10 @@ excluded volume interaction {oxdna/excv}, the stacking {oxdna/stk}, cross-stacki
and coaxial stacking interaction {oxdna/coaxstk} as well and coaxial stacking interaction {oxdna/coaxstk} as well
as the hydrogen-bonding interaction {oxdna/hbond} between complementary pairs of nucleotides on as the hydrogen-bonding interaction {oxdna/hbond} between complementary pairs of nucleotides on
opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths
are supported "(Sulc)"_#Sulc1. are supported "(Sulc)"_#Sulc1. Quasi-unique base-pairing between nucleotides can be achieved by using
more complementary pairs of atom types like 5-8 and 6-7, 9-12 and 10-11, 13-16 and 14-15, etc.
This prevents the hybridization of in principle complementary bases within Ntypes/4 bases
up and down along the backbone.
The exact functional form of the pair styles is rather complex. The exact functional form of the pair styles is rather complex.
The individual potentials consist of products of modulation factors, The individual potentials consist of products of modulation factors,

View File

@ -24,7 +24,7 @@ style1 = {hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/
style2 = {oxdna2/excv} or {oxdna2/stk} or {oxdna2/hbond} or {oxdna2/xstk} or {oxdna2/coaxstk} or {oxdna2/dh} style2 = {oxdna2/excv} or {oxdna2/stk} or {oxdna2/hbond} or {oxdna2/xstk} or {oxdna2/coaxstk} or {oxdna2/dh}
args = list of arguments for these particular styles :ul args = list of arguments for these particular styles :ul
{oxdna2/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 {oxdna2/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength) seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength)
T = temperature (oxDNA units, 0.1 = 300 K) T = temperature (oxDNA units, 0.1 = 300 K)
xi = temperature-independent coefficient in stacking strength xi = temperature-independent coefficient in stacking strength
@ -41,7 +41,7 @@ args = list of arguments for these particular styles :ul
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -57,7 +57,10 @@ excluded volume interaction {oxdna2/excv}, the stacking {oxdna2/stk}, cross-stac
and coaxial stacking interaction {oxdna2/coaxstk}, electrostatic Debye-Hueckel interaction {oxdna2/dh} and coaxial stacking interaction {oxdna2/coaxstk}, electrostatic Debye-Hueckel interaction {oxdna2/dh}
as well as the hydrogen-bonding interaction {oxdna2/hbond} between complementary pairs of nucleotides on as well as the hydrogen-bonding interaction {oxdna2/hbond} between complementary pairs of nucleotides on
opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths
are supported "(Sulc)"_#Sulc2. are supported "(Sulc)"_#Sulc2. Quasi-unique base-pairing between nucleotides can be achieved by using
more complementary pairs of atom types like 5-8 and 6-7, 9-12 and 10-11, 13-16 and 14-15, etc.
This prevents the hybridization of in principle complementary bases within Ntypes/4 bases
up and down along the backbone.
The exact functional form of the pair styles is rather complex. The exact functional form of the pair styles is rather complex.
The individual potentials consist of products of modulation factors, The individual potentials consist of products of modulation factors,

View File

@ -109,6 +109,7 @@ Archlinux
arcsin arcsin
arg arg
args args
arrhenius
Arun Arun
arXiv arXiv
asin asin

View File

@ -31,7 +31,7 @@ bond_coeff * 2.0 0.25 0.7525
# oxDNA pair interactions # oxDNA pair interactions
pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk
pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna/stk seqav ${T} 1.3448 2.6568 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna/stk seqav ${T} 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ bond_coeff * 2.0 0.25 0.7525
# oxDNA pair interactions # oxDNA pair interactions
pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk
pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna/stk seqav ${T} 1.3448 2.6568 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna/stk seqav ${T} 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna/hbond seqav 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -24,14 +24,14 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45

View File

@ -1,4 +1,4 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 1 variable number equal 1
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
@ -35,8 +35,8 @@ read_data data.duplex1
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
2 = max # of 1-4 neighbors 2 = max # of 1-4 neighbors
4 = max # of special neighbors 4 = max # of special neighbors
special bonds CPU = 0.000102 secs special bonds CPU = 0.000116 secs
read_data CPU = 0.002436 secs read_data CPU = 0.002026 secs
set atom * mass 3.1575 set atom * mass 3.1575
10 settings made for mass 10 settings made for mass
@ -44,15 +44,15 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
10 atoms in group all 10 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -135,7 +135,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 3.023 | 3.023 | 3.023 Mbytes Per MPI rank memory allocation (min/avg/max) = 3.024 | 3.024 | 3.024 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.4712768 0.009525411 -1.4617514 4.663076e-06 0 0 -1.4712768 0.009525411 -1.4617514 4.663076e-06
1000 ekin = 0.00113086229080528 | erot = 0.0043101016040658 | epot = -14.6229549982368 | etot = -14.617514034342 1000 ekin = 0.00113086229080528 | erot = 0.0043101016040658 | epot = -14.6229549982368 | etot = -14.617514034342
@ -1139,21 +1139,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 0.190992053959174 | erot = 0.320462575795008 | epot = -15.1289686644104 | etot = -14.6175140346562 999000 ekin = 0.190992053959174 | erot = 0.320462575795008 | epot = -15.1289686644104 | etot = -14.6175140346562
1000000 ekin = 0.179708146665509 | erot = 0.311553394429298 | epot = -15.1087755756885 | etot = -14.6175140345937 1000000 ekin = 0.179708146665509 | erot = 0.311553394429298 | epot = -15.1087755756885 | etot = -14.6175140345937
1000000 0.013311715 -1.5443684 0.033490821 -1.4929067 -3.7544839e-05 1000000 0.013311715 -1.5443684 0.033490821 -1.4929067 -3.7544839e-05
Loop time of 20.4903 on 1 procs for 1000000 steps with 10 atoms Loop time of 18.4193 on 1 procs for 1000000 steps with 10 atoms
Performance: 42166.322 tau/day, 48803.614 timesteps/s Performance: 46907.305 tau/day, 54290.862 timesteps/s
98.3% CPU use with 1 MPI tasks x no OpenMP threads 99.5% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 16.542 | 16.542 | 16.542 | 0.0 | 80.73 Pair | 14.935 | 14.935 | 14.935 | 0.0 | 81.08
Bond | 0.62224 | 0.62224 | 0.62224 | 0.0 | 3.04 Bond | 0.55556 | 0.55556 | 0.55556 | 0.0 | 3.02
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.21974 | 0.21974 | 0.21974 | 0.0 | 1.07 Comm | 0.16028 | 0.16028 | 0.16028 | 0.0 | 0.87
Output | 7e-06 | 7e-06 | 7e-06 | 0.0 | 0.00 Output | 7e-06 | 7e-06 | 7e-06 | 0.0 | 0.00
Modify | 2.7798 | 2.7798 | 2.7798 | 0.0 | 13.57 Modify | 2.5402 | 2.5402 | 2.5402 | 0.0 | 13.79
Other | | 0.3269 | | | 1.60 Other | | 0.2285 | | | 1.24
Nlocal: 10 ave 10 max 10 min Nlocal: 10 ave 10 max 10 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -1169,4 +1169,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:20 Total wall time: 0:00:18

View File

@ -1,4 +1,4 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 1 variable number equal 1
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
@ -35,8 +35,8 @@ read_data data.duplex1
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
2 = max # of 1-4 neighbors 2 = max # of 1-4 neighbors
4 = max # of special neighbors 4 = max # of special neighbors
special bonds CPU = 0.000196 secs special bonds CPU = 0.000198 secs
read_data CPU = 0.003266 secs read_data CPU = 0.004522 secs
set atom * mass 3.1575 set atom * mass 3.1575
10 settings made for mass 10 settings made for mass
@ -44,15 +44,15 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
10 atoms in group all 10 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -135,7 +135,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 7.652 | 7.834 | 8.016 Mbytes Per MPI rank memory allocation (min/avg/max) = 7.653 | 7.835 | 8.018 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.4712768 0.009525411 -1.4617514 4.663076e-06 0 0 -1.4712768 0.009525411 -1.4617514 4.663076e-06
1000 ekin = 0.00113086229080478 | erot = 0.00431010160406708 | epot = -14.6229549982368 | etot = -14.617514034342 1000 ekin = 0.00113086229080478 | erot = 0.00431010160406708 | epot = -14.6229549982368 | etot = -14.617514034342
@ -1139,21 +1139,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 0.190992053959209 | erot = 0.320462575794744 | epot = -15.1289686644103 | etot = -14.6175140346563 999000 ekin = 0.190992053959209 | erot = 0.320462575794744 | epot = -15.1289686644103 | etot = -14.6175140346563
1000000 ekin = 0.179708146665587 | erot = 0.311553394428757 | epot = -15.1087755756882 | etot = -14.6175140345938 1000000 ekin = 0.179708146665587 | erot = 0.311553394428757 | epot = -15.1087755756882 | etot = -14.6175140345938
1000000 0.013311715 -1.5443684 0.033490821 -1.4929067 -3.7544839e-05 1000000 0.013311715 -1.5443684 0.033490821 -1.4929067 -3.7544839e-05
Loop time of 28.9854 on 4 procs for 1000000 steps with 10 atoms Loop time of 20.7945 on 4 procs for 1000000 steps with 10 atoms
Performance: 29808.075 tau/day, 34500.086 timesteps/s Performance: 41549.361 tau/day, 48089.538 timesteps/s
96.6% CPU use with 4 MPI tasks x no OpenMP threads 99.6% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 0.85571 | 9.8341 | 18.111 | 228.8 | 33.93 Pair | 0.66725 | 7.9254 | 14.304 | 209.9 | 38.11
Bond | 0.12393 | 0.38078 | 0.62324 | 32.7 | 1.31 Bond | 0.095496 | 0.30973 | 0.49863 | 30.5 | 1.49
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 2.795 | 3.6269 | 4.4228 | 30.4 | 12.51 Comm | 1.8943 | 2.1825 | 2.4604 | 15.6 | 10.50
Output | 1.8e-05 | 2.575e-05 | 2.9e-05 | 0.0 | 0.00 Output | 2e-05 | 2.9e-05 | 3.2e-05 | 0.0 | 0.00
Modify | 0.24721 | 1.1083 | 1.9206 | 64.1 | 3.82 Modify | 0.18231 | 0.95644 | 1.673 | 62.4 | 4.60
Other | | 14.04 | | | 48.42 Other | | 9.421 | | | 45.30
Nlocal: 2.5 ave 5 max 0 min Nlocal: 2.5 ave 5 max 0 min
Histogram: 1 0 1 0 0 0 0 0 1 1 Histogram: 1 0 1 0 0 0 0 0 1 1
@ -1169,4 +1169,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:28 Total wall time: 0:00:20

View File

@ -2,6 +2,7 @@ variable number equal 2
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
variable T equal 0.1 variable T equal 0.1
units lj units lj
dimension 3 dimension 3
@ -23,14 +24,14 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45

View File

@ -1,8 +1,9 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 2 variable number equal 2
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
variable T equal 0.1 variable T equal 0.1
units lj units lj
dimension 3 dimension 3
@ -34,8 +35,8 @@ read_data data.duplex2
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
4 = max # of 1-4 neighbors 4 = max # of 1-4 neighbors
6 = max # of special neighbors 6 = max # of special neighbors
special bonds CPU = 0.000103 secs special bonds CPU = 0.000127 secs
read_data CPU = 0.00215 secs read_data CPU = 0.001506 secs
set atom * mass 3.1575 set atom * mass 3.1575
16 settings made for mass 16 settings made for mass
@ -43,15 +44,15 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
16 atoms in group all 16 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -136,7 +137,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 3.025 | 3.025 | 3.025 Mbytes Per MPI rank memory allocation (min/avg/max) = 3.026 | 3.026 | 3.026 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.5358787 0.0096742456 -1.5262045 1.0127369e-05 0 0 -1.5358787 0.0096742456 -1.5262045 1.0127369e-05
1000 ekin = 1.54282272464468 | erot = 1.71757897250772 | epot = -24.4403527731341 | etot = -21.1799510759817 1000 ekin = 1.54282272464468 | erot = 1.71757897250772 | epot = -24.4403527731341 | etot = -21.1799510759817
@ -1140,21 +1141,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 2.08919327368179 | erot = 2.76364485800616 | epot = -20.9705413117635 | etot = -16.1177031800756 999000 ekin = 2.08919327368179 | erot = 2.76364485800616 | epot = -20.9705413117635 | etot = -16.1177031800756
1000000 ekin = 2.11761701334905 | erot = 2.1409630347026 | epot = -20.9096627221725 | etot = -16.6510826741208 1000000 ekin = 2.11761701334905 | erot = 2.1409630347026 | epot = -20.9096627221725 | etot = -16.6510826741208
1000000 0.094116312 -1.3659956 0.059141691 -1.1745029 -3.0654283e-05 1000000 0.094116312 -1.3659956 0.059141691 -1.1745029 -3.0654283e-05
Loop time of 43.6978 on 1 procs for 1000000 steps with 16 atoms Loop time of 39.73 on 1 procs for 1000000 steps with 16 atoms
Performance: 19772.150 tau/day, 22884.433 timesteps/s Performance: 21746.777 tau/day, 25169.881 timesteps/s
98.6% CPU use with 1 MPI tasks x no OpenMP threads 99.7% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 32.769 | 32.769 | 32.769 | 0.0 | 74.99 Pair | 29.698 | 29.698 | 29.698 | 0.0 | 74.75
Bond | 0.93071 | 0.93071 | 0.93071 | 0.0 | 2.13 Bond | 0.84677 | 0.84677 | 0.84677 | 0.0 | 2.13
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.19584 | 0.19584 | 0.19584 | 0.0 | 0.45 Comm | 0.15576 | 0.15576 | 0.15576 | 0.0 | 0.39
Output | 1e-05 | 1e-05 | 1e-05 | 0.0 | 0.00 Output | 7e-06 | 7e-06 | 7e-06 | 0.0 | 0.00
Modify | 9.4507 | 9.4507 | 9.4507 | 0.0 | 21.63 Modify | 8.7714 | 8.7714 | 8.7714 | 0.0 | 22.08
Other | | 0.3515 | | | 0.80 Other | | 0.2585 | | | 0.65
Nlocal: 16 ave 16 max 16 min Nlocal: 16 ave 16 max 16 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -1170,4 +1171,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:43 Total wall time: 0:00:39

View File

@ -1,8 +1,9 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 2 variable number equal 2
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
variable T equal 0.1 variable T equal 0.1
units lj units lj
dimension 3 dimension 3
@ -34,8 +35,8 @@ read_data data.duplex2
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
4 = max # of 1-4 neighbors 4 = max # of 1-4 neighbors
6 = max # of special neighbors 6 = max # of special neighbors
special bonds CPU = 0.000162 secs special bonds CPU = 0.000188 secs
read_data CPU = 0.002971 secs read_data CPU = 0.002335 secs
set atom * mass 3.1575 set atom * mass 3.1575
16 settings made for mass 16 settings made for mass
@ -43,15 +44,15 @@ set atom * mass 3.1575
group all type 1 4 group all type 1 4
16 atoms in group all 16 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqav 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqav 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqav 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -136,7 +137,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 7.777 | 7.959 | 8.142 Mbytes Per MPI rank memory allocation (min/avg/max) = 7.778 | 7.96 | 8.143 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.5358787 0.0096742456 -1.5262045 1.0127369e-05 0 0 -1.5358787 0.0096742456 -1.5262045 1.0127369e-05
1000 ekin = 1.34554291364716 | erot = 2.30525041754444 | epot = -24.3924150888896 | etot = -20.741621757698 1000 ekin = 1.34554291364716 | erot = 2.30525041754444 | epot = -24.3924150888896 | etot = -20.741621757698
@ -1140,21 +1141,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 2.61553981530106 | erot = 1.7387289184571 | epot = -21.0217257279766 | etot = -16.6674569942185 999000 ekin = 2.61553981530106 | erot = 1.7387289184571 | epot = -21.0217257279766 | etot = -16.6674569942185
1000000 ekin = 2.34012577497833 | erot = 2.86436388995813 | epot = -21.0201566044041 | etot = -15.8156669394676 1000000 ekin = 2.34012577497833 | erot = 2.86436388995813 | epot = -21.0201566044041 | etot = -15.8156669394676
1000000 0.10400559 -1.3746133 0.060853481 -1.1675019 0.00013752759 1000000 0.10400559 -1.3746133 0.060853481 -1.1675019 0.00013752759
Loop time of 59.4195 on 4 procs for 1000000 steps with 16 atoms Loop time of 44.9291 on 4 procs for 1000000 steps with 16 atoms
Performance: 14540.686 tau/day, 16829.497 timesteps/s Performance: 19230.287 tau/day, 22257.276 timesteps/s
96.3% CPU use with 4 MPI tasks x no OpenMP threads 99.6% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 1.0304 | 20.212 | 37.839 | 369.5 | 34.02 Pair | 0.75183 | 16.839 | 31.47 | 339.4 | 37.48
Bond | 0.12844 | 0.57006 | 0.95643 | 49.6 | 0.96 Bond | 0.10416 | 0.48181 | 0.82289 | 46.2 | 1.07
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 4.3935 | 5.5635 | 6.7052 | 44.2 | 9.36 Comm | 3.0032 | 3.0414 | 3.0759 | 1.7 | 6.77
Output | 2.3e-05 | 3.575e-05 | 4.1e-05 | 0.0 | 0.00 Output | 1.6e-05 | 2.2e-05 | 2.4e-05 | 0.0 | 0.00
Modify | 0.3513 | 3.4695 | 6.4366 | 144.3 | 5.84 Modify | 0.25426 | 2.929 | 5.4956 | 134.9 | 6.52
Other | | 29.6 | | | 49.82 Other | | 21.64 | | | 48.16
Nlocal: 4 ave 8 max 0 min Nlocal: 4 ave 8 max 0 min
Histogram: 1 1 0 0 0 0 0 0 1 1 Histogram: 1 1 0 0 0 0 0 0 1 1
@ -1170,4 +1171,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:59 Total wall time: 0:00:44

View File

@ -24,14 +24,14 @@ set atom * mass 1.0
group all type 1 4 group all type 1 4
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45

View File

@ -1,4 +1,4 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 1 variable number equal 1
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
@ -35,8 +35,8 @@ read_data data.duplex3
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
2 = max # of 1-4 neighbors 2 = max # of 1-4 neighbors
4 = max # of special neighbors 4 = max # of special neighbors
special bonds CPU = 0.000113 secs special bonds CPU = 0.000145 secs
read_data CPU = 0.00275 secs read_data CPU = 0.001965 secs
set atom * mass 1.0 set atom * mass 1.0
10 settings made for mass 10 settings made for mass
@ -44,15 +44,15 @@ set atom * mass 1.0
group all type 1 4 group all type 1 4
10 atoms in group all 10 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -135,7 +135,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 3.023 | 3.023 | 3.023 Mbytes Per MPI rank memory allocation (min/avg/max) = 3.024 | 3.024 | 3.024 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.4720158 0.009525411 -1.4624904 3.1370518e-06 0 0 -1.4720158 0.009525411 -1.4624904 3.1370518e-06
1000 ekin = 0.00366431201929618 | erot = 0.00193726360267488 | epot = -14.630505317301 | etot = -14.624903741679 1000 ekin = 0.00366431201929618 | erot = 0.00193726360267488 | epot = -14.630505317301 | etot = -14.624903741679
@ -1139,21 +1139,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 0.330110494517114 | erot = 0.658973630822449 | epot = -15.6139878677246 | etot = -14.624903742385 999000 ekin = 0.330110494517114 | erot = 0.658973630822449 | epot = -15.6139878677246 | etot = -14.624903742385
1000000 ekin = 0.345190458650495 | erot = 0.661138339466907 | epot = -15.6312325406154 | etot = -14.624903742498 1000000 ekin = 0.345190458650495 | erot = 0.661138339466907 | epot = -15.6312325406154 | etot = -14.624903742498
1000000 0.025569664 -1.5839232 0.020799898 -1.5286042 -3.5789082e-06 1000000 0.025569664 -1.5839232 0.020799898 -1.5286042 -3.5789082e-06
Loop time of 20.5464 on 1 procs for 1000000 steps with 10 atoms Loop time of 25.9663 on 1 procs for 1000000 steps with 10 atoms
Performance: 42051.215 tau/day, 48670.388 timesteps/s Performance: 33273.840 tau/day, 38511.388 timesteps/s
98.3% CPU use with 1 MPI tasks x no OpenMP threads 99.6% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 16.716 | 16.716 | 16.716 | 0.0 | 81.36 Pair | 21.428 | 21.428 | 21.428 | 0.0 | 82.52
Bond | 0.6285 | 0.6285 | 0.6285 | 0.0 | 3.06 Bond | 0.76981 | 0.76981 | 0.76981 | 0.0 | 2.96
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.187 | 0.187 | 0.187 | 0.0 | 0.91 Comm | 0.25709 | 0.25709 | 0.25709 | 0.0 | 0.99
Output | 6e-06 | 6e-06 | 6e-06 | 0.0 | 0.00 Output | 9e-06 | 9e-06 | 9e-06 | 0.0 | 0.00
Modify | 2.7186 | 2.7186 | 2.7186 | 0.0 | 13.23 Modify | 3.1584 | 3.1584 | 3.1584 | 0.0 | 12.16
Other | | 0.2965 | | | 1.44 Other | | 0.3534 | | | 1.36
Nlocal: 10 ave 10 max 10 min Nlocal: 10 ave 10 max 10 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -1169,4 +1169,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:20 Total wall time: 0:00:25

View File

@ -1,4 +1,4 @@
LAMMPS (18 Jun 2019) LAMMPS (7 Aug 2019)
variable number equal 1 variable number equal 1
variable ofreq equal 1000 variable ofreq equal 1000
variable efreq equal 1000 variable efreq equal 1000
@ -35,8 +35,8 @@ read_data data.duplex3
2 = max # of 1-3 neighbors 2 = max # of 1-3 neighbors
2 = max # of 1-4 neighbors 2 = max # of 1-4 neighbors
4 = max # of special neighbors 4 = max # of special neighbors
special bonds CPU = 0.000189 secs special bonds CPU = 0.000188 secs
read_data CPU = 0.003302 secs read_data CPU = 0.002791 secs
set atom * mass 1.0 set atom * mass 1.0
10 settings made for mass 10 settings made for mass
@ -44,15 +44,15 @@ set atom * mass 1.0
group all type 1 4 group all type 1 4
10 atoms in group all 10 atoms in group all
# oxDNA bond interactions - FENE backbone # oxDNA2 bond interactions - FENE backbone
bond_style oxdna2/fene bond_style oxdna2/fene
bond_coeff * 2.0 0.25 0.7564 bond_coeff * 2.0 0.25 0.7564
# oxDNA pair interactions # oxDNA2 pair interactions
pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep ${T} 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@ -135,7 +135,7 @@ Neighbor list info ...
pair build: copy pair build: copy
stencil: none stencil: none
bin: none bin: none
Per MPI rank memory allocation (min/avg/max) = 7.652 | 7.834 | 8.016 Mbytes Per MPI rank memory allocation (min/avg/max) = 7.653 | 7.835 | 8.018 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 0 -1.4720158 0.009525411 -1.4624904 3.1370518e-06 0 0 -1.4720158 0.009525411 -1.4624904 3.1370518e-06
1000 ekin = 0.00366431201929595 | erot = 0.00193726360268106 | epot = -14.630505317301 | etot = -14.624903741679 1000 ekin = 0.00366431201929595 | erot = 0.00193726360268106 | epot = -14.630505317301 | etot = -14.624903741679
@ -1139,21 +1139,21 @@ Step Temp E_pair E_mol TotEng Press
999000 ekin = 0.330110494517446 | erot = 0.658973630822486 | epot = -15.613987867725 | etot = -14.6249037423851 999000 ekin = 0.330110494517446 | erot = 0.658973630822486 | epot = -15.613987867725 | etot = -14.6249037423851
1000000 ekin = 0.345190458651126 | erot = 0.66113833946702 | epot = -15.6312325406162 | etot = -14.624903742498 1000000 ekin = 0.345190458651126 | erot = 0.66113833946702 | epot = -15.6312325406162 | etot = -14.624903742498
1000000 0.025569664 -1.5839232 0.020799898 -1.5286042 -3.5789082e-06 1000000 0.025569664 -1.5839232 0.020799898 -1.5286042 -3.5789082e-06
Loop time of 30.1999 on 4 procs for 1000000 steps with 10 atoms Loop time of 20.0167 on 4 procs for 1000000 steps with 10 atoms
Performance: 28609.339 tau/day, 33112.661 timesteps/s Performance: 43164.007 tau/day, 49958.342 timesteps/s
96.4% CPU use with 4 MPI tasks x no OpenMP threads 99.5% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 0.90762 | 10.291 | 18.476 | 234.3 | 34.08 Pair | 0.59089 | 7.5652 | 13.908 | 205.5 | 37.79
Bond | 0.11783 | 0.39332 | 0.61914 | 34.0 | 1.30 Bond | 0.090803 | 0.29363 | 0.47758 | 29.6 | 1.47
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 2.8711 | 3.8042 | 4.7159 | 34.0 | 12.60 Comm | 1.7298 | 2.0312 | 2.2983 | 16.6 | 10.15
Output | 2e-05 | 3.15e-05 | 3.6e-05 | 0.0 | 0.00 Output | 1.4e-05 | 2.075e-05 | 2.3e-05 | 0.0 | 0.00
Modify | 0.27052 | 1.1583 | 1.9428 | 63.9 | 3.84 Modify | 0.17638 | 0.90613 | 1.5893 | 60.1 | 4.53
Other | | 14.55 | | | 48.19 Other | | 9.22 | | | 46.06
Nlocal: 2.5 ave 5 max 0 min Nlocal: 2.5 ave 5 max 0 min
Histogram: 1 0 1 0 0 0 0 0 1 1 Histogram: 1 0 1 0 0 0 0 0 1 1
@ -1169,4 +1169,4 @@ Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
#write_restart config.${number}.* #write_restart config.${number}.*
Total wall time: 0:00:30 Total wall time: 0:00:20

View File

@ -28,6 +28,7 @@
#include "citeme.h" #include "citeme.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -460,20 +461,20 @@ void PairGayBerne::read_restart(FILE *fp)
int i,j; int i,j;
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) { for (i = 1; i <= atom->ntypes; i++) {
if (me == 0) fread(&setwell[i],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setwell[i],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setwell[i],1,MPI_INT,0,world); MPI_Bcast(&setwell[i],1,MPI_INT,0,world);
if (setwell[i]) { if (setwell[i]) {
if (me == 0) fread(&well[i][0],sizeof(double),3,fp); if (me == 0) utils::sfread(FLERR,&well[i][0],sizeof(double),3,fp,NULL,error);
MPI_Bcast(&well[i][0],3,MPI_DOUBLE,0,world); MPI_Bcast(&well[i][0],3,MPI_DOUBLE,0,world);
} }
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -505,12 +506,12 @@ void PairGayBerne::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&gamma,sizeof(double),1,fp); utils::sfread(FLERR,&gamma,sizeof(double),1,fp,NULL,error);
fread(&upsilon,sizeof(double),1,fp); utils::sfread(FLERR,&upsilon,sizeof(double),1,fp,NULL,error);
fread(&mu,sizeof(double),1,fp); utils::sfread(FLERR,&mu,sizeof(double),1,fp,NULL,error);
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&gamma,1,MPI_DOUBLE,0,world); MPI_Bcast(&gamma,1,MPI_DOUBLE,0,world);
MPI_Bcast(&upsilon,1,MPI_DOUBLE,0,world); MPI_Bcast(&upsilon,1,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -438,20 +439,20 @@ void PairRESquared::read_restart(FILE *fp)
int i,j; int i,j;
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) { for (i = 1; i <= atom->ntypes; i++) {
if (me == 0) fread(&setwell[i],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setwell[i],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setwell[i],1,MPI_INT,0,world); MPI_Bcast(&setwell[i],1,MPI_INT,0,world);
if (setwell[i]) { if (setwell[i]) {
if (me == 0) fread(&well[i][0],sizeof(double),3,fp); if (me == 0) utils::sfread(FLERR,&well[i][0],sizeof(double),3,fp,NULL,error);
MPI_Bcast(&well[i][0],3,MPI_DOUBLE,0,world); MPI_Bcast(&well[i][0],3,MPI_DOUBLE,0,world);
} }
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -479,8 +480,8 @@ void PairRESquared::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&mix_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -372,19 +373,19 @@ void AngleClass2::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&theta0[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&theta0[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&k2[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k2[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&k3[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k3[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&k4[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k4[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&bb_k[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&bb_k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&bb_r1[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&bb_r1[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&bb_r2[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&bb_r2[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&ba_k1[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&ba_k1[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&ba_k2[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&ba_k2[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&ba_r1[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&ba_r1[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&ba_r2[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&ba_r2[1],sizeof(double),atom->nangletypes,fp,NULL,error);
} }
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);

View File

@ -24,6 +24,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -182,10 +183,10 @@ void BondClass2::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&k2[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k2[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&k3[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k3[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&k4[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k4[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&k2[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k2[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -835,45 +836,45 @@ void DihedralClass2::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&k2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&k3[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k3[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&phi1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&phi1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&phi2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&phi2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&phi3[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&phi3[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&mbt_f1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&mbt_f1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&mbt_f2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&mbt_f2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&mbt_f3[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&mbt_f3[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&mbt_r0[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&mbt_r0[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f1_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f1_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f2_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f2_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f3_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f3_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_r0_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_r0_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f1_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f1_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f2_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f2_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_f3_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_f3_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&ebt_r0_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&ebt_r0_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f1_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f1_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f2_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f2_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f3_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f3_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f1_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f1_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f2_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f2_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_f3_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_f3_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&at_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&at_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&aat_k[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&aat_k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&bb13t_k[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&bb13t_k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&bb13t_r10[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&bb13t_r10[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&bb13t_r30[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&bb13t_r30[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
} }
MPI_Bcast(&k1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -604,15 +605,15 @@ void ImproperClass2::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k0[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&k0[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&chi0[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&chi0[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_k1[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_k1[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_k2[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_k2[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_k3[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_k3[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_theta0_1[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_theta0_1[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_theta0_2[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_theta0_2[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&aa_theta0_3[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&aa_theta0_3[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
} }
MPI_Bcast(&k0[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&k0[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
MPI_Bcast(&chi0[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&chi0[1],atom->nimpropertypes,MPI_DOUBLE,0,world);

View File

@ -24,6 +24,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -610,13 +611,13 @@ void PairLJClass2::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -645,10 +646,10 @@ void PairLJClass2::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world);

View File

@ -23,6 +23,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -362,14 +363,14 @@ void PairLJClass2CoulCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_coul[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -399,11 +400,11 @@ void PairLJClass2CoulCut::write_restart_settings(FILE *fp)
void PairLJClass2CoulCut::read_restart_settings(FILE *fp) void PairLJClass2CoulCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -805,13 +806,13 @@ void PairLJClass2CoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -842,13 +843,13 @@ void PairLJClass2CoulLong::write_restart_settings(FILE *fp)
void PairLJClass2CoulLong::read_restart_settings(FILE *fp) void PairLJClass2CoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -36,6 +36,7 @@
#include "math_special.h" #include "math_special.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -602,12 +603,12 @@ void PairBrownian::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&cut_inner[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
@ -642,17 +643,17 @@ void PairBrownian::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&mu,sizeof(double),1,fp); utils::sfread(FLERR,&mu,sizeof(double),1,fp,NULL,error);
fread(&flaglog,sizeof(int),1,fp); utils::sfread(FLERR,&flaglog,sizeof(int),1,fp,NULL,error);
fread(&flagfld,sizeof(int),1,fp); utils::sfread(FLERR,&flagfld,sizeof(int),1,fp,NULL,error);
fread(&cut_inner_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner_global,sizeof(double),1,fp,NULL,error);
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&t_target, sizeof(double),1,fp); utils::sfread(FLERR,&t_target, sizeof(double),1,fp,NULL,error);
fread(&seed, sizeof(int),1,fp); utils::sfread(FLERR,&seed, sizeof(int),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&flagHI,sizeof(int),1,fp); utils::sfread(FLERR,&flagHI,sizeof(int),1,fp,NULL,error);
fread(&flagVF,sizeof(int),1,fp); utils::sfread(FLERR,&flagVF,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&mu,1,MPI_DOUBLE,0,world); MPI_Bcast(&mu,1,MPI_DOUBLE,0,world);
MPI_Bcast(&flaglog,1,MPI_INT,0,world); MPI_Bcast(&flaglog,1,MPI_INT,0,world);

View File

@ -25,6 +25,7 @@
#include "math_special.h" #include "math_special.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathSpecial; using namespace MathSpecial;
@ -394,15 +395,15 @@ void PairColloid::read_restart(FILE *fp)
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (comm->me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (comm->me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (comm->me == 0) { if (comm->me == 0) {
fread(&a12[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&a12[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&d1[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&d1[i][j],sizeof(double),1,fp,NULL,error);
fread(&d2[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&d2[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&a12[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&a12[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -432,9 +433,9 @@ void PairColloid::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world);

View File

@ -35,6 +35,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -682,12 +683,12 @@ void PairLubricate::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&cut_inner[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
@ -720,15 +721,15 @@ void PairLubricate::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&mu,sizeof(double),1,fp); utils::sfread(FLERR,&mu,sizeof(double),1,fp,NULL,error);
fread(&flaglog,sizeof(int),1,fp); utils::sfread(FLERR,&flaglog,sizeof(int),1,fp,NULL,error);
fread(&flagfld,sizeof(int),1,fp); utils::sfread(FLERR,&flagfld,sizeof(int),1,fp,NULL,error);
fread(&cut_inner_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner_global,sizeof(double),1,fp,NULL,error);
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&flagHI,sizeof(int),1,fp); utils::sfread(FLERR,&flagHI,sizeof(int),1,fp,NULL,error);
fread(&flagVF,sizeof(int),1,fp); utils::sfread(FLERR,&flagVF,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&mu,1,MPI_DOUBLE,0,world); MPI_Bcast(&mu,1,MPI_DOUBLE,0,world);
MPI_Bcast(&flaglog,1,MPI_INT,0,world); MPI_Bcast(&flaglog,1,MPI_INT,0,world);

View File

@ -34,6 +34,7 @@
#include "variable.h" #include "variable.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -1908,12 +1909,12 @@ void PairLubricateU::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&cut_inner[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_inner[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
@ -1945,14 +1946,14 @@ void PairLubricateU::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&mu,sizeof(double),1,fp); utils::sfread(FLERR,&mu,sizeof(double),1,fp,NULL,error);
fread(&flaglog,sizeof(int),1,fp); utils::sfread(FLERR,&flaglog,sizeof(int),1,fp,NULL,error);
fread(&cut_inner_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_inner_global,sizeof(double),1,fp,NULL,error);
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&flagHI,sizeof(int),1,fp); utils::sfread(FLERR,&flagHI,sizeof(int),1,fp,NULL,error);
fread(&flagVF,sizeof(int),1,fp); utils::sfread(FLERR,&flagVF,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&mu,1,MPI_DOUBLE,0,world); MPI_Bcast(&mu,1,MPI_DOUBLE,0,world);
MPI_Bcast(&flaglog,1,MPI_INT,0,world); MPI_Bcast(&flaglog,1,MPI_INT,0,world);

View File

@ -23,6 +23,7 @@
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "update.h" #include "update.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -437,14 +438,14 @@ void PairLJCutDipoleCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_coul[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -473,10 +474,10 @@ void PairLJCutDipoleCut::write_restart_settings(FILE *fp)
void PairLJCutDipoleCut::read_restart_settings(FILE *fp) void PairLJCutDipoleCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world);

View File

@ -25,7 +25,7 @@
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "update.h" #include "update.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -490,13 +490,13 @@ void PairLJCutDipoleLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -524,10 +524,10 @@ void PairLJCutDipoleLong::write_restart_settings(FILE *fp)
void PairLJCutDipoleLong::read_restart_settings(FILE *fp) void PairLJCutDipoleLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -30,6 +30,7 @@
#include "update.h" #include "update.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -344,13 +345,13 @@ void PairLJLongDipoleLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_read[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world);
@ -379,11 +380,11 @@ void PairLJLongDipoleLong::write_restart_settings(FILE *fp)
void PairLJLongDipoleLong::read_restart_settings(FILE *fp) void PairLJLongDipoleLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ewald_order,sizeof(int),1,fp); utils::sfread(FLERR,&ewald_order,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "neigh_request.h" #include "neigh_request.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -540,7 +541,7 @@ void PairGranHookeHistory::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
} }
} }
@ -566,12 +567,12 @@ void PairGranHookeHistory::write_restart_settings(FILE *fp)
void PairGranHookeHistory::read_restart_settings(FILE *fp) void PairGranHookeHistory::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&kn,sizeof(double),1,fp); utils::sfread(FLERR,&kn,sizeof(double),1,fp,NULL,error);
fread(&kt,sizeof(double),1,fp); utils::sfread(FLERR,&kt,sizeof(double),1,fp,NULL,error);
fread(&gamman,sizeof(double),1,fp); utils::sfread(FLERR,&gamman,sizeof(double),1,fp,NULL,error);
fread(&gammat,sizeof(double),1,fp); utils::sfread(FLERR,&gammat,sizeof(double),1,fp,NULL,error);
fread(&xmu,sizeof(double),1,fp); utils::sfread(FLERR,&xmu,sizeof(double),1,fp,NULL,error);
fread(&dampflag,sizeof(int),1,fp); utils::sfread(FLERR,&dampflag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&kn,1,MPI_DOUBLE,0,world); MPI_Bcast(&kn,1,MPI_DOUBLE,0,world);
MPI_Bcast(&kt,1,MPI_DOUBLE,0,world); MPI_Bcast(&kt,1,MPI_DOUBLE,0,world);

View File

@ -34,6 +34,7 @@ See the README file in the top-level LAMMPS directory.
#include "error.h" #include "error.h"
#include "math_const.h" #include "math_const.h"
#include "math_special.h" #include "math_special.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -1251,20 +1252,20 @@ void PairGranular::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) { for (i = 1; i <= atom->ntypes; i++) {
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&normal_model[i][j],sizeof(int),1,fp); utils::sfread(FLERR,&normal_model[i][j],sizeof(int),1,fp,NULL,error);
fread(&damping_model[i][j],sizeof(int),1,fp); utils::sfread(FLERR,&damping_model[i][j],sizeof(int),1,fp,NULL,error);
fread(&tangential_model[i][j],sizeof(int),1,fp); utils::sfread(FLERR,&tangential_model[i][j],sizeof(int),1,fp,NULL,error);
fread(&roll_model[i][j],sizeof(int),1,fp); utils::sfread(FLERR,&roll_model[i][j],sizeof(int),1,fp,NULL,error);
fread(&twist_model[i][j],sizeof(int),1,fp); utils::sfread(FLERR,&twist_model[i][j],sizeof(int),1,fp,NULL,error);
fread(normal_coeffs[i][j],sizeof(double),4,fp); utils::sfread(FLERR,normal_coeffs[i][j],sizeof(double),4,fp,NULL,error);
fread(tangential_coeffs[i][j],sizeof(double),3,fp); utils::sfread(FLERR,tangential_coeffs[i][j],sizeof(double),3,fp,NULL,error);
fread(roll_coeffs[i][j],sizeof(double),3,fp); utils::sfread(FLERR,roll_coeffs[i][j],sizeof(double),3,fp,NULL,error);
fread(twist_coeffs[i][j],sizeof(double),3,fp); utils::sfread(FLERR,twist_coeffs[i][j],sizeof(double),3,fp,NULL,error);
fread(&cutoff_type[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cutoff_type[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&normal_model[i][j],1,MPI_INT,0,world); MPI_Bcast(&normal_model[i][j],1,MPI_INT,0,world);
MPI_Bcast(&damping_model[i][j],1,MPI_INT,0,world); MPI_Bcast(&damping_model[i][j],1,MPI_INT,0,world);

View File

@ -29,6 +29,7 @@
#include "neighbor.h" #include "neighbor.h"
#include "modify.h" #include "modify.h"
#include "compute.h" #include "compute.h"
#define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;} #define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;}
#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
#define GOLD 1.618034 #define GOLD 1.618034

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -421,16 +422,16 @@ void PairBornCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&a[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&a[i][j],sizeof(double),1,fp,NULL,error);
fread(&rho[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&rho[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&c[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&c[i][j],sizeof(double),1,fp,NULL,error);
fread(&d[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&d[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&rho[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&rho[i][j],1,MPI_DOUBLE,0,world);
@ -464,13 +465,13 @@ void PairBornCoulLong::write_restart_settings(FILE *fp)
void PairBornCoulLong::read_restart_settings(FILE *fp) void PairBornCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -24,6 +24,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -399,14 +400,14 @@ void PairBuckCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&a[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&a[i][j],sizeof(double),1,fp,NULL,error);
fread(&rho[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&rho[i][j],sizeof(double),1,fp,NULL,error);
fread(&c[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&c[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&rho[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&rho[i][j],1,MPI_DOUBLE,0,world);
@ -438,13 +439,13 @@ void PairBuckCoulLong::write_restart_settings(FILE *fp)
void PairBuckCoulLong::read_restart_settings(FILE *fp) void PairBuckCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "respa.h" #include "respa.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -355,14 +356,14 @@ void PairBuckLongCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&buck_a_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&buck_a_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&buck_rho_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&buck_rho_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&buck_c_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&buck_c_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_buck_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_buck_read[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&buck_a_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&buck_a_read[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&buck_rho_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&buck_rho_read[i][j],1,MPI_DOUBLE,0,world);
@ -394,13 +395,13 @@ void PairBuckLongCoulLong::write_restart_settings(FILE *fp)
void PairBuckLongCoulLong::read_restart_settings(FILE *fp) void PairBuckLongCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_buck_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_buck_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
fread(&ewald_order,sizeof(int),1,fp); utils::sfread(FLERR,&ewald_order,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_buck_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_buck_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -289,10 +290,10 @@ void PairCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) fread(&scale[i][j],sizeof(double),1,fp); if (me == 0) utils::sfread(FLERR,&scale[i][j],sizeof(double),1,fp,NULL,error);
MPI_Bcast(&scale[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&scale[i][j],1,MPI_DOUBLE,0,world);
} }
} }
@ -318,11 +319,11 @@ void PairCoulLong::write_restart_settings(FILE *fp)
void PairCoulLong::read_restart_settings(FILE *fp) void PairCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);
MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world);

View File

@ -29,6 +29,7 @@
#include "neigh_request.h" #include "neigh_request.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -822,14 +823,14 @@ void PairLJCharmmCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&eps14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&eps14[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma14[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -861,13 +862,13 @@ void PairLJCharmmCoulLong::write_restart_settings(FILE *fp)
void PairLJCharmmCoulLong::read_restart_settings(FILE *fp) void PairLJCharmmCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_inner,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_inner,sizeof(double),1,fp,NULL,error);
fread(&cut_lj,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world);

View File

@ -33,6 +33,7 @@
#include "neigh_request.h" #include "neigh_request.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -889,14 +890,14 @@ void PairLJCharmmfswCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&eps14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&eps14[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma14[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -928,13 +929,13 @@ void PairLJCharmmfswCoulLong::write_restart_settings(FILE *fp)
void PairLJCharmmfswCoulLong::read_restart_settings(FILE *fp) void PairLJCharmmfswCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_inner,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_inner,sizeof(double),1,fp,NULL,error);
fread(&cut_lj,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -793,13 +794,13 @@ void PairLJCutCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -830,13 +831,13 @@ void PairLJCutCoulLong::write_restart_settings(FILE *fp)
void PairLJCutCoulLong::read_restart_settings(FILE *fp) void PairLJCutCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -30,6 +30,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -528,19 +529,19 @@ void PairLJCutTIP4PLong::write_restart_settings(FILE *fp)
void PairLJCutTIP4PLong::read_restart_settings(FILE *fp) void PairLJCutTIP4PLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&typeO,sizeof(int),1,fp); utils::sfread(FLERR,&typeO,sizeof(int),1,fp,NULL,error);
fread(&typeH,sizeof(int),1,fp); utils::sfread(FLERR,&typeH,sizeof(int),1,fp,NULL,error);
fread(&typeB,sizeof(int),1,fp); utils::sfread(FLERR,&typeB,sizeof(int),1,fp,NULL,error);
fread(&typeA,sizeof(int),1,fp); utils::sfread(FLERR,&typeA,sizeof(int),1,fp,NULL,error);
fread(&qdist,sizeof(double),1,fp); utils::sfread(FLERR,&qdist,sizeof(double),1,fp,NULL,error);
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&typeO,1,MPI_INT,0,world); MPI_Bcast(&typeO,1,MPI_INT,0,world);

View File

@ -33,6 +33,7 @@
#include "respa.h" #include "respa.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -355,13 +356,13 @@ void PairLJLongCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma_read[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj_read[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_read[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon_read[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma_read[i][j],1,MPI_DOUBLE,0,world);
@ -392,13 +393,13 @@ void PairLJLongCoulLong::write_restart_settings(FILE *fp)
void PairLJLongCoulLong::read_restart_settings(FILE *fp) void PairLJLongCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
fread(&ewald_order,sizeof(int),1,fp); utils::sfread(FLERR,&ewald_order,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -30,6 +30,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -1539,18 +1540,18 @@ void PairLJLongTIP4PLong::write_restart_settings(FILE *fp)
void PairLJLongTIP4PLong::read_restart_settings(FILE *fp) void PairLJLongTIP4PLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&typeO,sizeof(int),1,fp); utils::sfread(FLERR,&typeO,sizeof(int),1,fp,NULL,error);
fread(&typeH,sizeof(int),1,fp); utils::sfread(FLERR,&typeH,sizeof(int),1,fp,NULL,error);
fread(&typeB,sizeof(int),1,fp); utils::sfread(FLERR,&typeB,sizeof(int),1,fp,NULL,error);
fread(&typeA,sizeof(int),1,fp); utils::sfread(FLERR,&typeA,sizeof(int),1,fp,NULL,error);
fread(&qdist,sizeof(double),1,fp); utils::sfread(FLERR,&qdist,sizeof(double),1,fp,NULL,error);
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&typeO,1,MPI_INT,0,world); MPI_Bcast(&typeO,1,MPI_INT,0,world);

View File

@ -30,6 +30,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -467,11 +468,11 @@ void PairTIP4PLong::read_restart_settings(FILE *fp)
PairCoulLong::read_restart_settings(fp); PairCoulLong::read_restart_settings(fp);
if (comm->me == 0) { if (comm->me == 0) {
fread(&typeO,sizeof(int),1,fp); utils::sfread(FLERR,&typeO,sizeof(int),1,fp,NULL,error);
fread(&typeH,sizeof(int),1,fp); utils::sfread(FLERR,&typeH,sizeof(int),1,fp,NULL,error);
fread(&typeB,sizeof(int),1,fp); utils::sfread(FLERR,&typeB,sizeof(int),1,fp,NULL,error);
fread(&typeA,sizeof(int),1,fp); utils::sfread(FLERR,&typeA,sizeof(int),1,fp,NULL,error);
fread(&qdist,sizeof(double),1,fp); utils::sfread(FLERR,&qdist,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&typeO,1,MPI_INT,0,world); MPI_Bcast(&typeO,1,MPI_INT,0,world);

View File

@ -6,7 +6,7 @@ SHELL = /bin/sh
# compiler/linker settings # compiler/linker settings
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
CC = mpiicpc CC = mpiicpc -std=c++11
MIC_OPT = -qoffload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\"" MIC_OPT = -qoffload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\""
CCFLAGS = -g -O3 -qopenmp -DLMP_INTEL_OFFLOAD -DLAMMPS_MEMALIGN=64 \ CCFLAGS = -g -O3 -qopenmp -DLMP_INTEL_OFFLOAD -DLAMMPS_MEMALIGN=64 \
-xHost -fno-alias -ansi-alias -restrict -DLMP_INTEL_USELRT \ -xHost -fno-alias -ansi-alias -restrict -DLMP_INTEL_USELRT \
@ -14,7 +14,7 @@ CCFLAGS = -g -O3 -qopenmp -DLMP_INTEL_OFFLOAD -DLAMMPS_MEMALIGN=64 \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpiicpc LINK = mpiicpc -std=c++11
LINKFLAGS = -g -O3 -xHost -qopenmp -qoffload LINKFLAGS = -g -O3 -xHost -qopenmp -qoffload
LIB = -ltbbmalloc LIB = -ltbbmalloc
SIZE = size SIZE = size

View File

@ -6,7 +6,7 @@ SHELL = /bin/sh
# compiler/linker settings # compiler/linker settings
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
CC = mpiicpc CC = mpiicpc -std=c++11
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \ OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
-qopt-zmm-usage=high -qopt-zmm-usage=high
CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
@ -15,7 +15,7 @@ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpiicpc LINK = mpiicpc -std=c++11
LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size SIZE = size

View File

@ -6,7 +6,7 @@ SHELL = /bin/sh
# compiler/linker settings # compiler/linker settings
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
CC = mpiicpc CC = mpiicpc -std=c++11
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \ OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
-qopt-zmm-usage=high -qopt-zmm-usage=high
CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
@ -15,7 +15,7 @@ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpiicpc LINK = mpiicpc -std=c++11
LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size SIZE = size

View File

@ -6,7 +6,7 @@ SHELL = /bin/sh
# compiler/linker settings # compiler/linker settings
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
CC = mpicxx -cxx=icc CC = mpicxx -cxx=icc -std=c++11
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \ OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
-qopt-zmm-usage=high -qopt-zmm-usage=high
CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
@ -15,7 +15,7 @@ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpicxx -cxx=icc LINK = mpicxx -cxx=icc -std=c++11
LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size SIZE = size

View File

@ -7,7 +7,7 @@ SHELL = /bin/sh
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
export OMPI_CXX = icc export OMPI_CXX = icc
CC = mpicxx CC = mpicxx -std=c++11
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \ OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
-qopt-zmm-usage=high -qopt-zmm-usage=high
CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
@ -16,7 +16,7 @@ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpicxx LINK = mpicxx -std=c++11
LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size SIZE = size

View File

@ -6,7 +6,7 @@ SHELL = /bin/sh
# compiler/linker settings # compiler/linker settings
# specify flags and libraries needed for your compiler # specify flags and libraries needed for your compiler
CC = mpiicpc CC = mpiicpc -std=c++11
OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
-DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS) \ -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS) \
@ -14,7 +14,7 @@ CCFLAGS = -qopenmp -qno-offload -ansi-alias -restrict \
SHFLAGS = -fPIC SHFLAGS = -fPIC
DEPFLAGS = -M DEPFLAGS = -M
LINK = mpiicpc LINK = mpiicpc -std=c++11
LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/ LINKFLAGS = -qopenmp $(OPTFLAGS) -L$(MKLROOT)/lib/intel64/
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size SIZE = size

View File

@ -27,6 +27,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "neigh_request.h" #include "neigh_request.h"
#include "neighbor.h" #include "neighbor.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -310,10 +311,10 @@ void PairATM::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) { for (i = 1; i <= atom->ntypes; i++) {
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) for (k = j; k <= atom->ntypes; k++) { if (setflag[i][j]) for (k = j; k <= atom->ntypes; k++) {
if (me == 0) fread(&nu[i][j][k],sizeof(double),1,fp); if (me == 0) utils::sfread(FLERR,&nu[i][j][k],sizeof(double),1,fp,NULL,error);
MPI_Bcast(&nu[i][j][k],1,MPI_DOUBLE,0,world); MPI_Bcast(&nu[i][j][k],1,MPI_DOUBLE,0,world);
} }
} }
@ -338,8 +339,8 @@ void PairATM::read_restart_settings(FILE *fp)
{ {
int me = comm->me; int me = comm->me;
if (me == 0) { if (me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&cut_triple,sizeof(double),1,fp); utils::sfread(FLERR,&cut_triple,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_triple,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_triple,1,MPI_DOUBLE,0,world);

View File

@ -27,6 +27,7 @@
#include "domain.h" #include "domain.h"
#include "update.h" #include "update.h"
#include "random_mars.h" #include "random_mars.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -345,12 +346,12 @@ void PairDSMC::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
@ -378,11 +379,11 @@ void PairDSMC::write_restart_settings(FILE *fp)
void PairDSMC::read_restart_settings(FILE *fp) void PairDSMC::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&max_cell_size,sizeof(double),1,fp); utils::sfread(FLERR,&max_cell_size,sizeof(double),1,fp,NULL,error);
fread(&seed,sizeof(int),1,fp); utils::sfread(FLERR,&seed,sizeof(int),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);

View File

@ -26,6 +26,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -318,15 +319,15 @@ void PairNMCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
fread(&r0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
fread(&nn[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
fread(&mm[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -356,10 +357,10 @@ void PairNMCut::write_restart_settings(FILE *fp)
void PairNMCut::read_restart_settings(FILE *fp) void PairNMCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -369,16 +370,16 @@ void PairNMCutCoulCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
fread(&r0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
fread(&nn[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
fread(&mm[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_coul[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -410,11 +411,11 @@ void PairNMCutCoulCut::write_restart_settings(FILE *fp)
void PairNMCutCoulCut::read_restart_settings(FILE *fp) void PairNMCutCoulCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul_global,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world);

View File

@ -28,6 +28,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -413,15 +414,15 @@ void PairNMCutCoulLong::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
fread(&r0[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
fread(&nn[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
fread(&mm[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -454,13 +455,13 @@ void PairNMCutCoulLong::write_restart_settings(FILE *fp)
void PairNMCutCoulLong::read_restart_settings(FILE *fp) void PairNMCutCoulLong::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
fread(&ncoultablebits,sizeof(int),1,fp); utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
fread(&tabinner,sizeof(double),1,fp); utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);

View File

@ -26,6 +26,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -245,10 +246,10 @@ void AngleCharmm::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&theta0[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&theta0[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&k_ub[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k_ub[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&r_ub[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&r_ub[1],sizeof(double),atom->nangletypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);

View File

@ -22,6 +22,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -193,7 +194,7 @@ void AngleCosine::read_restart(FILE *fp)
{ {
allocate(); allocate();
if (comm->me == 0) fread(&k[1],sizeof(double),atom->nangletypes,fp); if (comm->me == 0) utils::sfread(FLERR,&k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);
for (int i = 1; i <= atom->nangletypes; i++) setflag[i] = 1; for (int i = 1; i <= atom->nangletypes; i++) setflag[i] = 1;

View File

@ -27,6 +27,7 @@
#include "math_special.h" #include "math_special.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -246,9 +247,9 @@ void AngleCosinePeriodic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&b[1],sizeof(int),atom->nangletypes,fp); utils::sfread(FLERR,&b[1],sizeof(int),atom->nangletypes,fp,NULL,error);
fread(&multiplicity[1],sizeof(int),atom->nangletypes,fp); utils::sfread(FLERR,&multiplicity[1],sizeof(int),atom->nangletypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);

View File

@ -26,6 +26,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -215,8 +216,8 @@ void AngleCosineSquared::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&theta0[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&theta0[1],sizeof(double),atom->nangletypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);

View File

@ -22,6 +22,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -215,8 +216,8 @@ void AngleHarmonic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nangletypes,fp,NULL,error);
fread(&theta0[1],sizeof(double),atom->nangletypes,fp); utils::sfread(FLERR,&theta0[1],sizeof(double),atom->nangletypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world); MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);

View File

@ -29,6 +29,7 @@
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h" #include "utils.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -309,8 +310,8 @@ void AngleTable::write_restart_settings(FILE *fp)
void AngleTable::read_restart_settings(FILE *fp) void AngleTable::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&tabstyle,sizeof(int),1,fp); utils::sfread(FLERR,&tabstyle,sizeof(int),1,fp,NULL,error);
fread(&tablength,sizeof(int),1,fp); utils::sfread(FLERR,&tablength,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&tabstyle,1,MPI_INT,0,world); MPI_Bcast(&tabstyle,1,MPI_INT,0,world);
MPI_Bcast(&tablength,1,MPI_INT,0,world); MPI_Bcast(&tablength,1,MPI_INT,0,world);

View File

@ -21,6 +21,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -215,10 +216,10 @@ void BondFENE::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&epsilon[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&epsilon[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&sigma[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&sigma[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -21,6 +21,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -224,11 +225,11 @@ void BondFENEExpand::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&epsilon[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&epsilon[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&sigma[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&sigma[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&shift[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&shift[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -24,6 +24,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -166,8 +167,8 @@ void BondGromos::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -21,6 +21,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -167,8 +168,8 @@ void BondHarmonic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -24,6 +24,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -171,9 +172,9 @@ void BondMorse::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&d0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&d0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&alpha[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&alpha[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&d0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&d0[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&alpha[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&alpha[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -20,6 +20,7 @@
#include "force.h" #include "force.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -166,9 +167,9 @@ void BondNonlinear::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&epsilon[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&epsilon[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&r0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&r0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&lamda[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&lamda[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&epsilon[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&r0[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -25,6 +25,7 @@
#include "pair.h" #include "pair.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -275,11 +276,11 @@ void BondQuartic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&b1[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&b1[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&b2[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&b2[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&rc[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&rc[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
fread(&u0[1],sizeof(double),atom->nbondtypes,fp); utils::sfread(FLERR,&u0[1],sizeof(double),atom->nbondtypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world);
MPI_Bcast(&b1[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&b1[1],atom->nbondtypes,MPI_DOUBLE,0,world);

View File

@ -252,8 +252,8 @@ void BondTable::write_restart_settings(FILE *fp)
void BondTable::read_restart_settings(FILE *fp) void BondTable::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&tabstyle,sizeof(int),1,fp); utils::sfread(FLERR,&tabstyle,sizeof(int),1,fp,NULL,error);
fread(&tablength,sizeof(int),1,fp); utils::sfread(FLERR,&tablength,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&tabstyle,1,MPI_INT,0,world); MPI_Bcast(&tabstyle,1,MPI_INT,0,world);
MPI_Bcast(&tablength,1,MPI_INT,0,world); MPI_Bcast(&tablength,1,MPI_INT,0,world);

View File

@ -29,6 +29,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -423,11 +424,11 @@ void DihedralCharmm::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
fread(&shift[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&shift[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
fread(&weight[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&weight[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&weightflag,sizeof(int),1,fp); utils::sfread(FLERR,&weightflag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&multiplicity[1],atom->ndihedraltypes,MPI_INT,0,world); MPI_Bcast(&multiplicity[1],atom->ndihedraltypes,MPI_INT,0,world);

View File

@ -32,6 +32,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -466,11 +467,11 @@ void DihedralCharmmfsw::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
fread(&shift[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&shift[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
fread(&weight[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&weight[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&weightflag,sizeof(int),1,fp); utils::sfread(FLERR,&weightflag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&multiplicity[1],atom->ndihedraltypes,MPI_INT,0,world); MPI_Bcast(&multiplicity[1],atom->ndihedraltypes,MPI_INT,0,world);

View File

@ -25,6 +25,7 @@
#include "update.h" #include "update.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -327,9 +328,9 @@ void DihedralHarmonic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&sign[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&sign[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
fread(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp); utils::sfread(FLERR,&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&sign[1],atom->ndihedraltypes,MPI_INT,0,world); MPI_Bcast(&sign[1],atom->ndihedraltypes,MPI_INT,0,world);

View File

@ -27,6 +27,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -322,9 +323,9 @@ void DihedralHelix::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&aphi[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&aphi[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&bphi[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&bphi[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&cphi[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&cphi[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
} }
MPI_Bcast(&aphi[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&aphi[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&bphi[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&bphi[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);

View File

@ -25,6 +25,7 @@
#include "update.h" #include "update.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -318,11 +319,11 @@ void DihedralMultiHarmonic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&a1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&a1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&a2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&a2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&a3[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&a3[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&a4[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&a4[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&a5[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&a5[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
} }
MPI_Bcast(&a1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&a1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&a2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&a2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);

View File

@ -25,6 +25,7 @@
#include "update.h" #include "update.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -330,10 +331,10 @@ void DihedralOPLS::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k1[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k1[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&k2[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k2[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&k3[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k3[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
fread(&k4[1],sizeof(double),atom->ndihedraltypes,fp); utils::sfread(FLERR,&k4[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
} }
MPI_Bcast(&k1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&k2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); MPI_Bcast(&k2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);

View File

@ -21,6 +21,7 @@
#include "update.h" #include "update.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -333,9 +334,9 @@ void ImproperCvff::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&sign[1],sizeof(int),atom->nimpropertypes,fp); utils::sfread(FLERR,&sign[1],sizeof(int),atom->nimpropertypes,fp,NULL,error);
fread(&multiplicity[1],sizeof(int),atom->nimpropertypes,fp); utils::sfread(FLERR,&multiplicity[1],sizeof(int),atom->nimpropertypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
MPI_Bcast(&sign[1],atom->nimpropertypes,MPI_INT,0,world); MPI_Bcast(&sign[1],atom->nimpropertypes,MPI_INT,0,world);

View File

@ -22,6 +22,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -274,8 +275,8 @@ void ImproperHarmonic::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&k[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&chi[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&chi[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
} }
MPI_Bcast(&k[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&k[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
MPI_Bcast(&chi[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&chi[1],atom->nimpropertypes,MPI_DOUBLE,0,world);

View File

@ -26,6 +26,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -315,9 +316,9 @@ void ImproperUmbrella::read_restart(FILE *fp)
allocate(); allocate();
if (comm->me == 0) { if (comm->me == 0) {
fread(&kw[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&kw[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&w0[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&w0[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
fread(&C[1],sizeof(double),atom->nimpropertypes,fp); utils::sfread(FLERR,&C[1],sizeof(double),atom->nimpropertypes,fp,NULL,error);
} }
MPI_Bcast(&kw[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&kw[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
MPI_Bcast(&w0[1],atom->nimpropertypes,MPI_DOUBLE,0,world); MPI_Bcast(&w0[1],atom->nimpropertypes,MPI_DOUBLE,0,world);

View File

@ -26,6 +26,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -374,14 +375,14 @@ void PairLJCharmmCoulCharmm::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&eps14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&eps14[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma14[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -435,12 +436,12 @@ void PairLJCharmmCoulCharmm::write_restart_settings(FILE *fp)
void PairLJCharmmCoulCharmm::read_restart_settings(FILE *fp) void PairLJCharmmCoulCharmm::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_inner,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_inner,sizeof(double),1,fp,NULL,error);
fread(&cut_lj,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj,sizeof(double),1,fp,NULL,error);
fread(&cut_coul_inner,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul_inner,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -432,14 +433,14 @@ void PairLJCharmmfswCoulCharmmfsh::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&eps14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&eps14[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma14[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma14[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -469,11 +470,11 @@ void PairLJCharmmfswCoulCharmmfsh::write_restart_settings(FILE *fp)
void PairLJCharmmfswCoulCharmmfsh::read_restart_settings(FILE *fp) void PairLJCharmmfswCoulCharmmfsh::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&cut_lj_inner,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_inner,sizeof(double),1,fp,NULL,error);
fread(&cut_lj,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world);

View File

@ -30,6 +30,7 @@
#include "math_const.h" #include "math_const.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
@ -617,13 +618,13 @@ void PairLJCutTIP4PCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) { for (i = 1; i <= atom->ntypes; i++) {
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&epsilon[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&epsilon[i][j],sizeof(double),1,fp,NULL,error);
fread(&sigma[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&sigma[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut_lj[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
@ -659,17 +660,17 @@ void PairLJCutTIP4PCut::write_restart_settings(FILE *fp)
void PairLJCutTIP4PCut::read_restart_settings(FILE *fp) void PairLJCutTIP4PCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&typeO,sizeof(int),1,fp); utils::sfread(FLERR,&typeO,sizeof(int),1,fp,NULL,error);
fread(&typeH,sizeof(int),1,fp); utils::sfread(FLERR,&typeH,sizeof(int),1,fp,NULL,error);
fread(&typeB,sizeof(int),1,fp); utils::sfread(FLERR,&typeB,sizeof(int),1,fp,NULL,error);
fread(&typeA,sizeof(int),1,fp); utils::sfread(FLERR,&typeA,sizeof(int),1,fp,NULL,error);
fread(&qdist,sizeof(double),1,fp); utils::sfread(FLERR,&qdist,sizeof(double),1,fp,NULL,error);
fread(&cut_lj_global,sizeof(double),1,fp); utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
fread(&offset_flag,sizeof(int),1,fp); utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
fread(&mix_flag,sizeof(int),1,fp); utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
fread(&tail_flag,sizeof(int),1,fp); utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
} }
MPI_Bcast(&typeO,1,MPI_INT,0,world); MPI_Bcast(&typeO,1,MPI_INT,0,world);

View File

@ -28,6 +28,7 @@
#include "comm.h" #include "comm.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -474,7 +475,7 @@ void PairTIP4PCut::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
} }
} }
@ -501,13 +502,13 @@ void PairTIP4PCut::write_restart_settings(FILE *fp)
void PairTIP4PCut::read_restart_settings(FILE *fp) void PairTIP4PCut::read_restart_settings(FILE *fp)
{ {
if (comm->me == 0) { if (comm->me == 0) {
fread(&typeO,sizeof(int),1,fp); utils::sfread(FLERR,&typeO,sizeof(int),1,fp,NULL,error);
fread(&typeH,sizeof(int),1,fp); utils::sfread(FLERR,&typeH,sizeof(int),1,fp,NULL,error);
fread(&typeB,sizeof(int),1,fp); utils::sfread(FLERR,&typeB,sizeof(int),1,fp,NULL,error);
fread(&typeA,sizeof(int),1,fp); utils::sfread(FLERR,&typeA,sizeof(int),1,fp,NULL,error);
fread(&qdist,sizeof(double),1,fp); utils::sfread(FLERR,&qdist,sizeof(double),1,fp,NULL,error);
fread(&cut_coul,sizeof(double),1,fp); utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&typeO,1,MPI_INT,0,world); MPI_Bcast(&typeO,1,MPI_INT,0,world);

View File

@ -31,6 +31,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -564,16 +565,16 @@ void PairPeriEPS::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&bulkmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&bulkmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&shearmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&shearmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&s00[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&s00[i][j],sizeof(double),1,fp,NULL,error);
fread(&alpha[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&alpha[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
fread(&m_yieldstress[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&m_yieldstress[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
#include "math_const.h" #include "math_const.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -489,15 +490,15 @@ void PairPeriLPS::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&bulkmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&bulkmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&shearmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&shearmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&s00[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&s00[i][j],sizeof(double),1,fp,NULL,error);
fread(&alpha[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&alpha[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world);

View File

@ -32,6 +32,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -418,14 +419,14 @@ void PairPeriPMB::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&kspring[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&kspring[i][j],sizeof(double),1,fp,NULL,error);
fread(&s00[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&s00[i][j],sizeof(double),1,fp,NULL,error);
fread(&alpha[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&alpha[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&kspring[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&kspring[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&s00[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&s00[i][j],1,MPI_DOUBLE,0,world);

View File

@ -31,6 +31,7 @@
#include "neigh_list.h" #include "neigh_list.h"
#include "memory.h" #include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h"
#include "update.h" #include "update.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
@ -547,17 +548,17 @@ void PairPeriVES::read_restart(FILE *fp)
int me = comm->me; int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) { for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) { if (setflag[i][j]) {
if (me == 0) { if (me == 0) {
fread(&bulkmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&bulkmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&shearmodulus[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&shearmodulus[i][j],sizeof(double),1,fp,NULL,error);
fread(&s00[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&s00[i][j],sizeof(double),1,fp,NULL,error);
fread(&alpha[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&alpha[i][j],sizeof(double),1,fp,NULL,error);
fread(&cut[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
fread(&m_lambdai[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&m_lambdai[i][j],sizeof(double),1,fp,NULL,error);
fread(&m_taubi[i][j],sizeof(double),1,fp); utils::sfread(FLERR,&m_taubi[i][j],sizeof(double),1,fp,NULL,error);
} }
MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&bulkmodulus[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&shearmodulus[i][j],1,MPI_DOUBLE,0,world);

Some files were not shown because too many files have changed in this diff Show More