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
ebbead47
There was an error fetching the commit references. Please try again later.
Commit
ebbead47
authored
9 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
doc for LOAD
[makedoc]
parent
234eaaf3
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/setup/Load.cpp
+49
-0
49 additions, 0 deletions
src/setup/Load.cpp
with
49 additions
and
0 deletions
src/setup/Load.cpp
+
49
−
0
View file @
ebbead47
...
...
@@ -39,10 +39,59 @@ in which case the file is compiled first.
\par Examples
If you have a shared object named extensions.so and want to
use the functionalities implemented in it within PLUMED you can
load it with the following syntax
\verbatim
LOAD FILE=extensions.so
\endverbatim
As a more practical example, imagine that you want to make a
small change to one collective variable that is already implemented
in PLUMED, say \ref DISTANCE . Copy the file `src/colvar/Distance.cpp`
into your work directory, rename it as `Distance2.cpp`
and edit it as you wish. It might be better
to also replace any occurence of the string DISTANCE within the file
with DISTANCE2, so that both old and new implementation will be available
with different names. Then you can compile it into a shared object using
\verbatim
> plumed mklib Distance2.cpp
\endverbatim
This will generate a file `Distance2.so` (or `Distance2.dylib` on a mac)
that can be loaded.
Now you can use your new implementation with the following input
\verbatim
# load the new library
LOAD FILE=Distance2.so
# compute standard distance
d: DISTANCE ATOMS=1,10
# compute modified distance
d2: DISTANCE2 ATOMS=1,10
# print them on a file
PRINT ARG=d,d2 FILE=compare-them
\endverbatim
You can even skip the initial step and directly feed PLUMED
with the `Distance2.cpp` file: it will be compiled on the fly.
\verbatim
# load the new definition
# this is a cpp file so it will be compiled
LOAD FILE=Distance2.cpp
# compute standard distance
d: DISTANCE ATOMS=1,10
# compute modified distance
d2: DISTANCE2 ATOMS=1,10
# print them on a file
PRINT ARG=d,d2 FILE=compare-them
\endverbatim
This will allow to make quick tests while developing your own
variables. Of course, after your implementation is ready you might
want to add it to the PLUMED source tree and recompile
the whole PLUMED.
*/
//+ENDPLUMEDOC
...
...
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