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
3dc5ef08
There was an error fetching the commit references. Please try again later.
Commit
3dc5ef08
authored
8 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug and added a check on input to stop users making mistakes
parent
bd949730
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/multicolvar/BridgedMultiColvarFunction.h
+12
-0
12 additions, 0 deletions
src/multicolvar/BridgedMultiColvarFunction.h
src/multicolvar/VolumeGradientBase.cpp
+11
-0
11 additions, 0 deletions
src/multicolvar/VolumeGradientBase.cpp
with
23 additions
and
0 deletions
src/multicolvar/BridgedMultiColvarFunction.h
+
12
−
0
View file @
3dc5ef08
...
@@ -88,6 +88,8 @@ public:
...
@@ -88,6 +88,8 @@ public:
void
applyBridgeForces
(
const
std
::
vector
<
double
>&
bb
);
void
applyBridgeForces
(
const
std
::
vector
<
double
>&
bb
);
Vector
getCentralAtomPos
(
const
unsigned
&
curr
);
Vector
getCentralAtomPos
(
const
unsigned
&
curr
);
CatomPack
getCentralAtomPack
(
const
unsigned
&
basn
,
const
unsigned
&
curr
);
CatomPack
getCentralAtomPack
(
const
unsigned
&
basn
,
const
unsigned
&
curr
);
void
normalizeVector
(
std
::
vector
<
double
>&
vals
)
const
;
void
normalizeVectorDerivatives
(
MultiValue
&
myvals
)
const
;
};
};
inline
inline
...
@@ -130,6 +132,16 @@ AtomNumber BridgedMultiColvarFunction::getAbsoluteIndexOfCentralAtom(const unsig
...
@@ -130,6 +132,16 @@ AtomNumber BridgedMultiColvarFunction::getAbsoluteIndexOfCentralAtom(const unsig
return
mycolv
->
getAbsoluteIndexOfCentralAtom
(
i
);
return
mycolv
->
getAbsoluteIndexOfCentralAtom
(
i
);
}
}
inline
void
BridgedMultiColvarFunction
::
normalizeVector
(
std
::
vector
<
double
>&
vals
)
const
{
mycolv
->
normalizeVector
(
vals
);
}
inline
void
BridgedMultiColvarFunction
::
normalizeVectorDerivatives
(
MultiValue
&
myvals
)
const
{
mycolv
->
normalizeVectorDerivatives
(
myvals
);
}
}
}
}
}
#endif
#endif
This diff is collapsed.
Click to expand it.
src/multicolvar/VolumeGradientBase.cpp
+
11
−
0
View file @
3dc5ef08
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
You should have received a copy of the GNU Lesser General Public License
You should have received a copy of the GNU Lesser General Public License
along with plumed. If not, see <http://www.gnu.org/licenses/>.
along with plumed. If not, see <http://www.gnu.org/licenses/>.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
#include
"core/PlumedMain.h"
#include
"core/ActionSet.h"
#include
"VolumeGradientBase.h"
#include
"VolumeGradientBase.h"
#include
"CatomPack.h"
#include
"CatomPack.h"
...
@@ -37,6 +39,15 @@ BridgedMultiColvarFunction(ao)
...
@@ -37,6 +39,15 @@ BridgedMultiColvarFunction(ao)
void
VolumeGradientBase
::
requestAtoms
(
const
std
::
vector
<
AtomNumber
>&
atoms
){
void
VolumeGradientBase
::
requestAtoms
(
const
std
::
vector
<
AtomNumber
>&
atoms
){
ActionAtomistic
::
requestAtoms
(
atoms
);
bridgeVariable
=
3
*
atoms
.
size
();
ActionAtomistic
::
requestAtoms
(
atoms
);
bridgeVariable
=
3
*
atoms
.
size
();
std
::
map
<
std
::
string
,
bool
>
checklabs
;
Dependencies
dd
(
getDependencies
()
);
for
(
Dependencies
::
iterator
p
=
dd
.
begin
();
p
!=
dd
.
end
();
++
p
)
checklabs
.
insert
(
std
::
pair
<
std
::
string
,
bool
>
((
*
p
)
->
getLabel
(),
false
));
for
(
ActionSet
::
const_iterator
p
=
plumed
.
getActionSet
().
begin
();
p
!=
plumed
.
getActionSet
().
end
();
++
p
){
if
(
(
*
p
)
->
getLabel
()
==
getPntrToMultiColvar
()
->
getLabel
()
)
break
;
if
(
checklabs
.
count
((
*
p
)
->
getLabel
())
)
checklabs
[(
*
p
)
->
getLabel
()]
=
true
;
}
for
(
std
::
map
<
std
::
string
,
bool
>::
iterator
p
=
checklabs
.
begin
();
p
!=
checklabs
.
end
();
++
p
){
if
(
!
p
->
second
)
error
(
"the input for the virtual atoms used in the input for this action must appear in the input file before the input multicolvar"
);
}
addDependency
(
getPntrToMultiColvar
()
);
addDependency
(
getPntrToMultiColvar
()
);
tmpforces
.
resize
(
3
*
atoms
.
size
()
+
9
);
tmpforces
.
resize
(
3
*
atoms
.
size
()
+
9
);
}
}
...
...
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