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
e9fb3d25
There was an error fetching the commit references. Please try again later.
Commit
e9fb3d25
authored
5 years ago
by
carlocamilloni
Browse files
Options
Downloads
Patches
Plain Diff
PIV: cleaned warnings
parent
62277569
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/piv/PIV.cpp
+16
-27
16 additions, 27 deletions
src/piv/PIV.cpp
with
16 additions
and
27 deletions
src/piv/PIV.cpp
+
16
−
27
View file @
e9fb3d25
...
@@ -20,7 +20,6 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>.
...
@@ -20,7 +20,6 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>.
#include
"core/ActionWithVirtualAtom.h"
#include
"core/ActionWithVirtualAtom.h"
#include
"tools/NeighborList.h"
#include
"tools/NeighborList.h"
#include
"tools/SwitchingFunction.h"
#include
"tools/SwitchingFunction.h"
//#include "tools/Tools.h"
#include
"tools/PDB.h"
#include
"tools/PDB.h"
#include
"tools/Pbc.h"
#include
"tools/Pbc.h"
#include
"tools/Stopwatch.h"
#include
"tools/Stopwatch.h"
...
@@ -187,14 +186,11 @@ class PIV : public Colvar
...
@@ -187,14 +186,11 @@ class PIV : public Colvar
private:
private:
bool
pbc
,
serial
,
timer
;
bool
pbc
,
serial
,
timer
;
ForwardDecl
<
Stopwatch
>
stopwatch_fwd
;
ForwardDecl
<
Stopwatch
>
stopwatch_fwd
;
/// The stopwatch that times the different parts of the calculation
Stopwatch
&
stopwatch
=*
stopwatch_fwd
;
Stopwatch
&
stopwatch
=*
stopwatch_fwd
;
int
updatePIV
;
int
updatePIV
;
unsigned
Nprec
,
Natm
,
Nlist
,
NLsize
;
unsigned
Nprec
,
Natm
,
Nlist
,
NLsize
;
// Fvol: volume scaling factor for distances
double
Fvol
,
Vol0
,
m_PIVdistance
;
double
Fvol
,
Vol0
,
m_PIVdistance
;
std
::
string
ref_file
;
std
::
string
ref_file
;
// std:: vector<string> atype;
NeighborList
*
nlall
;
NeighborList
*
nlall
;
std
::
vector
<
SwitchingFunction
>
sfs
;
std
::
vector
<
SwitchingFunction
>
sfs
;
std
::
vector
<
std
::
vector
<
double
>
>
rPIV
;
std
::
vector
<
std
::
vector
<
double
>
>
rPIV
;
...
@@ -204,12 +200,11 @@ private:
...
@@ -204,12 +200,11 @@ private:
std
::
vector
<
bool
>
dosort
;
std
::
vector
<
bool
>
dosort
;
std
::
vector
<
Vector
>
compos
;
std
::
vector
<
Vector
>
compos
;
std
::
vector
<
string
>
sw
;
std
::
vector
<
string
>
sw
;
//std::vector<std:: vector<unsigned> > com2atoms;
std
::
vector
<
NeighborList
*>
nl
;
std
::
vector
<
NeighborList
*>
nl
;
std
::
vector
<
NeighborList
*>
nlcom
;
std
::
vector
<
NeighborList
*>
nlcom
;
std
::
vector
<
Vector
>
m_deriv
;
std
::
vector
<
Vector
>
m_deriv
;
Tensor
m_virial
;
Tensor
m_virial
;
bool
Svol
,
Sfac
,
cross
,
direct
,
doneigh
,
test
,
CompDer
,
com
;
bool
Svol
,
cross
,
direct
,
doneigh
,
test
,
CompDer
,
com
;
public:
public:
static
void
registerKeywords
(
Keywords
&
keys
);
static
void
registerKeywords
(
Keywords
&
keys
);
PIV
(
const
ActionOptions
&
);
PIV
(
const
ActionOptions
&
);
...
@@ -253,36 +248,34 @@ void PIV::registerKeywords( Keywords& keys )
...
@@ -253,36 +248,34 @@ void PIV::registerKeywords( Keywords& keys )
PIV
::
PIV
(
const
ActionOptions
&
ao
)
:
PIV
::
PIV
(
const
ActionOptions
&
ao
)
:
PLUMED_COLVAR_INIT
(
ao
),
PLUMED_COLVAR_INIT
(
ao
),
pbc
(
true
),
pbc
(
true
),
timer
(
false
),
serial
(
false
),
serial
(
false
),
timer
(
false
),
updatePIV
(
1
),
updatePIV
(
1
),
Svol
(
false
),
Sfac
(
false
),
cross
(
true
),
direct
(
true
),
doneigh
(
false
),
CompDer
(
false
),
com
(
false
),
test
(
false
),
Nprec
(
1000
),
Nprec
(
1000
),
Natm
(
1
),
Natm
(
1
),
NLsize
(
1
),
Nlist
(
1
),
Nlist
(
1
),
NLsize
(
1
),
Fvol
(
1.
),
Fvol
(
1.
),
Vol0
(
0.
),
Vol0
(
0.
),
m_PIVdistance
(
0.
),
m_PIVdistance
(
0.
),
m_deriv
(
std
::
vector
<
Vector
>
(
1
)),
nl
(
std
::
vector
<
NeighborList
*>
(
Nlist
)),
rPIV
(
std
::
vector
<
std
::
vector
<
double
>
>
(
Nlist
)),
rPIV
(
std
::
vector
<
std
::
vector
<
double
>
>
(
Nlist
)),
scaling
(
std
::
vector
<
double
>
(
Nlist
)),
scaling
(
std
::
vector
<
double
>
(
Nlist
)),
r00
(
std
::
vector
<
double
>
(
Nlist
)),
r00
(
std
::
vector
<
double
>
(
Nlist
)),
sw
(
std
::
vector
<
string
>
(
Nlist
)),
nl_skin
(
std
::
vector
<
double
>
(
Nlist
)),
nl_skin
(
std
::
vector
<
double
>
(
Nlist
)),
fmass
(
std
::
vector
<
double
>
(
Nlist
)),
fmass
(
std
::
vector
<
double
>
(
Nlist
)),
dosort
(
std
::
vector
<
bool
>
(
Nlist
)),
dosort
(
std
::
vector
<
bool
>
(
Nlist
)),
compos
(
std
::
vector
<
Vector
>
(
NLsize
)),
sw
(
std
::
vector
<
string
>
(
Nlist
)),
nl
(
std
::
vector
<
NeighborList
*>
(
Nlist
)),
nlcom
(
std
::
vector
<
NeighborList
*>
(
NLsize
)),
nlcom
(
std
::
vector
<
NeighborList
*>
(
NLsize
)),
compos
(
std
::
vector
<
Vector
>
(
NLsize
))
m_deriv
(
std
::
vector
<
Vector
>
(
1
)),
//com2atoms(std:: vector<std:: vector<unsigned> >(Nlist))
Svol
(
false
),
cross
(
true
),
direct
(
true
),
doneigh
(
false
),
test
(
false
),
CompDer
(
false
),
com
(
false
)
{
{
log
<<
"Starting PIV Constructor
\n
"
;
log
<<
"Starting PIV Constructor
\n
"
;
...
@@ -306,7 +299,6 @@ PIV::PIV(const ActionOptions&ao):
...
@@ -306,7 +299,6 @@ PIV::PIV(const ActionOptions&ao):
log
<<
"Serial PIV construction
\n
"
;
log
<<
"Serial PIV construction
\n
"
;
}
else
{
}
else
{
log
<<
"Parallel PIV construction
\n
"
;
log
<<
"Parallel PIV construction
\n
"
;
unsigned
rank
=
comm
.
Get_rank
();
}
}
// Derivatives
// Derivatives
...
@@ -382,7 +374,6 @@ PIV::PIV(const ActionOptions&ao):
...
@@ -382,7 +374,6 @@ PIV::PIV(const ActionOptions&ao):
NLsize
=
mypdb
.
getAtomNumbers
().
size
();
NLsize
=
mypdb
.
getAtomNumbers
().
size
();
// In the following P stands for Point (either an Atom or a COM)
// In the following P stands for Point (either an Atom or a COM)
unsigned
resnum
=
0
;
unsigned
resnum
=
0
;
unsigned
Pnum
=
0
;
// Presind (array size: number of residues) contains the contains the residue number
// Presind (array size: number of residues) contains the contains the residue number
// this is because the residue numbers may not alwyas be ordered from 1 to resnum
// this is because the residue numbers may not alwyas be ordered from 1 to resnum
std
::
vector
<
unsigned
>
Presind
;
std
::
vector
<
unsigned
>
Presind
;
...
@@ -560,8 +551,6 @@ PIV::PIV(const ActionOptions&ao):
...
@@ -560,8 +551,6 @@ PIV::PIV(const ActionOptions&ao):
}
}
// Calculate COM masses once and for all from lists
// Calculate COM masses once and for all from lists
if
(
com
)
{
if
(
com
)
{
unsigned
count
=
0
;
//log << "Computing COM masses \n";
for
(
unsigned
j
=
0
;
j
<
compos
.
size
();
j
++
)
{
for
(
unsigned
j
=
0
;
j
<
compos
.
size
();
j
++
)
{
double
commass
=
0.
;
double
commass
=
0.
;
for
(
unsigned
i
=
0
;
i
<
nlcom
[
j
]
->
getFullAtomList
().
size
();
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
nlcom
[
j
]
->
getFullAtomList
().
size
();
i
++
)
{
...
@@ -627,7 +616,7 @@ PIV::PIV(const ActionOptions&ao):
...
@@ -627,7 +616,7 @@ PIV::PIV(const ActionOptions&ao):
double
r0
;
double
r0
;
vector
<
string
>
data
=
Tools
::
getWords
(
sw
[
j
]);
vector
<
string
>
data
=
Tools
::
getWords
(
sw
[
j
]);
data
.
erase
(
data
.
begin
());
data
.
erase
(
data
.
begin
());
bool
tmp
=
Tools
::
parse
(
data
,
"R_0"
,
r0
);
Tools
::
parse
(
data
,
"R_0"
,
r0
);
std
::
string
old_r0
;
Tools
::
convert
(
r0
,
old_r0
);
std
::
string
old_r0
;
Tools
::
convert
(
r0
,
old_r0
);
r0
*=
Fvol
;
r0
*=
Fvol
;
std
::
string
new_r0
;
Tools
::
convert
(
r0
,
new_r0
);
std
::
string
new_r0
;
Tools
::
convert
(
r0
,
new_r0
);
...
@@ -773,7 +762,7 @@ void PIV::calculate()
...
@@ -773,7 +762,7 @@ void PIV::calculate()
double
r0
;
double
r0
;
vector
<
string
>
data
=
Tools
::
getWords
(
sw
[
j
]);
vector
<
string
>
data
=
Tools
::
getWords
(
sw
[
j
]);
data
.
erase
(
data
.
begin
());
data
.
erase
(
data
.
begin
());
bool
tmp
=
Tools
::
parse
(
data
,
"R_0"
,
r0
);
Tools
::
parse
(
data
,
"R_0"
,
r0
);
std
::
string
old_r0
;
Tools
::
convert
(
r0
,
old_r0
);
std
::
string
old_r0
;
Tools
::
convert
(
r0
,
old_r0
);
r0
*=
Fvol
;
r0
*=
Fvol
;
std
::
string
new_r0
;
Tools
::
convert
(
r0
,
new_r0
);
std
::
string
new_r0
;
Tools
::
convert
(
r0
,
new_r0
);
...
...
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