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
920fcc23
There was an error fetching the commit references. Please try again later.
Commit
920fcc23
authored
8 years ago
by
Carlo Camilloni
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:plumed/plumed2
parents
37109cee
f774f561
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
scripts/vim2html.sh
+91
-21
91 additions, 21 deletions
scripts/vim2html.sh
src/reference/DRMSD.h
+4
-3
4 additions, 3 deletions
src/reference/DRMSD.h
user-doc/Installation.txt
+56
-0
56 additions, 0 deletions
user-doc/Installation.txt
vim/vimsyntax.sh
+9
-5
9 additions, 5 deletions
vim/vimsyntax.sh
with
160 additions
and
29 deletions
scripts/vim2html.sh
+
91
−
21
View file @
920fcc23
...
...
@@ -18,7 +18,10 @@ Usage:
Options can be:
--annotate-syntax Reports annotated syntax on output.
Also reports non-annotated regions on stderr
--pdf To produce a pdf file with syntax highlighting.
--crop Crop the pdf file to the only written part. Usefull to insert the pdf in a LaTex file as image.
--fs Specify the fontsize of the pdf output.
--colors Specify the color palette. Allowed values are: default/ac
EOF
exit
0
fi
...
...
@@ -31,12 +34,30 @@ fi
annotate_syntax
=
no
inputfile
=
""
outputfile
=
""
pdf
=
no
crop
=
no
fontsize
=
7.5
prefix
=
""
colors
=
""
for
opt
do
case
"
$opt
"
in
prefixopt
=
"
$prefix$opt
"
prefix
=
""
case
"
$prefixopt
"
in
(
--annotate-syntax
)
annotate_syntax
=
yes
;;
(
--pdf
)
pdf
=
yes
;;
(
--crop
)
crop
=
yes
;;
(
--fs
)
prefix
=
"--fs="
;;
(
--fs
=
*
)
fontsize
=
"
${
prefixopt
#--fs=
}
"
;;
(
--colors
)
prefix
=
"--colors="
;;
(
--colors
=
*
)
colors
=
"
${
prefixopt
#--colors=
}
"
;;
(
-
*
)
echo
"ERROR: Unknown option
$opt
. Use -h for help."
exit
1
;;
...
...
@@ -51,7 +72,6 @@ do
fi
esac
done
temp
=
"
$(
mktemp
-dt
plumed.XXXXX
)
"
{
...
...
@@ -64,45 +84,95 @@ fi | tr '\r' ' '
}
|
{
cd
$temp
{
if
[
"
$annotate_syntax
"
=
"yes"
]
;
then
vim -
-c
":syntax off"
\
case
"
$colors
"
in
(
ac
)
cat
>
$temp
/colors.vim
<<
EOF
: set bg=dark
: hi Statement ctermfg=5 cterm=bold guifg=#ffff60 gui=none
: highlight Type ctermfg=2 cterm=bold
: hi Comment guifg=#80a0ff ctermfg=darkblue
: hi Constant ctermfg=red guifg=#ffa0a0 cterm=bold
EOF
;;
(
*
)
echo
>
$temp
/colors.vim
;;
esac
if
[
"
$pdf
"
=
"yes"
]
;
then
# this is a workaround for a bug in TOhtml
# that does not color properly when there are empty lines
sed
"s/^
$/
/"
|
vim -
-c
":syntax off"
\
-c
":source
$VIMFILE
"
\
-c
":source
$temp
/colors.vim"
\
-c
":set printoptions=header:0"
\
-c
":set printfont=courier:h
$fontsize
"
\
-c
":hardcopy > out.ps"
\
-c
":q!"
1> /dev/null 2> /dev/null
else
if
[
"
$annotate_syntax
"
=
"yes"
]
;
then
vim -
-c
":syntax off"
\
-c
":source
$VIMFILE
"
\
-c
":call PlumedAnnotateSyntax()"
\
-c
":wq! syntax.log"
-c
":q!"
1> /dev/null 2> /dev/null
else
# this is a workaround for a bug in TOhtml
# that does not color properly when there are empty lines
sed
"s/^
$/
/"
|
vim -
-c
":syntax off"
\
else
# this is a workaround for a bug in TOhtml
# that does not color properly when there are empty lines
sed
"s/^
$/
/"
|
vim -
-c
":syntax off"
\
-c
":source
$VIMFILE
"
\
-c
":source
$temp
/colors.vim"
\
-c
":let g:html_use_css = 0"
\
-c
":let g:html_no_progress"
\
-c
":let g:html_number_lines = 1"
\
-c
":TOhtml"
\
-c
":wq! out.html"
-c
":q!"
1> /dev/null 2> /dev/null
fi
fi
}
}
if
[
"
$annotate_syntax
"
=
"yes"
]
;
then
if
[
"
$pdf
"
=
"yes"
]
;
then
ps2pdf
$temp
/out.ps
$temp
/out.pdf
output
=
"
$temp
/out.pdf"
if
[
"
$crop
"
=
"yes"
]
;
then
pdfcrop
$output
$temp
/outcrop.pdf
output
=
"
$temp
/outcrop.pdf"
fi
else
if
[
"
$annotate_syntax
"
=
"yes"
]
;
then
output
=
"
$(
awk
'{if($1=="ANNOTATION") print}'
$temp
/syntax.log 2>/dev/null
)
"
error
=
"
$(
awk
'{if($1=="ERROR") print}'
$temp
/syntax.log
>
&2 2>/dev/null
)
"
else
output
=
"
$(
cat
$temp
/out.html |
sed
's|^<title>.*</title>$||'
|
sed
's|^<meta.*$||'
)
"
fi
fi
output
=
"
$(
awk
'{if($1=="ANNOTATION") print}'
$temp
/syntax.log 2>/dev/null
)
"
error
=
"
$(
awk
'{if($1=="ERROR") print}'
$temp
/syntax.log
>
&2 2>/dev/null
)
"
if
[
"
$pdf
"
=
"yes"
]
;
then
if
[
-n
"
$outputfile
"
]
;
then
cp
$output
$outputfile
else
echo
"You should specify an output file if using pdf opton!"
exit
1
;
fi
else
output
=
"
$(
cat
$temp
/out.html |
sed
's|^<title>.*</title>$||'
|
sed
's|^<meta.*$||'
)
"
if
[
-n
"
$outputfile
"
]
;
then
echo
"
$output
"
>
"
$outputfile
"
else
echo
"
$output
"
fi
fi
if
[
-n
"
$outputfile
"
]
;
then
echo
"
$output
"
>
"
$outputfile
"
else
echo
"
$output
"
fi
echo
"
$error
"
>
&2
if
[
-n
"
$error
"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
src/reference/DRMSD.h
+
4
−
3
View file @
920fcc23
...
...
@@ -31,18 +31,19 @@ namespace PLMD {
class
DRMSD
:
public
SingleDomainRMSD
{
private:
bool
bounds_were_set
;
bool
nopbc
;
protected:
bool
bounds_were_set
;
double
lower
,
upper
;
std
::
map
<
std
::
pair
<
unsigned
,
unsigned
>
,
double
>
targets
;
void
setup_targets
();
public:
explicit
DRMSD
(
const
ReferenceConfigurationOptions
&
ro
);
/// This sets upper and lower bounds on distances to be used in DRMSD
void
setBoundsOnDistances
(
bool
dopbc
,
double
lbound
=
0.0
,
double
ubound
=
std
::
numeric_limits
<
double
>::
max
(
)
);
/// Check that similar comparisons are being performed - perhaps this is needed ask Davide? GAT
// void check( ReferenceConfiguration* , ReferenceConfiguration* );
void
read
(
const
PDB
&
);
virtual
void
read
(
const
PDB
&
);
virtual
void
setup_targets
();
void
setReferenceAtoms
(
const
std
::
vector
<
Vector
>&
conf
,
const
std
::
vector
<
double
>&
align_in
,
const
std
::
vector
<
double
>&
displace_in
);
double
calc
(
const
std
::
vector
<
Vector
>&
pos
,
const
Pbc
&
pbc
,
ReferenceValuePack
&
myder
,
const
bool
&
squared
)
const
;
};
...
...
This diff is collapsed.
Click to expand it.
user-doc/Installation.txt
+
56
−
0
View file @
920fcc23
...
...
@@ -504,6 +504,62 @@ Once ALMOST is installed, PLUMED 2 can then be configured with ALMOST enabled:
\endverbatim
with ALMOST_INSTALL_PATH set to the full path to the ALMOST installation folder.
\section installingonacluster Installing PLUMED on a cluster
If you are installing PLUMED on a cluster and you want several users to take advantage of it
consider the following suggestions.
First of all, we highly recommend using the module file that PLUMED provides to set up the environment.
Just edit it as necessary to make it suitable for your environment.
Notice that PLUMED can take advantage of many additionaly features if specific libraries are available upon
compiling it. Install libmatheval first and check if PLUMED `./configure` is detecting it. Libmatheval is a must have with PLUMED.
If someone uses gromacs, install libxdrfile first and check if PLUMED `./configure` is detecting it.
PLUMED will be able to write trr/xtc file, simplifying analysis.
Try to patch all MD codes with the `--runtime` option. This will allow independent update of PLUMED and MD codes.
Users will be able to combine any of the installed gromacs/amber/etc versions with any of the installed PLUMED versions.
Notice that it is sometime claimed that statically linked codes are faster. In our experience, this is not true.
In case you absolutely need a static executable, be ready to face non trivial linking issues. PLUMED is written in C++,
thus required the appropriate C++ library to be linked, and might require additional libraries (e.g. libmatheval).
Sometime we make small fixes on the patches. For this reason, keep track of which version of PLUMED you used
to patch each of the MD code. Perhaps you can call the MD code modules with names such as `gromacs/4.6.7p1`,
`gromacs/4.6.7p2` and write somewhere in the module file which version of PLUMED you used. Alternatively, call them
something like `gromacs/4.6.7p2.2.0`. In this way, when we report a bug on the mailing list, users will know if the version
they are using is affected by it.
Usually it is not necessary to install both a MPI and a non-MPI PLUMED version. PLUMED library only calls MPI functions
when the MD code is compiled with MPI. PLUMED executable calls MPI functions only when it is invoked without `--no-mpi`.
In many machines it is thus sufficient to run the plumed executable on the login node as
\verbatim
> plumed --no-mpi
\endverbatim
even though PLUMED was compiled with MPI and the login node does not support MPI.
The only case where you might need two different PLUMED installation for compute
and login node is when you are cross compiling.
PLUMED needs to be well optimized to run efficiently.
If you need a single PLUMED binary to run efficiency on machines with different levels of hardware (e.g.: some
of your workstations support AVX and some do not), with intel compiler you can use something like
\verbatim
./configure CXX=mpicxx CXXFLAGS="-O3 -axSSE2,AVX"
\endverbatim
It will take more time to compile but it will allow you to use a single module. Otherwise, you should install two
PLUMED version with different optimization levels.
Using modules, it is not necessary to make the PLUMED module explicitly dependent on the used library. Imagine a
scenario where you first installed a module `libmatheval`, then load it while you compile PLUMED. If you
provide the following option to configure `LDFLAGS="-Wl,-rpath,$LD_LIBRARY_PATH"`, the PLUMED executable and
library will remember where libmatheval is, without the need to load libmatheval module at runtime.
Notice that this trick often does not work for fundamental libraries such as C++ and MPI library. As a consequence,
usually the PLUMED module should load the compiler and MPI modules.
\attention
In case you found out how to compile PLUMED on some fancy architecture please share your tricks! You can
either post it in your blog, send it to the mailing list, or ask as to update this paragraph in the manual, we will
be happy to do so.
\section installinghints Other hints
We here collect a list of suggestions that might be useful on particular
...
...
This diff is collapsed.
Click to expand it.
vim/vimsyntax.sh
+
9
−
5
View file @
920fcc23
...
...
@@ -26,8 +26,8 @@ endif
let b:current_syntax="plumedf"
if exists("g:plumed_shortcuts")
map
<F3> :PMinus<CR>
map
<F4> :PPlus<CR>
noremap <buffer>
<F3> :PMinus<CR>
noremap <buffer>
<F4> :PPlus<CR>
endif
command! -nargs=0 -count=1 PPlus call PlumedMove(<count>)
...
...
@@ -145,15 +145,15 @@ endif
let b:current_syntax="plumed"
if exists("g:plumed_shortcuts")
noremap <
F2> <Esc>
:PHelp<CR>
inoremap <F2> <
C-o
>:PHelp<CR>
noremap <
buffer> <F2>
:PHelp<CR>
inoremap
<buffer>
<F2> <
Esc
>:PHelp<CR>
endif
" path for plumed plugin
let s:path=expand('<sfile>:p:h:h')
" All except space and hash are in word
set iskeyword=33,34,36-126
set
local
iskeyword=33,34,36-126
" Matching dots, possibly followed by a comment
" Only dots are part of the match
...
...
@@ -329,6 +329,10 @@ fun! PlumedContextManual()
execute 'rightbelow split | view ' name
endif
let b:plumed_helpfile=1
" this is to allow closing the window with F2
if exists("g:plumed_shortcuts")
noremap <buffer> <F2> :PHelp<CR>
endif
endif
endfunction
...
...
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