Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PuReMD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SParTA
PuReMD
Commits
0e7db3ba
Commit
0e7db3ba
authored
6 years ago
by
Kurt A. O'Hearn
Browse files
Options
Downloads
Patches
Plain Diff
sPuReMD: screen out non-periodic self-interactions when constructing far nbr list.
parent
de461af2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sPuReMD/src/box.c
+12
-12
12 additions, 12 deletions
sPuReMD/src/box.c
with
12 additions
and
12 deletions
sPuReMD/src/box.c
+
12
−
12
View file @
0e7db3ba
...
...
@@ -366,7 +366,7 @@ int Find_Non_Periodic_Far_Neighbors( rvec x1, rvec x2, int atom, int nbr_atom,
rvec_ScaledSum
(
dvec
,
1
.
0
,
x2
,
-
1
.
0
,
x1
);
norm_sqr
=
rvec_Norm_Sqr
(
dvec
);
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
)
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
&&
norm_sqr
>=
0
.
01
)
{
data
->
nbr
=
nbr_atom
;
ivec_MakeZero
(
data
->
rel_box
);
...
...
@@ -396,7 +396,7 @@ int Count_Non_Periodic_Far_Neighbors( rvec x1, rvec x2, int atom, int nbr_atom,
rvec_ScaledSum
(
d
,
1
.
0
,
x2
,
-
1
.
0
,
x1
);
norm_sqr
=
rvec_Norm_Sqr
(
d
);
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
)
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
&&
norm_sqr
>=
0
.
01
)
{
count
=
1
;
}
...
...
@@ -454,7 +454,7 @@ int Find_Periodic_Far_Neighbors_Big_Box( rvec x1, rvec x2, int atom, int nbr_ato
}
}
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
)
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
&&
norm_sqr
>=
0
.
01
)
{
data
->
nbr
=
nbr_atom
;
ivec_Copy
(
data
->
rel_box
,
rel_box
);
...
...
@@ -506,7 +506,7 @@ int Count_Periodic_Far_Neighbors_Big_Box( rvec x1, rvec x2, int atom, int nbr_at
}
}
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
)
if
(
norm_sqr
<=
SQR
(
vlist_cut
)
&&
norm_sqr
>=
0
.
01
)
{
count
=
1
;
}
...
...
@@ -532,10 +532,10 @@ int Find_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_a
{
int
i
,
j
,
k
,
count
;
int
imax
,
jmax
,
kmax
;
real
sqr_norm
,
d_i
,
d_j
,
d_k
,
sqr_
cutoff2
;
real
sqr_norm
,
d_i
,
d_j
,
d_k
,
sqr_
vlist_cut
;
count
=
0
;
sqr_
cutoff2
=
SQR
(
vlist_cut
);
sqr_
vlist_cut
=
SQR
(
vlist_cut
);
/* determine the max stretch of imaginary boxs in each direction
* to handle periodic boundary conditions correctly */
...
...
@@ -564,7 +564,7 @@ int Find_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_a
sqr_norm
=
SQR
(
d_i
)
+
SQR
(
d_j
)
+
SQR
(
d_k
);
if
(
sqr_norm
<=
sqr_
cutoff2
)
if
(
sqr_norm
<=
sqr_
vlist_cut
)
{
data
[
count
].
nbr
=
nbr_atom
;
...
...
@@ -638,7 +638,7 @@ int Find_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_a
sqr_norm
=
SQR
(
d_i
)
+
SQR
(
d_j
)
+
SQR
(
d_k
);
if
(
sqr_norm
<=
sqr_
cutoff2
&&
sqr_norm
>=
0
.
01
)
if
(
sqr_norm
<=
sqr_
vlist_cut
&&
sqr_norm
>=
0
.
01
)
{
data
[
count
].
nbr
=
nbr_atom
;
...
...
@@ -707,10 +707,10 @@ int Count_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_
{
int
i
,
j
,
k
,
count
;
int
imax
,
jmax
,
kmax
;
real
sqr_norm
,
d_i
,
d_j
,
d_k
,
sqr_
cutoff2
;
real
sqr_norm
,
d_i
,
d_j
,
d_k
,
sqr_
vlist_cut
;
count
=
0
;
sqr_
cutoff2
=
SQR
(
vlist_cut
);
sqr_
vlist_cut
=
SQR
(
vlist_cut
);
/* determine the max stretch of imaginary boxs in each direction
* to handle periodic boundary conditions correctly */
...
...
@@ -738,7 +738,7 @@ int Count_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_
sqr_norm
=
SQR
(
d_i
)
+
SQR
(
d_j
)
+
SQR
(
d_k
);
if
(
sqr_norm
<=
sqr_
cutoff2
)
if
(
sqr_norm
<=
sqr_
vlist_cut
)
{
++
count
;
}
...
...
@@ -763,7 +763,7 @@ int Count_Periodic_Far_Neighbors_Small_Box( rvec x1, rvec x2, int atom, int nbr_
sqr_norm
=
SQR
(
d_i
)
+
SQR
(
d_j
)
+
SQR
(
d_k
);
if
(
sqr_norm
<=
sqr_
cutoff2
&&
sqr_norm
>=
0
.
01
)
if
(
sqr_norm
<=
sqr_
vlist_cut
&&
sqr_norm
>=
0
.
01
)
{
++
count
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment