diff --git a/CHANGES/v2.0.txt b/CHANGES/v2.0.txt index f0845dd334fda5718dd1767ea2343e703a332090..26044559e3ce74d2436758df187c67075b13576d 100644 --- a/CHANGES/v2.0.txt +++ b/CHANGES/v2.0.txt @@ -6,19 +6,43 @@ Version 2.0.0 ------------- Version 2.0 is a complete rewrite, so there is no way to write a complete set of difference -with respect to plumed 1.3. Here is a summary of the difference: -- The input is simpler and more error proof. Many checks are now performed and in this way common errors are avoided. +with respect to plumed 1.3. Here is a possibly incomplete summary of the difference: +- The input is simpler, more flexible, and more error proof. Many checks are now performed and in this way common errors are avoided. - The units are now the same for all MD codes. If you want to use a different unit than the default you set it in the input file. - The analysis tools are now much more flexible. As an example of this it is now possible to write different collective variables with different frequencies - Many complex collective variables are considerably faster than they were in plumed1. In particular, all variables based on RMSD distances. - Centers of mass can be used as if they were atoms. Hence, unlike plumed 1.3, you can use center of mass positions in ALL collective variables. - The virial contribution is now computed and passed to the MD code. Plumed can thus now be used to perform biased NPT simulations +- Variables can be dumped on different files and with different files, and are + computed only when this is necessary. +- PLUMED is now compiled as a separate library. This simplifies the patching + procedure, but might require some extra work to configure PLUMED properly. + Since PLUMED can be loaded as a shared library, it is possible to setup + everything such that PLUMED and MD codes can be updated independently from each + other. In addition, it is now much easier to contribute new functionality to the code because: - There is a much simpler interface between plumed and the base MD codes. This makes it much easier to add plumed to a new MD code. - There is C++ object oriented programming and full compatibility with the C++ standard library -- A modular structure -- Developer and user documentation +- A modular structure +- New collective variables and methods can be released independently +- There is an extensive developer documentation +- User documentation is provided together inside the implementation files +- Interfacing with MD codes is simpler. Hopefully, in the future, these + interface will be maitained by the developers of the MD codes + independently from PLUMED developers. This will allow more MD codes + to be compatible with PLUMED. + +Caveats: +- PLUMED 2 input file (plumed.dat) has a syntax which is not + compatible with PLUMED 1. + Transition should be easy, but cannot + be done just using the new version with the old input file. +- PLUMED 2 is written in C++, thus requires a C++ compiler +- PLUMED 2 may not include all the features that were available + in PLUMED 1. + +A tutorial explaining how to move from PLUMED 1 to PLUMED 2 is available (see \ref moving). Version 2.0.1 ------------- diff --git a/src/colvar/Angle.cpp b/src/colvar/Angle.cpp index 35f8f7110046f28c5bb17368b145779cec58d09f..89eddcd97df73707bf779d56de317ea3030ecb20 100644 --- a/src/colvar/Angle.cpp +++ b/src/colvar/Angle.cpp @@ -37,8 +37,29 @@ Calculate an angle. This command can be used to compute the angle between three atoms. Alternatively if four atoms appear in the atom -specification it calculates the angle between the vector joining atoms 1 and 2 and that joining -atoms 3 and 4. +specification it calculates the angle between +two vectors identified by two pairs of atoms. + +If _three_ atoms are given, the angle is defined as: +\f[ +\theta=\arccos\left(\frac{ {\bf r}_{21}\cdot {\bf r}_{23}}{ +|{\bf r}_{21}| |{\bf r}_{23}|}\right) +\f] +Here \f$ {\bf r}_{ij}\f$ is the distance vector among the +i-th and the j-th listed atom. + +If _four_ atoms are given, the angle is defined as: +\f[ +\theta=\arccos\left(\frac{ {\bf r}_{21}\cdot {\bf r}_{34}}{ +|{\bf r}_{21}| |{\bf r}_{34}|}\right) +\f] + +Notice that angles defined in this way are non-periodic variables and +their value is limited by definition between 0 and \f$\pi\f$. + +The vectors \f$ {\bf r}_{ij}\f$ are by default evaluated taking +periodic boundary conditions into account. +This behavior can be changed with the NOPBC flag. \par Examples @@ -59,6 +80,7 @@ PRINT ARG=b FILE=COLVAR2 \endverbatim (see also \ref PRINT) + */ //+ENDPLUMEDOC diff --git a/src/colvar/Distance.cpp b/src/colvar/Distance.cpp index 6c82afc1cd5d61e2b10cad3bbe7db88f962f1e3f..f0b7cebb108df58a7a312702bb441c62d79e7c34 100644 --- a/src/colvar/Distance.cpp +++ b/src/colvar/Distance.cpp @@ -33,6 +33,9 @@ namespace colvar{ //+PLUMEDOC COLVAR DISTANCE /* Calculate the distance between a pair of atoms. +By default the distance is computed taking into account periodic +boundary conditions. This behavior can be changed with the NOPBC flag. +Moreover, single components (x,y, and z) can be also computed. \par Examples @@ -46,6 +49,37 @@ PRINT ARG=d1,d2,d2c.x \endverbatim (See also \ref PRINT). +The following input computes the end-to-end distance for a polymer +of 100 atoms and keeps it at a value around 5. +\verbatim +WHOLEMOLECULES ENTITY0=1-100 +e2e: DISTANCE ATOMS=1,100 NOPBC +RESTRAINT ARG=e2e KAPPA=1 AT=5 +\endverbatim +(See also \ref WHOLEMOLECULES and \ref RESTRAINT). + +Notice that NOPBC is used +to be sure that if the end-to-end distance is larger than half the simulation +box the distance is compute properly. Also notice that, since many MD +codes break molecules across cell boundary, it might be necessary to +use the \ref WHOLEMOLECULES keyword (also notice that it should be +_before_ distance). The list of atoms provided to WHOLEMOLECULES +here contains all the atoms between 1 and 100. Strictly speaking, this +is not necessary. If you know for sure that atoms with difference in +the index say equal to 10 are _not_ going to be farther than half cell +you can e.g. use +\verbatim +WHOLEMOLECULES ENTITY0=1,10,20,30,40,50,60,70,80,90,100 +e2e: DISTANCE ATOMS=1,100 NOPBC +RESTRAINT ARG=e2e KAPPA=1 AT=5 +\endverbatim +Just be sure that the ordered list provide to WHOLEMOLECULES has the following +properties: +- Consecutive atoms should be closer than half-cell throughout the entire simulation. +- Atoms required later for the distance (e.g. 1 and 100) should be included in the list + + + */ //+ENDPLUMEDOC diff --git a/user-doc/Intro.txt b/user-doc/Intro.txt index d243ef8923574b834b9b7009d7589924e1e272af..0ddd8af0a006680876ed32aea6ede9616fe91559 100644 --- a/user-doc/Intro.txt +++ b/user-doc/Intro.txt @@ -10,13 +10,15 @@ The original PLUMED 1 was highly successful and had over 1000 users. PLUMED 2 \ extensive rewrite of the original in a way that makes it more modular and thus easier to implement new methods, more straightforward to add it to MD codes and hopefully simpler to use. This is the user manual - if you want to modify PLUMED or to understand how it works internally, have a look at the -<a href="../../developer-doc/html/index.html"> developer manual </a>. Alternatively, to look at a list of the new -features available in PLUMED 2 and to work out how to install PLUMED 2 in your MD code check out: +<a href="../../developer-doc/html/index.html"> developer manual </a>. -- \subpage WhatsNew -- \subpage Installation +To know the difference between PLUMED 1 and PLUMED 2, and to +follow the development of PLUMED 2, you can checkout the detailed changelog: +- Changes for \ref CHANGES-2-0 -See also \ref CHANGES-2-0. +A short tutorial explaining how to move from PLUMED 1 to PLUMED 2 is also available (see \ref moving) + +To install PLUMED 2, see this page: \subpage Installation \section qintro A quick introduction diff --git a/user-doc/WhatsNew.txt b/user-doc/WhatsNew.txt deleted file mode 100644 index 9836803f383e996313bacb48bd0389e5b9d8c3f4..0000000000000000000000000000000000000000 --- a/user-doc/WhatsNew.txt +++ /dev/null @@ -1,44 +0,0 @@ -/** -\page WhatsNew What's new - -\section NewFeatures List of new features - -- Input file (plumed.dat) syntax is much more flexible and has more - error checking. Units are treated - consistently, so that the plumed.dat file can be ported from on - MD code to another. -- PLUMED is now compiled as a library, independently of the MD code. - This simplifies the patching procedure. Moreover, on systems where - this is possible, PLUMED library will be loaded runtime. This will - allow updating PLUMED without recompiling or relinking the MD code. -- Interfacing with MD codes is simpler. Hopefully, in the future, these - interface will be maitained by the developers of the MD codes - independently from PLUMED developers. This will allow more MD codes - to be compatible with PLUMED. -- It is now possible to develop and release collective variables, - free energy methods and other addons independently from PLUMED - developers. This will allow more collective variables and - free energy methods to be available. -- Correction to the virial is computed so that constant pressure simulations - are possible. -- Centers of mass can be used as if they were extra virtual atoms. Thus, - they can be used in any CV (e.g. also in RMSD, coordination, etc.). -- Different collective variables can be printed on different output files - and with a different stride. Moreover, variables are not computed on the - steps on which they are not necessary. This allows for more flexible - analysis (e.g. rarely computed heavy variables combined with often computed - light variables). -- And many others... - -Caveats: -- PLUMED 2 input file (plumed.dat) has a syntax which is not - compatible with PLUMED 1. - Transition should be easy, but cannot - be done just using the new version with the old input file. -- PLUMED 2 is written in C++, thus requires a C++ compiler -- PLUMED 2 may not include all the features that were available - in PLUMED 1. - -A tutorial explaining how to move from PLUMED 1 to PLUMED 2 is available (see \ref moving). - -*/