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
f19f5be1
There was an error fetching the commit references. Please try again later.
Commit
f19f5be1
authored
9 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Fixed warning about DotProductDistance in compilation
parent
30734458
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/reference/DotProductDistance.cpp
+4
-2
4 additions, 2 deletions
src/reference/DotProductDistance.cpp
src/reference/ReferenceArguments.h
+3
-3
3 additions, 3 deletions
src/reference/ReferenceArguments.h
with
7 additions
and
5 deletions
src/reference/DotProductDistance.cpp
+
4
−
2
View file @
f19f5be1
...
@@ -29,7 +29,7 @@ class DotProductDistance : public ArgumentOnlyDistance {
...
@@ -29,7 +29,7 @@ class DotProductDistance : public ArgumentOnlyDistance {
public:
public:
explicit
DotProductDistance
(
const
ReferenceConfigurationOptions
&
ro
);
explicit
DotProductDistance
(
const
ReferenceConfigurationOptions
&
ro
);
void
read
(
const
PDB
&
);
void
read
(
const
PDB
&
);
double
calc
(
const
std
::
vector
<
Value
*>&
vals
,
const
std
::
vector
<
double
>&
arg
,
const
bool
&
squared
);
double
calc
ulateArgumentDistance
(
const
std
::
vector
<
Value
*>
&
vals
,
const
std
::
vector
<
double
>&
arg
,
ReferenceValuePack
&
myder
,
const
bool
&
squared
)
const
;
};
};
PLUMED_REGISTER_METRIC
(
DotProductDistance
,
"DOTPRODUCT"
)
PLUMED_REGISTER_METRIC
(
DotProductDistance
,
"DOTPRODUCT"
)
...
@@ -44,9 +44,11 @@ void DotProductDistance::read( const PDB& pdb ){
...
@@ -44,9 +44,11 @@ void DotProductDistance::read( const PDB& pdb ){
readArgumentsFromPDB
(
pdb
);
readArgumentsFromPDB
(
pdb
);
}
}
double
DotProductDistance
::
calc
(
const
std
::
vector
<
Value
*>&
vals
,
const
std
::
vector
<
double
>&
arg
,
const
bool
&
squared
){
double
DotProductDistance
::
calculateArgumentDistance
(
const
std
::
vector
<
Value
*>
&
vals
,
const
std
::
vector
<
double
>&
arg
,
ReferenceValuePack
&
myder
,
const
bool
&
squared
)
const
{
double
dot
=
0.0
;
double
dot
=
0.0
;
for
(
unsigned
long
i
=
0
;
i
<
vals
.
size
();
++
i
)
dot
+=
getReferenceArgument
(
i
)
*
arg
[
i
];
for
(
unsigned
long
i
=
0
;
i
<
vals
.
size
();
++
i
)
dot
+=
getReferenceArgument
(
i
)
*
arg
[
i
];
for
(
unsigned
long
i
=
0
;
i
<
vals
.
size
();
++
i
)
myder
.
setArgumentDerivatives
(
i
,
-
getReferenceArgument
(
i
)
/
dot
);
return
-
log
(
dot
);
return
-
log
(
dot
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/reference/ReferenceArguments.h
+
3
−
3
View file @
f19f5be1
...
@@ -64,9 +64,6 @@ protected:
...
@@ -64,9 +64,6 @@ protected:
void
readArgumentsFromPDB
(
const
PDB
&
pdb
);
void
readArgumentsFromPDB
(
const
PDB
&
pdb
);
/// Set the values of the colvars based on their current instantanous values (used in Analysis)
/// Set the values of the colvars based on their current instantanous values (used in Analysis)
void
setReferenceArguments
();
void
setReferenceArguments
();
/// Calculate the euclidean/malanobius distance the atoms have moved from the reference
/// configuration in CV space
double
calculateArgumentDistance
(
const
std
::
vector
<
Value
*>
&
vals
,
const
std
::
vector
<
double
>&
arg
,
ReferenceValuePack
&
myder
,
const
bool
&
squared
)
const
;
public:
public:
explicit
ReferenceArguments
(
const
ReferenceConfigurationOptions
&
ro
);
explicit
ReferenceArguments
(
const
ReferenceConfigurationOptions
&
ro
);
/// Get the number of reference arguments
/// Get the number of reference arguments
...
@@ -86,6 +83,9 @@ public:
...
@@ -86,6 +83,9 @@ public:
const
std
::
vector
<
double
>&
getReferenceMetric
();
const
std
::
vector
<
double
>&
getReferenceMetric
();
/// Return names
/// Return names
const
std
::
vector
<
std
::
string
>&
getArgumentNames
();
const
std
::
vector
<
std
::
string
>&
getArgumentNames
();
/// Calculate the euclidean/malanobius distance the atoms have moved from the reference
/// configuration in CV space
virtual
double
calculateArgumentDistance
(
const
std
::
vector
<
Value
*>
&
vals
,
const
std
::
vector
<
double
>&
arg
,
ReferenceValuePack
&
myder
,
const
bool
&
squared
)
const
;
};
};
inline
inline
...
...
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