<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Src68</id>
	<title>Docswiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Src68"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php/Special:Contributions/Src68"/>
	<updated>2026-05-13T22:47:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Wales_Group_Version_control&amp;diff=1565</id>
		<title>Wales Group Version control</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Wales_Group_Version_control&amp;diff=1565"/>
		<updated>2020-01-06T23:22:05Z</updated>

		<summary type="html">&lt;p&gt;Src68: Added cautionary tale section to highlight lessons to be learnt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of 16th July 2008, all the group code is under version control. [[GMIN]], [[OPTIM]] and [[PATHSAMPLE]], along with the [[CHARMM]] and [[AMBER]] code used with them have been added to the repository, along with the official documentation. Changes to the documentation in the repository are automatically applied to the version on the website every night (at midnight) and the RSS feeds below are updated every ten minutes. The next step is to set up the nightly compilation and test suite for each code.&lt;br /&gt;
&lt;br /&gt;
There are instructions on how to set up your SVN details and obtain the group code on the [[SVN setup]] page.&lt;br /&gt;
&lt;br /&gt;
==RSS feeds==&lt;br /&gt;
&lt;br /&gt;
RSS feeds (including diffs of files that have been changed) are generated every 10 minutes from the SVN log files any uploaded to the Wales group web server [http://www-wales.ch.cam.ac.uk/rss/ here].  There is currently one feed per top level directory in the repository:&lt;br /&gt;
&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/trunk_log.xml trunk_log.xml] - contains the logs/diffs for every change to the code&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/gmin_log.xml gmin_log.xml] - only contains the logs/diffs when code in the GMIN directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/pathsample_log.xml pathsample_log.xml] - only contains the logs/diffs when code in the PATHSAMPLE directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/optim_log.xml optim_log.xml] - only contains the logs/diffs when code in the OPTIM directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/charmm_log.xml charmm_log.xml] - only contains the logs/diffs when code in the CHARMM31 directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/amber_log.xml amber_log.xml] - only contains the logs/diffs when code in the AMBER directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/nab_log.xml nab_log.xml] - only contains the logs/diffs when code in the NAB directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/disconnect_log.xml disconnect_log.xml] - only contains the logs/diffs when code in the DISCONNECT directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/doc_log.xml doc_log.xml] - only contains the logs/diffs when code in the DOC directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/scripts_log.xml scripts_log.xml] - only contains the logs/diffs when code in the SCRIPTS directory is changed&lt;br /&gt;
* [http://www-wales.ch.cam.ac.uk/rss/ambertools_log.xml ambertools_log.xml] - only contains the logs/diffs when code in the AMBERTOOLS directory is changed&lt;br /&gt;
&lt;br /&gt;
Using Firefox to look at the feeds is ok, but I suggest you set up a different RSS reader, such as [http://www.google.com/reader Google Reader] to keep them all in one place. Note that Google Reader has a delay in updating the feeds, so you won&#039;t see new logs up to an hour after they are created and are visible with Firefox.&lt;br /&gt;
&lt;br /&gt;
==Access restrictions==&lt;br /&gt;
Raven authentication has been re-enabled for the diffs only. You can view the feeds without logging in (as this allows email clients to be used), but if you are outside the department, you will need to log in via Raven to access the diffs linked from the feed. Also, the diffs directory is now excluded from Google and other bot searches. This should hopefully prevent chunks of code ending up on Google.&lt;br /&gt;
&lt;br /&gt;
==Usage tips==&lt;br /&gt;
What follows are a few suggestions to make using SVN a joyful experience (see cautionary tale below, to illustrate how it can go wrong). Please add any others you think are important! In general you should:&lt;br /&gt;
&lt;br /&gt;
* please be careful with svn commands. svn is a very powerful tool, and it is possible to revert all changes made over a long period, which is probably not what you want. Please consult before you revert changes made by other people. &lt;br /&gt;
* make sure you followed the setup instructions on the [[SVN setup]] page. The procedure includes setting up a template file to ensure that all logs are in the same basic format&lt;br /&gt;
* run &#039;svn update&#039; on a regular basis to ensure you have the latest bug fixes. It is also important to update regularly to detect any bugs that may have appeared due to changes elsewhere in the code. Please report any changes in behaviour that might indicate bugs.&lt;br /&gt;
* &#039;&#039;&#039;always&#039;&#039;&#039; do an &#039;svn update&#039; before you do &#039;svn commit&#039;&lt;br /&gt;
* don&#039;t forget &#039;svn add &amp;lt;filename&amp;gt;&#039; to schedule a new file for addition at the next commit!&lt;br /&gt;
* get into the habit of running &#039;svn diff&#039; before committing.  And looking closely at the output... Optionally, run &#039;svn diff | grep Index&#039; to see a summary list of the files that you have changed.  Try not to commit extra things you didn&#039;t mean to.&lt;br /&gt;
* commit your changes regularly. If you wait a two months before commit your changes, you&#039;re likely to have to resolve more conflicts in parts of the code that has been changed by others in the meantime.&lt;br /&gt;
* if you get a conflict (C flag) when running &#039;svn update&#039;, find out who introduced the change and talk to them about it to make sure you can introduce your code without damaging theirs.&lt;br /&gt;
* consider making a development branch (more on this on the [[SVN setup]] page) if your hacking is going to involve a lot of potentially disruptive changes over a significant period of time.  Talk to DJW and current developers about this first though...&lt;br /&gt;
&lt;br /&gt;
* to obtain a previous version of one file. In the svn directory where that file lives use svn -r with the revision number, the file name, and pipe the output to a target. For example, to obtain revision 36240 of commons.f90 use&lt;br /&gt;
svn -r 36240 cat commons.f90 &amp;gt; commons.f90.36240&lt;br /&gt;
* to see a log of svn commits use svn log in the appropriate directory. The log contains the changes entered by the user who made the commit. Please fill in relevant fields for the log when you make changes.&lt;br /&gt;
&lt;br /&gt;
==Cautionary Tale==&lt;br /&gt;
In August 2019 the author of this section (namely me) made an svn error that could have had potentially very damaging consequences. Being inexperienced with svn I followed the instructions to revert back to a previous version of the code, thinking I was just rolling back my own personal repo, clearly this was not the case and the whole repo was reverted back to a version from February 2019. &lt;br /&gt;
&lt;br /&gt;
If caught quickly this error is quick and easy to fix, however the missing features, which had been added between February and August were only noticed in Jan 2020. This meant that people had committed code to a much older version of the code and everything was out of line. Fortunately in this case some crafty svn work from John was able to put it right without too much pain, but lessons should be learnt. At this stage I just want to say a quick sorry for the trouble caused and feel like I&#039;ve at least learnt from it. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lessons to be learnt:&lt;br /&gt;
* ask for advice from more experienced members when committing if you&#039;re unsure.&lt;br /&gt;
* try to make regular updates to your personal repo so that these errors can be spotted more quickly in the future.&lt;br /&gt;
&lt;br /&gt;
==Papers==&lt;br /&gt;
We have a repository for preparing papers too: see [[Papers_in_preparation]] for information.&lt;/div&gt;</summary>
		<author><name>Src68</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=SVN_setup&amp;diff=1564</id>
		<title>SVN setup</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=SVN_setup&amp;diff=1564"/>
		<updated>2020-01-06T23:06:53Z</updated>

		<summary type="html">&lt;p&gt;Src68: /* Useful svn commands and good practice */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The group code is now managed under Subversion (SVN) version control. What follows is a quick setup guide to get you up and running with the Wales Group codes - [[GMIN]], [[OPTIM]] and [[PATHSAMPLE]]. Once you are set up with the source code and are happy compiling it, you should read the best practice tips on the group [[Wales Group Version control | version control ]] page.&lt;br /&gt;
&lt;br /&gt;
===Getting an account on the SVN server===&lt;br /&gt;
You should email or speak to David (dw34) or Rosie (rgm38) to request access to the Wales Group repository. Make sure you let us know your your CRSID, the bit before @cam.ac.uk in your email address. &lt;br /&gt;
&lt;br /&gt;
Once they reply, you should be able to log in using your Active Directory (AD)/Admitto password. If you&#039;re not sure what your AD password is, or have lost it - you can get one [http://www-co.ch.cam.ac.uk/facilities/ad/ here] To check, try logging in [https://svn.ch.cam.ac.uk/svn/wales/groups/wales/trunk/ here]. If you can&#039;t, you&#039;ve done something wrong! Get help!&lt;br /&gt;
&lt;br /&gt;
===Setting up your SVN details===&lt;br /&gt;
Open a shell on the machine where you plan on using the group code. To make subversion easy to use, you need to specify some locations in your .bashrc file as environment variables. We do this as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This opens the &#039;&#039;&#039;vi&#039;&#039;&#039; editor. Press &#039;&#039;&#039;SHIFT+G&#039;&#039;&#039; to go to the bottom of the file, then press &#039;&#039;&#039;I&#039;&#039;&#039; to enter insert mode. Add the following to the bottom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SVN=https://svn.ch.cam.ac.uk/svn/wales/groups/wales&lt;br /&gt;
export PAPERSSVN=https://svn.ch.cam.ac.uk/svn/wales/groups/djwpapers&lt;br /&gt;
export MYSVN=https://svn.ch.cam.ac.uk/svn/CRSID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where CRSID is the user name you use to log into Raven with. The PAPERSSVN repository contains papers in preparation, while the SVN repository contains the group codes. When you&#039;re done, we need to save he changes, press &#039;&#039;&#039;ESC&#039;&#039;&#039; to exit insert mode (check &#039;Insert&#039; isn&#039;t still showing at the bottom!) and then type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:wq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and press &#039;&#039;&#039;ENTER&#039;&#039;&#039;. This should exit the editor, and return you to the directory you were in before. These variables will now be automatically set when you open a new shell, but for now, we need to load them manually. We do this using the source command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We&#039;re now ready to check if you have access to the repository from your chosen machine. Lets try listing the contents of the trunk directory. Type the following ($SVN is the environmental variable we set to the location of the Wales Group repository above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn ls $SVN/trunk &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may be prompted to validate a security certificate so press &#039;&#039;&#039;p&#039;&#039;&#039; and then &#039;&#039;&#039;ENTER&#039;&#039;&#039; to accept it permanently. Now enter the password you set above (you should only need to do this once!). You should see a list of the directories in the repository, something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AMBER/&lt;br /&gt;
AMBERTOOLS/&lt;br /&gt;
BLAS/&lt;br /&gt;
CAMSHIFTDATA/&lt;br /&gt;
CHARMM31/&lt;br /&gt;
CHARMM35/&lt;br /&gt;
CMakeModules/&lt;br /&gt;
COPYING&lt;br /&gt;
DISCONNECT/&lt;br /&gt;
DOC/&lt;br /&gt;
GMIN/&lt;br /&gt;
INCLUDE/&lt;br /&gt;
LAPACK/&lt;br /&gt;
NAB/&lt;br /&gt;
OPTIM/&lt;br /&gt;
PATHSAMPLE/&lt;br /&gt;
PLUGINS/&lt;br /&gt;
SCRIPTS/&lt;br /&gt;
THESES/&lt;br /&gt;
UTILS/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
NOTE: The &#039;trunk&#039; contains the non-developmental version of the group codes. &lt;br /&gt;
&lt;br /&gt;
Finally, before you download the code, you need to set up the log file template. This ensures that everyone submitting changes to the repository writes their log files in a similar fashion. Firstly, we need to edit the SVN config file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/.subversion/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is a section in the config file that begins as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# [helpers]&lt;br /&gt;
# editor-cmd = editor (vi, emacs, notepad, etc.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should be changed to the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[helpers]&lt;br /&gt;
editor-cmd = vim +&amp;quot;r ~/template&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tell subversion to open the file /home/CRSID/template when it asks for a commit log message to be written. &lt;br /&gt;
&lt;br /&gt;
Interlude: while you&#039;re editing the config file, there are some other useful changes you may want to make.  To have svn ignore various types of unversioned file (e.g. the products of a compilation) in the report from &#039;svn status&#039;, find the section labelled&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[miscellany]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(it may be commented out with a # currently).  Make sure it is uncommented (remove the #) and has no preceeding spaces on the line.  Then, add a line underneath it like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
global-ignores = *.o *.mod lib*.a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can use wildcards and give all the suffixes you want to ignore, or even give explicit filenames if you want, separated by spaces as above.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create the commit template file now&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/template&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Enter insert mode by pressing &#039;&#039;&#039;i&#039;&#039;&#039; and paste the following into vi:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;one line summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PROGRAM&lt;br /&gt;
-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SUMMARY OF CHANGES &lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SUBROUTINES AFFECTED&lt;br /&gt;
--------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KEYWORDS AFFECTED&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KNOWN ISSUES &lt;br /&gt;
------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Save the file by pressing &#039;&#039;&#039;ESC&#039;&#039;&#039; and then typing &#039;&#039;&#039;:wq&#039;&#039;&#039;. When committing, the first line of the template should be replaced with a one line summary of your changes.  You&#039;re now good to download the group code :)&lt;br /&gt;
&lt;br /&gt;
===&#039;Checking out&#039; the code===&lt;br /&gt;
The first time you want to access the code, you need to &#039;check it out&#039;. This will pull the code from the repository into a local directory for your use. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING: It has been found that if you put the svn directory too far from your /home/CRSID/, you will not be able to compile the CHARMM source. This is most likely due to the variable CHARMM uses to contain the locations of files is of a limited length! We hope to fix this problem, but for now you need to ensure it is close enough. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the furthest the CHARMM31 directory within the repository can be from your home, without causing errors. Adding one more &#039;x&#039; to the svn directory name will cause problems. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/csw34/svnxxxxxxxxxxx/CHARMM31&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As a result, it is HIGHLY recommended that you transfer the code to ~/svn as shown below. This also prevents you from having to edit Makefiles more than is absolutely necessary. The code is checked out as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/trunk ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Notice that I&#039;m transferring the code to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/csw34/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This path is clearly shorter than that above, and so we should have no problem compiling CHARMM if we choose to do so. You&#039;ll need to wait a while for the code to transfer! Once it has finished, you&#039;ll see a message like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Checked out revision 9853.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The number given is the version number you have just obtained. Whenever changes are make to the code and uploaded to the repository, this number is incremented. It might be increased by more than one between versions as the counter is common for all software on the SVN server, not just ours! That&#039;s it! You now have a copy of the group codes. Here are a few notes on its structure for new users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;GMIN/source&#039;&#039;&#039; contains the [[GMIN]] source code itself.&lt;br /&gt;
* &#039;&#039;&#039;GMIN/bin&#039;&#039;&#039; contains the GMIN binaries when they are compiled.&lt;br /&gt;
* &#039;&#039;&#039;PATHSAMPLE&#039;&#039;&#039; contains the [[PATHSAMPLE]] code. It has the same directory structure as [[GMIN]].&lt;br /&gt;
* &#039;&#039;&#039;OPTIM&#039;&#039;&#039; contains the [[OPTIM]] code. It has the same directory structure as [[GMIN]] also.&lt;br /&gt;
* &#039;&#039;&#039;AMBER&#039;&#039;&#039; contains the [[AMBER]]9 source code. &lt;br /&gt;
* &#039;&#039;&#039;NAB&#039;&#039;&#039; contains the [[AMBER]]9 nucleic acid builder (NAB) source code. &lt;br /&gt;
* &#039;&#039;&#039;LAPACK&#039;&#039;&#039; and &#039;&#039;&#039;BLAS&#039;&#039;&#039; contain the maths libraries used by all the group code.&lt;br /&gt;
* &#039;&#039;&#039;CHARMM31&#039;&#039;&#039; contains the [[CHARMM]] source code. You need to compile [[CHARMM]] before you compile [[GMIN]] with it, and you must use the same compiler in both cases. If you don&#039;t you&#039;ll get errors. The [[OPTIM]] compilation automatically recompiles [[CHARMM]] if necessary.&lt;br /&gt;
*&#039;&#039;&#039;DOC&#039;&#039;&#039; contains the documentation for [[GMIN]], [[OPTIM]] and [[PATHSAMPLE]]. Whenever you introduce a new keyword or feature, it should be documented.&lt;br /&gt;
*&#039;&#039;&#039;SCRIPTS&#039;&#039;&#039; contains useful scripts developed by members of the group. For example, perm-pdb.py generates an OPTIM perm.allow file from an input PDB.&lt;br /&gt;
*&#039;&#039;&#039;AMBERTOOLS&#039;&#039;&#039; contains the full version of Amber Tools 1.2 with our updated LeaP files to fix forcefield problems we have encountered using AMBER9.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: If you want to use OPTIM with the new C++ implementation of the NEB routine, you will need to obtain the source code for that separately. See [https://wikis.ch.cam.ac.uk/wales/wiki/index.php/OPTIM here] for instructions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: If you want to use AMBER you will have to copy the libraries for the N-terminal (everything with nt) from AMBERTOOLS to $AMBERHOME/dat/leap/lib. Otherwise, you will potentially use unsymmetrised force field parameters.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now that you have the source codes, you should try to compile and test it. You can find a tutorial on using cmake to compile GMIN [[Compiling GMIN using CMAKE | here]]. If you&#039;d rather not use cmake, or are having problems, a brief tutorial on compiling GMIN with CHARMM just using make can be found [[Compiling GMIN with CHARMM | here]].&lt;br /&gt;
&lt;br /&gt;
===Useful svn commands and good practice===&lt;br /&gt;
Info on the commands you&#039;ll need to use to add your changes to the code, and retrieve the updates from the repository can be found on the Theory Sector [[SVN Page]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING: svn commit is very powerful and it can be easy to misuse it, therefore it is strongly encouraged to ask for advice from more experienced users when using for the first time or doing something different. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GOOD PRACTICE: keep your code up to date with the trunk by regularly updating and committing changes as this will make your life easier and breakages and errors will be spotted more quickly.&lt;br /&gt;
&lt;br /&gt;
* revert a file in the repository to revision xx &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -c -xx &amp;lt;fname&amp;gt; &lt;br /&gt;
&lt;br /&gt;
svn commit &amp;lt;fname&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* revert the entire repository to revision xx with yy being the last revision to be removed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -r yy:xx $SVN/trunk &lt;br /&gt;
&lt;br /&gt;
svn commit  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So for example to revert to revision 33122 and removing all revision up to 33134:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -r 33134:33122 $SVN/trunk &lt;br /&gt;
&lt;br /&gt;
svn commit  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The &#039;release&#039; branch===&lt;br /&gt;
When you follow the instructions above, you are checking out the group development branch. This version of the code is what we are all working on together. As a result, it is possible that at any time, it might be somehow broken, we&#039;re only human after all! &lt;br /&gt;
&lt;br /&gt;
If you are not going to be altering the code yourself and would like a stable (if possibly slightly outdated) version of the codes that should at least always compile, you can check out the current release branch code. We use this to produce the code tarballs on the website for collaborators without access to the repository. To do this, you need to follow the instructions above, but when it comes to checking out the code, replace this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/trunk ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/release ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then compile the codes as normal. You should &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;NEVER&#039;&#039;&#039; commit anything to the release branch&amp;lt;/font&amp;gt;. The branch is updated by merging changes in from the main trunk at regular intervals once the code has been checked. If you want to modify the code yourself, check out the &#039;trunk&#039; as normal above. If you do accidentally commit a change - please revert it. If you are unsure how to do this, tell Chris or Jo ASAP!  &lt;br /&gt;
&lt;br /&gt;
Another alternative is to create your own personal development branch as detailed below. This can be useful if you&#039;d like to be able to commit intermediate bits of your new code without having to worry about breaking things for everyone else. Please make sure that you merge in your changes when you are sure everything is working :)&lt;br /&gt;
&lt;br /&gt;
===Personal development branches===&lt;br /&gt;
At the same level as $SVN/trunk/ in the repository is a directory $SVN/branches/ .  This is the place where the development branches live.  A dev branch is a copy of a particular revision of trunk/ (or the subdirectory in trunk/ for one of the programs if the work is going to be that localized...).  They are made with the &#039;svn copy ...&#039; command, and mean that potentially disruptive work can be under version control whilst leaving the trunk stable and well-behaved.  The basic work cycle is:&lt;br /&gt;
* make the branch with the svn copy .... command&lt;br /&gt;
* check out a working copy of the new branch&lt;br /&gt;
* make changes in your working copy and commit them, in the usual way&lt;br /&gt;
* keep an eye on what&#039;s being committed to trunk during this time.  Pull the changes on trunk between when you make the branch and the current head into your branch by merging.  This will make sure you have the latest bug fixes etc.  You can merge as many times as you need, bringing in the changes on trunk between different pairs of revision numbers as time passes. Just make sure you don&#039;t try to merge the same changeset into your branch twice.&lt;br /&gt;
* make more commits on your branch.  After testing, you find your shiny new code is ready to go into the trunk for distribution etc.&lt;br /&gt;
* do one more merge of the latest trunk changesets (since the previous such merge) into your branch&lt;br /&gt;
* merge the changes on your branch since its creation into trunk&lt;br /&gt;
* do something else now... :-)&lt;br /&gt;
&lt;br /&gt;
In the above list, for trunk read &amp;quot;trunk or the subdirectory in trunk/ for one of the programs&amp;quot;, i.e. whichever directory you specified in the original svn copy to make the branch.&lt;br /&gt;
&lt;br /&gt;
See  [[Branching and Merging | here ]] for more info on the svn commands for branching and merging.&lt;br /&gt;
&lt;br /&gt;
===RSS feeds===&lt;br /&gt;
As an added feature, we have set up RSS feeds for the SVN logs. This means that when you commit a change, the source you submitted is automatically diff&#039;d against the previous version, and differences uploaded to the feed, along with the corresponding log message. More info on the feed locations can be found on the group [[Wales Group Version control | version control ]] page.&lt;br /&gt;
&lt;br /&gt;
== Using git-svn ==&lt;br /&gt;
Git can interface nicely with svn.&lt;br /&gt;
&lt;br /&gt;
=== Why use git? ===&lt;br /&gt;
Git is a more modern version control system than svn which has lots of very nice features that svn doesn&#039;t.  &lt;br /&gt;
* You have an entire copy of the repository locally so you can use git log, git diff, and checkout and older version of the software without needing to contact the svn server with every command.&lt;br /&gt;
* You can make lots of commits locally before contacting the server.  You only need to contact the svn server when you want to get changes from the server or push your changes to the server.  This is nice because you can work on a section of the code for days, weeks or months and have all your work under local version control, but only push your changes to the server when you think it&#039;s ready for prime time.&lt;br /&gt;
* Making new local branches is completely trivial so you can easily work on two logically separate things (e.g. experimenting with a new potential in GMIN and adding a feature to disconnectDPS) at the same time within the same repository. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone the svn repository ===&lt;br /&gt;
To clone the svn repository, just copy your old stuff in ~/svn to somewhere else for safekeeping. Then,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn clone https://svn.ch.cam.ac.uk/svn/wales/groups/wales/trunk/ svn/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
will download the repository to a new directory svn/&lt;br /&gt;
Sometimes that stalls midway through the download, so just run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
until it works.&lt;br /&gt;
&lt;br /&gt;
Here is a good git [http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet-detail/ cheat-sheet] written for svn users&lt;br /&gt;
&lt;br /&gt;
=== Basic Working Cycle ===&lt;br /&gt;
&lt;br /&gt;
The basic cycle assumes you&#039;re doing all your work on the master branch.&lt;br /&gt;
The first step is to sync your local repository with the server&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For git experts: it is important to use rebase here instead of merge because svn&lt;br /&gt;
can only deal with linear histories.&lt;br /&gt;
&lt;br /&gt;
Next make some changes to the files and commit the changes&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -a -m &amp;quot;here is my commit message&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensure that the local repository is up to date and push the commit (or commits) back to the server.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Useful tools ===&lt;br /&gt;
The following git commands are very useful tools and pretty self explanatory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git log&lt;br /&gt;
git diff&lt;br /&gt;
git grep&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, the gui gitk is very useful for visually inspecting the history&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gitk --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced working cycle ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more advanced working cycle would take advantage of the powerful branching &lt;br /&gt;
ability of git.  First make a working branch. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch mybranch&lt;br /&gt;
git checkout mybranch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make changes and commit them to mybranch.  Multiple commits are fine.  &lt;br /&gt;
&lt;br /&gt;
Sync your branch remotes/git-svn with the svn server (this is doing in two steps what `git svn rebase` would do in one)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Bring your working branch up to date&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rebase remotes/git-svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
push your commits to the svn server&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It is important to use git rebase rather than git merge because it maintains a purely linear commit history, which is necessary for easy communication with the svn server.  Before using dcommit, ensure that the changes you want to commit are arranged in a nicely linear manner on top of remotes/git-svn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gitk --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is a good tool for examining the branch structure of your repository and making sure everything is linear before a dcommit.&lt;br /&gt;
&lt;br /&gt;
Note that &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is a shorcut for the two commands&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
git rebase remotes/git-svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Squashing commits ====&lt;br /&gt;
It is good to make many small commits when working locally, but when pushing to the trunk it you might want to just make a few, very well-commented commits. You can squash multiple git commits into one single commit and change the commit message at the same time using rebase.&lt;br /&gt;
&lt;br /&gt;
To squash your last four commits together, use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rebase -i HEAD~4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For step-by-step instructions, [http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html look here].&lt;/div&gt;</summary>
		<author><name>Src68</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=SVN_setup&amp;diff=1563</id>
		<title>SVN setup</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=SVN_setup&amp;diff=1563"/>
		<updated>2020-01-06T23:05:47Z</updated>

		<summary type="html">&lt;p&gt;Src68: /* Useful svn commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The group code is now managed under Subversion (SVN) version control. What follows is a quick setup guide to get you up and running with the Wales Group codes - [[GMIN]], [[OPTIM]] and [[PATHSAMPLE]]. Once you are set up with the source code and are happy compiling it, you should read the best practice tips on the group [[Wales Group Version control | version control ]] page.&lt;br /&gt;
&lt;br /&gt;
===Getting an account on the SVN server===&lt;br /&gt;
You should email or speak to David (dw34) or Rosie (rgm38) to request access to the Wales Group repository. Make sure you let us know your your CRSID, the bit before @cam.ac.uk in your email address. &lt;br /&gt;
&lt;br /&gt;
Once they reply, you should be able to log in using your Active Directory (AD)/Admitto password. If you&#039;re not sure what your AD password is, or have lost it - you can get one [http://www-co.ch.cam.ac.uk/facilities/ad/ here] To check, try logging in [https://svn.ch.cam.ac.uk/svn/wales/groups/wales/trunk/ here]. If you can&#039;t, you&#039;ve done something wrong! Get help!&lt;br /&gt;
&lt;br /&gt;
===Setting up your SVN details===&lt;br /&gt;
Open a shell on the machine where you plan on using the group code. To make subversion easy to use, you need to specify some locations in your .bashrc file as environment variables. We do this as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This opens the &#039;&#039;&#039;vi&#039;&#039;&#039; editor. Press &#039;&#039;&#039;SHIFT+G&#039;&#039;&#039; to go to the bottom of the file, then press &#039;&#039;&#039;I&#039;&#039;&#039; to enter insert mode. Add the following to the bottom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SVN=https://svn.ch.cam.ac.uk/svn/wales/groups/wales&lt;br /&gt;
export PAPERSSVN=https://svn.ch.cam.ac.uk/svn/wales/groups/djwpapers&lt;br /&gt;
export MYSVN=https://svn.ch.cam.ac.uk/svn/CRSID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where CRSID is the user name you use to log into Raven with. The PAPERSSVN repository contains papers in preparation, while the SVN repository contains the group codes. When you&#039;re done, we need to save he changes, press &#039;&#039;&#039;ESC&#039;&#039;&#039; to exit insert mode (check &#039;Insert&#039; isn&#039;t still showing at the bottom!) and then type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
:wq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and press &#039;&#039;&#039;ENTER&#039;&#039;&#039;. This should exit the editor, and return you to the directory you were in before. These variables will now be automatically set when you open a new shell, but for now, we need to load them manually. We do this using the source command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We&#039;re now ready to check if you have access to the repository from your chosen machine. Lets try listing the contents of the trunk directory. Type the following ($SVN is the environmental variable we set to the location of the Wales Group repository above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn ls $SVN/trunk &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may be prompted to validate a security certificate so press &#039;&#039;&#039;p&#039;&#039;&#039; and then &#039;&#039;&#039;ENTER&#039;&#039;&#039; to accept it permanently. Now enter the password you set above (you should only need to do this once!). You should see a list of the directories in the repository, something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AMBER/&lt;br /&gt;
AMBERTOOLS/&lt;br /&gt;
BLAS/&lt;br /&gt;
CAMSHIFTDATA/&lt;br /&gt;
CHARMM31/&lt;br /&gt;
CHARMM35/&lt;br /&gt;
CMakeModules/&lt;br /&gt;
COPYING&lt;br /&gt;
DISCONNECT/&lt;br /&gt;
DOC/&lt;br /&gt;
GMIN/&lt;br /&gt;
INCLUDE/&lt;br /&gt;
LAPACK/&lt;br /&gt;
NAB/&lt;br /&gt;
OPTIM/&lt;br /&gt;
PATHSAMPLE/&lt;br /&gt;
PLUGINS/&lt;br /&gt;
SCRIPTS/&lt;br /&gt;
THESES/&lt;br /&gt;
UTILS/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
NOTE: The &#039;trunk&#039; contains the non-developmental version of the group codes. &lt;br /&gt;
&lt;br /&gt;
Finally, before you download the code, you need to set up the log file template. This ensures that everyone submitting changes to the repository writes their log files in a similar fashion. Firstly, we need to edit the SVN config file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/.subversion/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is a section in the config file that begins as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# [helpers]&lt;br /&gt;
# editor-cmd = editor (vi, emacs, notepad, etc.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should be changed to the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[helpers]&lt;br /&gt;
editor-cmd = vim +&amp;quot;r ~/template&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tell subversion to open the file /home/CRSID/template when it asks for a commit log message to be written. &lt;br /&gt;
&lt;br /&gt;
Interlude: while you&#039;re editing the config file, there are some other useful changes you may want to make.  To have svn ignore various types of unversioned file (e.g. the products of a compilation) in the report from &#039;svn status&#039;, find the section labelled&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[miscellany]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(it may be commented out with a # currently).  Make sure it is uncommented (remove the #) and has no preceeding spaces on the line.  Then, add a line underneath it like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
global-ignores = *.o *.mod lib*.a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can use wildcards and give all the suffixes you want to ignore, or even give explicit filenames if you want, separated by spaces as above.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create the commit template file now&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi ~/template&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Enter insert mode by pressing &#039;&#039;&#039;i&#039;&#039;&#039; and paste the following into vi:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;one line summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PROGRAM&lt;br /&gt;
-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SUMMARY OF CHANGES &lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SUBROUTINES AFFECTED&lt;br /&gt;
--------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KEYWORDS AFFECTED&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KNOWN ISSUES &lt;br /&gt;
------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Save the file by pressing &#039;&#039;&#039;ESC&#039;&#039;&#039; and then typing &#039;&#039;&#039;:wq&#039;&#039;&#039;. When committing, the first line of the template should be replaced with a one line summary of your changes.  You&#039;re now good to download the group code :)&lt;br /&gt;
&lt;br /&gt;
===&#039;Checking out&#039; the code===&lt;br /&gt;
The first time you want to access the code, you need to &#039;check it out&#039;. This will pull the code from the repository into a local directory for your use. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING: It has been found that if you put the svn directory too far from your /home/CRSID/, you will not be able to compile the CHARMM source. This is most likely due to the variable CHARMM uses to contain the locations of files is of a limited length! We hope to fix this problem, but for now you need to ensure it is close enough. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the furthest the CHARMM31 directory within the repository can be from your home, without causing errors. Adding one more &#039;x&#039; to the svn directory name will cause problems. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/csw34/svnxxxxxxxxxxx/CHARMM31&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As a result, it is HIGHLY recommended that you transfer the code to ~/svn as shown below. This also prevents you from having to edit Makefiles more than is absolutely necessary. The code is checked out as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/trunk ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Notice that I&#039;m transferring the code to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/home/csw34/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This path is clearly shorter than that above, and so we should have no problem compiling CHARMM if we choose to do so. You&#039;ll need to wait a while for the code to transfer! Once it has finished, you&#039;ll see a message like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Checked out revision 9853.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The number given is the version number you have just obtained. Whenever changes are make to the code and uploaded to the repository, this number is incremented. It might be increased by more than one between versions as the counter is common for all software on the SVN server, not just ours! That&#039;s it! You now have a copy of the group codes. Here are a few notes on its structure for new users.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;GMIN/source&#039;&#039;&#039; contains the [[GMIN]] source code itself.&lt;br /&gt;
* &#039;&#039;&#039;GMIN/bin&#039;&#039;&#039; contains the GMIN binaries when they are compiled.&lt;br /&gt;
* &#039;&#039;&#039;PATHSAMPLE&#039;&#039;&#039; contains the [[PATHSAMPLE]] code. It has the same directory structure as [[GMIN]].&lt;br /&gt;
* &#039;&#039;&#039;OPTIM&#039;&#039;&#039; contains the [[OPTIM]] code. It has the same directory structure as [[GMIN]] also.&lt;br /&gt;
* &#039;&#039;&#039;AMBER&#039;&#039;&#039; contains the [[AMBER]]9 source code. &lt;br /&gt;
* &#039;&#039;&#039;NAB&#039;&#039;&#039; contains the [[AMBER]]9 nucleic acid builder (NAB) source code. &lt;br /&gt;
* &#039;&#039;&#039;LAPACK&#039;&#039;&#039; and &#039;&#039;&#039;BLAS&#039;&#039;&#039; contain the maths libraries used by all the group code.&lt;br /&gt;
* &#039;&#039;&#039;CHARMM31&#039;&#039;&#039; contains the [[CHARMM]] source code. You need to compile [[CHARMM]] before you compile [[GMIN]] with it, and you must use the same compiler in both cases. If you don&#039;t you&#039;ll get errors. The [[OPTIM]] compilation automatically recompiles [[CHARMM]] if necessary.&lt;br /&gt;
*&#039;&#039;&#039;DOC&#039;&#039;&#039; contains the documentation for [[GMIN]], [[OPTIM]] and [[PATHSAMPLE]]. Whenever you introduce a new keyword or feature, it should be documented.&lt;br /&gt;
*&#039;&#039;&#039;SCRIPTS&#039;&#039;&#039; contains useful scripts developed by members of the group. For example, perm-pdb.py generates an OPTIM perm.allow file from an input PDB.&lt;br /&gt;
*&#039;&#039;&#039;AMBERTOOLS&#039;&#039;&#039; contains the full version of Amber Tools 1.2 with our updated LeaP files to fix forcefield problems we have encountered using AMBER9.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: If you want to use OPTIM with the new C++ implementation of the NEB routine, you will need to obtain the source code for that separately. See [https://wikis.ch.cam.ac.uk/wales/wiki/index.php/OPTIM here] for instructions.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: If you want to use AMBER you will have to copy the libraries for the N-terminal (everything with nt) from AMBERTOOLS to $AMBERHOME/dat/leap/lib. Otherwise, you will potentially use unsymmetrised force field parameters.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now that you have the source codes, you should try to compile and test it. You can find a tutorial on using cmake to compile GMIN [[Compiling GMIN using CMAKE | here]]. If you&#039;d rather not use cmake, or are having problems, a brief tutorial on compiling GMIN with CHARMM just using make can be found [[Compiling GMIN with CHARMM | here]].&lt;br /&gt;
&lt;br /&gt;
===Useful svn commands and good practice===&lt;br /&gt;
Info on the commands you&#039;ll need to use to add your changes to the code, and retrieve the updates from the repository can be found on the Theory Sector [[SVN Page]].&lt;br /&gt;
&lt;br /&gt;
WARNING: svn commit is very powerful and it can be easy to misuse it, therefore it is strongly encouraged to ask for advice from more experienced users when using for the first time or doing something different. &lt;br /&gt;
&lt;br /&gt;
GOOD PRACTICE: keep your code up to date with the trunk by regularly updating and committing changes as this will make your life easier and breakages and errors will be spotted more quickly.&lt;br /&gt;
&lt;br /&gt;
* revert a file in the repository to revision xx &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -c -xx &amp;lt;fname&amp;gt; &lt;br /&gt;
&lt;br /&gt;
svn commit &amp;lt;fname&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* revert the entire repository to revision xx with yy being the last revision to be removed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -r yy:xx $SVN/trunk &lt;br /&gt;
&lt;br /&gt;
svn commit  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So for example to revert to revision 33122 and removing all revision up to 33134:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn merge -r 33134:33122 $SVN/trunk &lt;br /&gt;
&lt;br /&gt;
svn commit  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The &#039;release&#039; branch===&lt;br /&gt;
When you follow the instructions above, you are checking out the group development branch. This version of the code is what we are all working on together. As a result, it is possible that at any time, it might be somehow broken, we&#039;re only human after all! &lt;br /&gt;
&lt;br /&gt;
If you are not going to be altering the code yourself and would like a stable (if possibly slightly outdated) version of the codes that should at least always compile, you can check out the current release branch code. We use this to produce the code tarballs on the website for collaborators without access to the repository. To do this, you need to follow the instructions above, but when it comes to checking out the code, replace this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/trunk ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co $SVN/release ~/svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then compile the codes as normal. You should &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;NEVER&#039;&#039;&#039; commit anything to the release branch&amp;lt;/font&amp;gt;. The branch is updated by merging changes in from the main trunk at regular intervals once the code has been checked. If you want to modify the code yourself, check out the &#039;trunk&#039; as normal above. If you do accidentally commit a change - please revert it. If you are unsure how to do this, tell Chris or Jo ASAP!  &lt;br /&gt;
&lt;br /&gt;
Another alternative is to create your own personal development branch as detailed below. This can be useful if you&#039;d like to be able to commit intermediate bits of your new code without having to worry about breaking things for everyone else. Please make sure that you merge in your changes when you are sure everything is working :)&lt;br /&gt;
&lt;br /&gt;
===Personal development branches===&lt;br /&gt;
At the same level as $SVN/trunk/ in the repository is a directory $SVN/branches/ .  This is the place where the development branches live.  A dev branch is a copy of a particular revision of trunk/ (or the subdirectory in trunk/ for one of the programs if the work is going to be that localized...).  They are made with the &#039;svn copy ...&#039; command, and mean that potentially disruptive work can be under version control whilst leaving the trunk stable and well-behaved.  The basic work cycle is:&lt;br /&gt;
* make the branch with the svn copy .... command&lt;br /&gt;
* check out a working copy of the new branch&lt;br /&gt;
* make changes in your working copy and commit them, in the usual way&lt;br /&gt;
* keep an eye on what&#039;s being committed to trunk during this time.  Pull the changes on trunk between when you make the branch and the current head into your branch by merging.  This will make sure you have the latest bug fixes etc.  You can merge as many times as you need, bringing in the changes on trunk between different pairs of revision numbers as time passes. Just make sure you don&#039;t try to merge the same changeset into your branch twice.&lt;br /&gt;
* make more commits on your branch.  After testing, you find your shiny new code is ready to go into the trunk for distribution etc.&lt;br /&gt;
* do one more merge of the latest trunk changesets (since the previous such merge) into your branch&lt;br /&gt;
* merge the changes on your branch since its creation into trunk&lt;br /&gt;
* do something else now... :-)&lt;br /&gt;
&lt;br /&gt;
In the above list, for trunk read &amp;quot;trunk or the subdirectory in trunk/ for one of the programs&amp;quot;, i.e. whichever directory you specified in the original svn copy to make the branch.&lt;br /&gt;
&lt;br /&gt;
See  [[Branching and Merging | here ]] for more info on the svn commands for branching and merging.&lt;br /&gt;
&lt;br /&gt;
===RSS feeds===&lt;br /&gt;
As an added feature, we have set up RSS feeds for the SVN logs. This means that when you commit a change, the source you submitted is automatically diff&#039;d against the previous version, and differences uploaded to the feed, along with the corresponding log message. More info on the feed locations can be found on the group [[Wales Group Version control | version control ]] page.&lt;br /&gt;
&lt;br /&gt;
== Using git-svn ==&lt;br /&gt;
Git can interface nicely with svn.&lt;br /&gt;
&lt;br /&gt;
=== Why use git? ===&lt;br /&gt;
Git is a more modern version control system than svn which has lots of very nice features that svn doesn&#039;t.  &lt;br /&gt;
* You have an entire copy of the repository locally so you can use git log, git diff, and checkout and older version of the software without needing to contact the svn server with every command.&lt;br /&gt;
* You can make lots of commits locally before contacting the server.  You only need to contact the svn server when you want to get changes from the server or push your changes to the server.  This is nice because you can work on a section of the code for days, weeks or months and have all your work under local version control, but only push your changes to the server when you think it&#039;s ready for prime time.&lt;br /&gt;
* Making new local branches is completely trivial so you can easily work on two logically separate things (e.g. experimenting with a new potential in GMIN and adding a feature to disconnectDPS) at the same time within the same repository. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone the svn repository ===&lt;br /&gt;
To clone the svn repository, just copy your old stuff in ~/svn to somewhere else for safekeeping. Then,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn clone https://svn.ch.cam.ac.uk/svn/wales/groups/wales/trunk/ svn/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
will download the repository to a new directory svn/&lt;br /&gt;
Sometimes that stalls midway through the download, so just run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
until it works.&lt;br /&gt;
&lt;br /&gt;
Here is a good git [http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet-detail/ cheat-sheet] written for svn users&lt;br /&gt;
&lt;br /&gt;
=== Basic Working Cycle ===&lt;br /&gt;
&lt;br /&gt;
The basic cycle assumes you&#039;re doing all your work on the master branch.&lt;br /&gt;
The first step is to sync your local repository with the server&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For git experts: it is important to use rebase here instead of merge because svn&lt;br /&gt;
can only deal with linear histories.&lt;br /&gt;
&lt;br /&gt;
Next make some changes to the files and commit the changes&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -a -m &amp;quot;here is my commit message&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensure that the local repository is up to date and push the commit (or commits) back to the server.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Useful tools ===&lt;br /&gt;
The following git commands are very useful tools and pretty self explanatory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git log&lt;br /&gt;
git diff&lt;br /&gt;
git grep&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, the gui gitk is very useful for visually inspecting the history&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gitk --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced working cycle ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more advanced working cycle would take advantage of the powerful branching &lt;br /&gt;
ability of git.  First make a working branch. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch mybranch&lt;br /&gt;
git checkout mybranch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make changes and commit them to mybranch.  Multiple commits are fine.  &lt;br /&gt;
&lt;br /&gt;
Sync your branch remotes/git-svn with the svn server (this is doing in two steps what `git svn rebase` would do in one)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Bring your working branch up to date&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rebase remotes/git-svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
push your commits to the svn server&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn dcommit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It is important to use git rebase rather than git merge because it maintains a purely linear commit history, which is necessary for easy communication with the svn server.  Before using dcommit, ensure that the changes you want to commit are arranged in a nicely linear manner on top of remotes/git-svn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gitk --all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is a good tool for examining the branch structure of your repository and making sure everything is linear before a dcommit.&lt;br /&gt;
&lt;br /&gt;
Note that &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn rebase&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is a shorcut for the two commands&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git svn fetch&lt;br /&gt;
git rebase remotes/git-svn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Squashing commits ====&lt;br /&gt;
It is good to make many small commits when working locally, but when pushing to the trunk it you might want to just make a few, very well-commented commits. You can squash multiple git commits into one single commit and change the commit message at the same time using rebase.&lt;br /&gt;
&lt;br /&gt;
To squash your last four commits together, use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rebase -i HEAD~4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For step-by-step instructions, [http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html look here].&lt;/div&gt;</summary>
		<author><name>Src68</name></author>
	</entry>
</feed>