Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Martin Kurečka
Plumed AlphaFold
Commits
7257c96d
There was an error fetching the commit references. Please try again later.
Commit
7257c96d
authored
11 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Plain Diff
Merge branch 'fixing-nlist' into v2.0
parents
10108579
2bf30f5d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
regtest/multicolvar/rt20/plumed.dat
+5
-0
5 additions, 0 deletions
regtest/multicolvar/rt20/plumed.dat
src/tools/NeighborList.cpp
+5
-3
5 additions, 3 deletions
src/tools/NeighborList.cpp
src/tools/NeighborList.h
+1
-0
1 addition, 0 deletions
src/tools/NeighborList.h
with
11 additions
and
3 deletions
regtest/multicolvar/rt20/plumed.dat
+
5
−
0
View file @
7257c96d
...
@@ -4,7 +4,12 @@ c1: ...
...
@@ -4,7 +4,12 @@ c1: ...
COORDINATION GROUPA=1 GROUPB=2-100 NLIST NL_CUTOFF=2.5 NL_STRIDE=20
COORDINATION GROUPA=1 GROUPB=2-100 NLIST NL_CUTOFF=2.5 NL_STRIDE=20
SWITCH={RATIONAL NN=6 MM=12 R_0=1.0}
SWITCH={RATIONAL NN=6 MM=12 R_0=1.0}
...
...
c1x: ...
COORDINATION GROUPA=1 GROUPB=2-100 NLIST NL_CUTOFF=2.5 NL_STRIDE=30
SWITCH={RATIONAL NN=6 MM=12 R_0=1.0}
...
PRINT ARG=d1.*,d2.*,c1 FILE=colvar FMT=%8.5f STRIDE=1
PRINT ARG=d1.*,d2.*,c1 FILE=colvar FMT=%8.5f STRIDE=1
PRINT ARG=c1x FILE=colvarx
COORDINATIONNUMBER SPECIES=1-5 SWITCH={RATIONAL R_0=0.5} MORE_THAN={EXP R_0=4.0} LABEL=c2
COORDINATIONNUMBER SPECIES=1-5 SWITCH={RATIONAL R_0=0.5} MORE_THAN={EXP R_0=4.0} LABEL=c2
COORDINATIONNUMBER SPECIES=1-5 SWITCH={RATIONAL R_0=0.5} MORE_THAN={EXP R_0=4.0} NUMERICAL_DERIVATIVES LABEL=c2n
COORDINATIONNUMBER SPECIES=1-5 SWITCH={RATIONAL R_0=0.5} MORE_THAN={EXP R_0=4.0} NUMERICAL_DERIVATIVES LABEL=c2n
DUMPDERIVATIVES ARG=c2.*,c2n.* FILE=derivatives FMT=%8.4f
DUMPDERIVATIVES ARG=c2.*,c2n.* FILE=derivatives FMT=%8.4f
This diff is collapsed.
Click to expand it.
src/tools/NeighborList.cpp
+
5
−
3
View file @
7257c96d
...
@@ -32,7 +32,7 @@ using namespace std;
...
@@ -32,7 +32,7 @@ using namespace std;
NeighborList
::
NeighborList
(
const
vector
<
AtomNumber
>&
list0
,
const
vector
<
AtomNumber
>&
list1
,
NeighborList
::
NeighborList
(
const
vector
<
AtomNumber
>&
list0
,
const
vector
<
AtomNumber
>&
list1
,
const
bool
&
do_pair
,
const
bool
&
do_pbc
,
const
Pbc
&
pbc
,
const
bool
&
do_pair
,
const
bool
&
do_pbc
,
const
Pbc
&
pbc
,
const
double
&
distance
,
const
unsigned
&
stride
)
:
const
double
&
distance
,
const
unsigned
&
stride
)
:
reduced
(
false
),
do_pair_
(
do_pair
),
do_pbc_
(
do_pbc
),
pbc_
(
&
pbc
),
do_pair_
(
do_pair
),
do_pbc_
(
do_pbc
),
pbc_
(
&
pbc
),
distance_
(
distance
),
stride_
(
stride
)
distance_
(
distance
),
stride_
(
stride
)
{
{
...
@@ -54,7 +54,7 @@ NeighborList::NeighborList(const vector<AtomNumber>& list0, const vector<AtomNum
...
@@ -54,7 +54,7 @@ NeighborList::NeighborList(const vector<AtomNumber>& list0, const vector<AtomNum
NeighborList
::
NeighborList
(
const
vector
<
AtomNumber
>&
list0
,
const
bool
&
do_pbc
,
NeighborList
::
NeighborList
(
const
vector
<
AtomNumber
>&
list0
,
const
bool
&
do_pbc
,
const
Pbc
&
pbc
,
const
double
&
distance
,
const
Pbc
&
pbc
,
const
double
&
distance
,
const
unsigned
&
stride
)
:
const
unsigned
&
stride
)
:
reduced
(
false
),
do_pbc_
(
do_pbc
),
pbc_
(
&
pbc
),
do_pbc_
(
do_pbc
),
pbc_
(
&
pbc
),
distance_
(
distance
),
stride_
(
stride
){
distance_
(
distance
),
stride_
(
stride
){
fullatomlist_
=
list0
;
fullatomlist_
=
list0
;
...
@@ -119,10 +119,11 @@ void NeighborList::setRequestList() {
...
@@ -119,10 +119,11 @@ void NeighborList::setRequestList() {
requestlist_
.
push_back
(
fullatomlist_
[
neighbors_
[
i
].
second
]);
requestlist_
.
push_back
(
fullatomlist_
[
neighbors_
[
i
].
second
]);
}
}
Tools
::
removeDuplicates
(
requestlist_
);
Tools
::
removeDuplicates
(
requestlist_
);
reduced
=
false
;
}
}
vector
<
AtomNumber
>&
NeighborList
::
getReducedAtomList
()
{
vector
<
AtomNumber
>&
NeighborList
::
getReducedAtomList
()
{
for
(
unsigned
int
i
=
0
;
i
<
size
();
++
i
){
if
(
!
reduced
)
for
(
unsigned
int
i
=
0
;
i
<
size
();
++
i
){
unsigned
newindex0
=
0
,
newindex1
=
0
;
unsigned
newindex0
=
0
,
newindex1
=
0
;
AtomNumber
index0
=
fullatomlist_
[
neighbors_
[
i
].
first
];
AtomNumber
index0
=
fullatomlist_
[
neighbors_
[
i
].
first
];
AtomNumber
index1
=
fullatomlist_
[
neighbors_
[
i
].
second
];
AtomNumber
index1
=
fullatomlist_
[
neighbors_
[
i
].
second
];
...
@@ -132,6 +133,7 @@ vector<AtomNumber>& NeighborList::getReducedAtomList() {
...
@@ -132,6 +133,7 @@ vector<AtomNumber>& NeighborList::getReducedAtomList() {
p
=
std
::
find
(
requestlist_
.
begin
(),
requestlist_
.
end
(),
index1
);
plumed_assert
(
p
!=
requestlist_
.
end
());
newindex1
=
p
-
requestlist_
.
begin
();
p
=
std
::
find
(
requestlist_
.
begin
(),
requestlist_
.
end
(),
index1
);
plumed_assert
(
p
!=
requestlist_
.
end
());
newindex1
=
p
-
requestlist_
.
begin
();
neighbors_
[
i
]
=
pair
<
unsigned
,
unsigned
>
(
newindex0
,
newindex1
);
neighbors_
[
i
]
=
pair
<
unsigned
,
unsigned
>
(
newindex0
,
newindex1
);
}
}
reduced
=
true
;
return
requestlist_
;
return
requestlist_
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tools/NeighborList.h
+
1
−
0
View file @
7257c96d
...
@@ -35,6 +35,7 @@ class Pbc;
...
@@ -35,6 +35,7 @@ class Pbc;
/// A class that implements neighbor lists from two lists or a single list of atoms
/// A class that implements neighbor lists from two lists or a single list of atoms
class
NeighborList
class
NeighborList
{
{
bool
reduced
;
bool
do_pair_
,
do_pbc_
,
twolists_
;
bool
do_pair_
,
do_pbc_
,
twolists_
;
const
PLMD
::
Pbc
*
pbc_
;
const
PLMD
::
Pbc
*
pbc_
;
std
::
vector
<
PLMD
::
AtomNumber
>
fullatomlist_
,
requestlist_
;
std
::
vector
<
PLMD
::
AtomNumber
>
fullatomlist_
,
requestlist_
;
...
...
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