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
6881fef8
There was an error fetching the commit references. Please try again later.
Commit
6881fef8
authored
13 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation
parent
9177592a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/Action.h
+2
-1
2 additions, 1 deletion
src/Action.h
src/ActionPilot.h
+1
-0
1 addition, 0 deletions
src/ActionPilot.h
src/ActionWithArguments.h
+3
-0
3 additions, 0 deletions
src/ActionWithArguments.h
src/ActionWithValue.h
+26
-0
26 additions, 0 deletions
src/ActionWithValue.h
with
32 additions
and
1 deletion
src/Action.h
+
2
−
1
View file @
6881fef8
...
...
@@ -13,7 +13,8 @@ namespace PLMD{
class
PlumedMain
;
/// This class is used to bring the relevant information to the Action constructor.
/// Its content is kept private to other classes, and may change in the future
/// Only Action and ActionRegister class can access to its content, which is
/// kept private to other classes, and may change in the future.
class
ActionOptions
{
friend
class
Action
;
friend
class
ActionRegister
;
...
...
This diff is collapsed.
Click to expand it.
src/ActionPilot.h
+
1
−
0
View file @
6881fef8
...
...
@@ -16,6 +16,7 @@ protected:
int
getStride
()
const
;
public:
ActionPilot
(
const
ActionOptions
&
);
/// Check if the action is active on this step
bool
onStep
()
const
;
};
...
...
This diff is collapsed.
Click to expand it.
src/ActionWithArguments.h
+
3
−
0
View file @
6881fef8
...
...
@@ -21,8 +21,11 @@ class ActionWithArguments:
protected:
ActionWithArguments
(
const
ActionOptions
&
);
virtual
~
ActionWithArguments
(){};
/// Returns an array of pointers to the arguments
std
::
vector
<
Value
*>
&
getArguments
();
/// Returns the value of an argument
double
getArgument
(
int
)
const
;
/// Returns the number of arguments
unsigned
getNumberOfArguments
()
const
;
public
:
};
...
...
This diff is collapsed.
Click to expand it.
src/ActionWithValue.h
+
26
−
0
View file @
6881fef8
...
...
@@ -11,6 +11,8 @@ namespace PLMD{
/// Action which can take one or more values.
/// This object contains an array of PLMD::Value, one for each component.
/// It also stores all the derivatives of these values wrt the parameters
/// Parameters are other values (from other Action s) or atomic positions.
class
ActionWithValue
:
public
virtual
Action
{
...
...
@@ -21,20 +23,44 @@ class ActionWithValue:
public:
ActionWithValue
(
const
ActionOptions
&
ao
);
~
ActionWithValue
();
/// Add a new value without derivatives.
/// This should be used for values which are only evaluated (e.g. for printing)
/// but for which we do not make derivatives available so that forces cannot
/// be applied
void
addValue
(
const
std
::
string
&
name
);
/// Add a new value with derivatives.
/// This should be used for values for which we make derivatives available
/// so that forces can be applied
void
addValueWithDerivatives
(
const
std
::
string
&
name
);
/// Check if a value with a given name is already used
bool
hasNamedValue
(
const
std
::
string
&
name
)
const
;
/// Return a pointer to the value by name
Value
*
getValue
(
const
std
::
string
&
name
)
const
;
/// Return a pointer to the value by index
/// This should be an indexes growing for new inserted values.
/// E.g., the default value (no name) is number 0, ...
Value
*
getValue
(
int
i
)
const
;
/// Returns an array of strings with the names of the values
std
::
vector
<
std
::
string
>
getValueNames
()
const
;
/// Returns the number of values defined
int
getNumberOfValues
();
/// Set the number of parameters on which this Action depends.
/// Example: for a Bias, this is the number of arguments, for a Colvar
/// is 3*Natoms+cell variables
void
setNumberOfParameters
(
int
n
);
/// Returns the number of parameters on which this Action depends.
int
getNumberOfParameters
()
const
;
/// Returns the total force applied on i-th value
double
getForce
(
int
n
);
/// Add a force to the i-th value
void
addInputForces
(
int
i
,
double
f
);
/// Clear the forces on the values
void
clearInputForces
();
/// Clear the derivatives of values wrt parameters
void
clearDerivatives
();
/// Set the value
void
setValue
(
Value
*
,
double
);
/// Set the default value (the one without name)
void
setValue
(
double
);
};
...
...
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