<?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=Adk44</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=Adk44"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php/Special:Contributions/Adk44"/>
	<updated>2026-04-13T15:08:22Z</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=CHECKSPMUTATE&amp;diff=1722</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1722"/>
		<updated>2020-06-17T09:53:51Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, a pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
Care must especially be taken when inserting residues within the chain. If possible to avoid, please do so. I have written the code so that a maximum of two such residues can be inserted at the same point along the chain. This is already likely to cause problematic steric clashes, and so adding more would not likely be feasible. Care must also be taken that these new residues, once added and optimised, have the correct cis-trans isomerism and chirality.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding. Care will need to be taken that sufficient sampling for alternative pathways is performed.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding. Care will need to be taken that sufficient sampling for alternative pathways is performed.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1721</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1721"/>
		<updated>2020-06-11T19:26:30Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Potential Uses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, a pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding. Care will need to be taken that sufficient sampling for alternative pathways is performed.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding. Care will need to be taken that sufficient sampling for alternative pathways is performed.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1720</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1720"/>
		<updated>2020-06-04T13:54:47Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/checkspmutate/generate_connectfile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/DISCONNECT&#039;&#039;&#039;) and connect_sub_databases.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running [[disconnectionDPS]] in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the [[disconnectionDPS]] binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it may not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1719</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1719"/>
		<updated>2020-06-04T09:33:08Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* A Few Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/disconnect&#039;&#039;&#039;) and connect_sub_databases.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running [[disconnectionDPS]] in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the [[disconnectionDPS]] binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it may not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1718</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1718"/>
		<updated>2020-06-04T09:30:34Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/disconnect&#039;&#039;&#039;) and connect_sub_databases.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running [[disconnectionDPS]] in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the [[disconnectionDPS]] binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1717</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1717"/>
		<updated>2020-06-04T09:29:57Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Files Required */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/disconnect&#039;&#039;&#039;) and connect_sub_databases.sh (which can be found in &#039;&#039;&#039;/svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1716</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1716"/>
		<updated>2020-06-04T09:25:33Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Files Required */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1715</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1715"/>
		<updated>2020-06-04T09:24:57Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later).&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1714</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1714"/>
		<updated>2020-06-04T09:24:05Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one TS in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1713</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1713"/>
		<updated>2020-06-04T09:23:14Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Files Required */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs&#039;&#039;&#039;, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1712</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1712"/>
		<updated>2020-06-04T09:21:41Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Note on readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readts&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1711</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1711"/>
		<updated>2020-06-04T09:21:03Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Files Required */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/readmin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1710</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1710"/>
		<updated>2020-06-04T09:19:40Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Note on checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs&#039;&#039;&#039; are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1709</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1709"/>
		<updated>2020-06-04T09:19:17Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Make sure reoptimise.sh assigns an appropriate binary when manipulating the submission script. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1708</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1708"/>
		<updated>2020-06-04T09:17:22Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* checkmin/checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in &#039;&#039;&#039;/svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1707</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1707"/>
		<updated>2020-06-04T09:15:57Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Rationale */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisations first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1706</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1706"/>
		<updated>2020-06-04T09:14:36Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method described below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1705</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1705"/>
		<updated>2020-06-04T09:10:47Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* pathdata and odata.checksp files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, a pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1704</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1704"/>
		<updated>2020-06-04T09:09:35Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Making auxiliary files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, an pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1703</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1703"/>
		<updated>2020-06-04T09:04:42Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and its position in the original protein, and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, an pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1702</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1702"/>
		<updated>2020-06-04T09:03:21Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Potential Uses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM are (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and its position in the original protein, and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, an pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
* Comparing a DNA strand against an RNA/XNA strand. Note that this would require some different python scripts, also found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;, such as &#039;&#039;&#039;nucleic_acids.py&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1701</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1701"/>
		<updated>2020-06-04T09:00:31Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory. Note that the python scripts can be found in &#039;&#039;&#039;/svn/SCRIPTS/AMBER/BHmutation_steps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM are (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and its position in the original protein, and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, an pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1700</id>
		<title>CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=CHECKSPMUTATE&amp;diff=1700"/>
		<updated>2020-06-04T08:57:10Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Purpose ==&lt;br /&gt;
&lt;br /&gt;
It can take an awfully long time to create a large database or to fully optimise a specific feature of it such as a fully connected pathway showing complex protein folding. This is particularly acute when considering large proteins/protein+ligand systems.&lt;br /&gt;
&lt;br /&gt;
What if we are interested in examining how a Wild Type protein behaves with respect to some carefully selected mutants? Or in comparing one protein against a close homologue? It would seem like a colossal waste of time to create large databases for each of these similar cases, completely independently from each other. This is where CHECKSPMUTATE comes in.&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE uses the CHECKSPODATA routine, which reoptimises the minima/transition states of a database. CHECKSPMUTATE extends this by allowing for user-selected sections of the coordinates of the stationary points comprising the database to be mutated before the reoptimisation takes place. Thus a database can be transformed so that it describes the behaviour of a mutated protein as opposed to the Wild Type. Though this new database will need to be tidied up through the use of, eg, [[SHORTCUT]], [[SHORTCUT 2 BARRIER]] and [[UNTRAP]], this process should be far quicker than starting a whole new database from scratch. In the example below, I shall show how a pathway describing the approach of the cofactor, NADH, towards another cofactor, haem, within the pocket of HemS (a pathway which took months to find and fully connect) could be quickly replicated in a system where the wt HemS has been replaced by a mutated form (or even by another protein entirely).&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Before running the reoptimisations, we need to prepare a series of auxiliary files. In all, we should have the following files in our directory:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;aa_ringdata.pyc&#039;&#039;&#039; list of parameters/definition of planes for residues with rings. Only required if we are mutating to a residue with a ring.&lt;br /&gt;
*&#039;&#039;&#039;amino_acids.pyc&#039;&#039;&#039; list of parameters for all residues.&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; list of indices of the first atom of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;coordinates_mut.pyc&#039;&#039;&#039; script which mutates the selected residue.&lt;br /&gt;
*&#039;&#039;&#039;coords.inpcrd&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;coords.mdcrd&#039;&#039;&#039; for use with min.in, may not be required.&lt;br /&gt;
*&#039;&#039;&#039;coords.prmtop&#039;&#039;&#039; ensure this is for the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;min.A&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.B&#039;&#039;&#039; needs to be present, although the index listed in it is unimportant&lt;br /&gt;
*&#039;&#039;&#039;min.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;min.in&#039;&#039;&#039; for use with [[AMBER]]. Defines certain aspects of the model, such as solvent being used.&lt;br /&gt;
*&#039;&#039;&#039;mutate_aa.py&#039;&#039;&#039; organises the residues to be mutated, and does the mutations in conjunction with coordinates_mut.pyc&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; list of the total number of mutations to be made to the system.&lt;br /&gt;
*&#039;&#039;&#039;odata.checksp&#039;&#039;&#039; list of conditions for optimisation carried out on each stationary point by [[OPTIM]].&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; list of codes for residues which we are CHANGING FROM.&lt;br /&gt;
*&#039;&#039;&#039;original_protein.pdb&#039;&#039;&#039; pdb file for the system we are CHANGING FROM. All lines which do not dscribe an ATOM are (e.g. TITLE, TER and END) are removed, so that the number of lines of the file should correspond to the number of atoms in the system.&lt;br /&gt;
*&#039;&#039;&#039;pathdata&#039;&#039;&#039; organises [[OPTIM]] jobs. Certain keywords are required, described below.&lt;br /&gt;
*&#039;&#039;&#039;perm.allow&#039;&#039;&#039; full description of the groups of permutable atoms in the system we are CHANGING TO.&lt;br /&gt;
*&#039;&#039;&#039;points.min&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;points.ts&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; list of indices of the residues to be mutated.&lt;br /&gt;
*&#039;&#039;&#039;ts.data&#039;&#039;&#039; ensure this is for the system we are CHANGING FROM. Could be an entire database, or a section of it (such as a pathway) found using [[DIJKSTRA]].&lt;br /&gt;
*&#039;&#039;&#039;submission_script&#039;&#039;&#039; script for executing your binary.&lt;br /&gt;
&lt;br /&gt;
== Example of Mutation ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [F101A HemS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
To use CHECKSPMUTATE, we first need a database of interest, or a subset of it. In my example, I had extracted the minima and transition states comprising the pathway I was interested in using [[DIJKSTRA]] and moved the new min.data, points.min, points.ts and ts.data files to a new directory. Therefore, each of the stationary points in my database described a stage along this pathway. I wanted to see how this pathway, describing the approach of NADH to haem within the wt HemS pocket, changed when certain mutations were made to the HemS structure. One such residue of interest was a phe-gate (which appeared to regulate the approach of NADH) and so a mutation from phenylalanine to alanine (F101A) was made. I made input files for the new mutated system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
We need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define the mutation we are making, and where in the chain it takes place. In this example, we are only making one mutation - from phenylalanine to alanine at position 101. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; as we are only making one mutation, this is simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is the index of the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is the index of the first atom in the residue we are mutating. In cases (unlike this one) where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1569&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PHE &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residue we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALA &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
To invoke the reoptimisation process, either CHECKMIN (if reoptimising the minima of the database) or CHECKTS (if reoptimising the transition states) is required. The arguments should correspond to the number of minima or transition states present in the database.&lt;br /&gt;
&lt;br /&gt;
When mutating, we also need to include CHECKSP_MUT, which invokes the process whereby our system is mutated before being reoptimised. We should also include NATOMS_NEW which is the number of atoms in the system to which we are mutating. Also, if our system includes cofactors (which are conventionally listed after the protein chain) then we should include NATOMS_CHAIN, the number of atoms in the protein chain.&lt;br /&gt;
&lt;br /&gt;
An example pathdata file (for minima, as opposed to TSs) would therefore look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5491&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The odata.checksp files should be no different from what you originally used to find your original database. Make sure though that you use one suitable for finding minima with CHECKMIN, and one suitable for finding TSs with CHECKTS!&lt;br /&gt;
&lt;br /&gt;
=== Before and After Mutation ===&lt;br /&gt;
&lt;br /&gt;
Here is a rendering of [wt HemS + haem + NADH], alongside a rendering of the same minimum reoptimised after the F101A mutation was made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed widths=&amp;quot;540px&amp;quot; heights=&amp;quot;360px&amp;quot;&amp;gt;&lt;br /&gt;
File:wt_HemS_wiki.png|wt HemS&lt;br /&gt;
File:F101A_Hems_wiki.png|F101A HemS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Transformation to a Homologue ==&lt;br /&gt;
&lt;br /&gt;
=== [Wild Type HemS + haem + NADH] to [Wild Type ChuS + haem + NADH] ===&lt;br /&gt;
&lt;br /&gt;
This is a more complex problem than the single-point mutation described above. HemS and Chus are ~70% similar, and so ~30% of the residues of HemS need to be &#039;mutated&#039; to transform the system to ChuS. In addition to that, ChuS is two residues shorter than HemS, with one such deletion occurring approximately midway through the chain, and the other at the end. As with the mutant example above, I made input files for the new system using tleap, elsewhere described in [[Preparing an AMBER topology file for a protein plus ligand system]] and [[Symmetrising AMBER topology files]]. This gave me coords.inpcrd, coords.prmtop and perm.allow files for my new system. These were moved to the same directory where I had the min.data, points.min, points.ts and ts.data files for the original system.&lt;br /&gt;
&lt;br /&gt;
=== Making auxiliary files ===&lt;br /&gt;
&lt;br /&gt;
First, we need to align and compare the two systems.&lt;br /&gt;
&lt;br /&gt;
==== wt HemS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 NSERILE TYR GLU GLN TYR LEU GLN ALA LYS ALA ASP ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 LEU ALA THR LEU MET GLY ILE SER GLU ALA GLU LEU THR HIE SER ARG VAL SER HIE ASP&lt;br /&gt;
 ALA LYS ARG LEU LYS GLY ASP ALA ARG ALA LEU LEU ALA ALA LEU GLU ALA VAL GLY GLU&lt;br /&gt;
 VAL LYS ALA ILE THR ARG ASN THR TYR ALA VAL HIE GLU GLN MET GLY ARG TYR GLU ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG ASN LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER ALA PHE THR LEU THR GLU GLU THR ARG HIE GLY VAL ARG&lt;br /&gt;
 HIE SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU HIE LYS VAL TYR VAL THR GLU&lt;br /&gt;
 GLN THR ASP MET PRO ALA TRP GLU ALA LEU LEU ALA GLN PHE ILE THR THR GLU ASN PRO&lt;br /&gt;
 GLU LEU GLN LEU GLU PRO LEU SER ALA PRO GLU VAL THR GLU &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; THR ALA THR ASP GLU&lt;br /&gt;
 ALA VAL ASP ALA GLU TRP ARG ALA MET THR ASP VAL HID GLU PHE PHE GLN LEU LEU LYS&lt;br /&gt;
 ARG ASN ASN LEU THR ARG GLN GLN ALA PHE ARG ALA VAL GLY ASN ASP LEU ALA TYR GLN&lt;br /&gt;
 VAL ASP ASN SER SER LEU THR GLN LEU LEU ASN ILE ALA GLN GLN GLU GLN ASN GLU ILE&lt;br /&gt;
 MET ILE PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY MET ILE GLU LYS VAL&lt;br /&gt;
 THR PRO HIE GLN ASP TRP ILE ASN VAL PHE ASN GLN ARG PHE THR LEU HIE LEU ILE GLU&lt;br /&gt;
 THR THR ILE ALA GLU SER TRP ILE THR ARG LYS PRO THR LYS ASP GLY PHE VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA ALA ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY GLN PRO GLU GLN THR GLN TRP ARG ASP GLN ILE ALA ARG LEU ASN ASN &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;CLYS&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== wt ChuS + haem + NADH ====&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;NASN&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; ASN PRO GLY LYS TYR ALA ARG ASP&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; LEU MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLU ALA GLU LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ARG VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; HIE ASP&lt;br /&gt;
 ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TRP&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; GLY ASP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU ALA ALA LEU GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; VAL GLY GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LYS &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ILE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; ARG ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; TYR ALA VAL HIE GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PHE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; ASN&lt;br /&gt;
 GLN HIE LEU ASN GLY HIE ALA GLY LEU ILE LEU ASN PRO ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU ASP LEU ARG LEU&lt;br /&gt;
 PHE LEU ASN GLN TRP ALA SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; ARG&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; SER ILE GLN PHE PHE ASP HIE GLN GLY ASP ALA LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; LYS VAL TYR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; THR ASP MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; ALA TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; PHE ILE THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; GLU ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ALA PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ARG&amp;lt;/font&amp;gt; ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU TRP ARG ALA MET THR ASP VAL HID &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; PHE PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; LEU LEU LYS&lt;br /&gt;
 ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASN LEU THR ARG GLN GLN ALA PHE &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASN&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; ASP LEU ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt;&lt;br /&gt;
 VAL &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASN SER &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ALA GLN GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ASP&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; ASN GLU ILE&lt;br /&gt;
 MET &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PHE VAL GLY ASN ARG GLY CYS VAL GLN ILE PHE THR GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; GLU LYS VAL&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; PRO &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;MET&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLY&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LEU&amp;lt;/font&amp;gt; ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; PHE ASN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;PRO&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;THR&amp;lt;/font&amp;gt; PHE THR LEU HIE LEU LEU GLU&lt;br /&gt;
 &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ILE ALA GLU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; TRP &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;VAL&amp;lt;/font&amp;gt; THR ARG LYS PRO THR &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; ASP GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;TYR&amp;lt;/font&amp;gt; VAL THR SER&lt;br /&gt;
 LEU GLU LEU PHE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;HIE&amp;lt;/font&amp;gt; ASP GLY THR GLN ILE ALA GLN LEU TYR GLY GLN ARG THR GLU&lt;br /&gt;
 GLY &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLU&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;GLN&amp;lt;/font&amp;gt; GLU GLN &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ALA&amp;lt;/font&amp;gt; GLN TRP ARG &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;LYS&amp;lt;/font&amp;gt; GLN ILE ALA &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;SER&amp;lt;/font&amp;gt; LEU &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;ILE&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;CPRO&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;XXX&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;HEM&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;NAD&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;font color=&amp;quot;#ff0000 &amp;quot;&amp;gt;red&amp;lt;/font&amp;gt; font signifies a residue which has been mutated, &amp;lt;font color=&amp;quot;#33FF00 &amp;quot;&amp;gt;green&amp;lt;/font&amp;gt; represents a residue which has been deleted (given the code name XXX), and its position in the original protein, and &amp;lt;font color=&amp;quot;#FF00FF &amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt; represents the two cofactors.&lt;br /&gt;
&lt;br /&gt;
We now need to prepare atomnumberlog, newreslog, nresidueslog, oldreslog and resnumberlog to define all the mutations/insertions/deletions we are making, and where in the chain they take place. In this example, we are making 113 mutations/insertions/deletions (to be precise, 111 mutations and 2 deletions) in total:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;nresidueslog&#039;&#039;&#039; for 113 mutations, this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
113&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;resnumberlog&#039;&#039;&#039; this is a list of the indices of the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
4&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
336&lt;br /&gt;
337&lt;br /&gt;
338&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;atomnumberlog&#039;&#039;&#039; this is a list of the indices of the first atoms in the residues we are mutating. In cases where the number of residues changes, this index is always with respect to the original system.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1&lt;br /&gt;
14&lt;br /&gt;
54&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
5307&lt;br /&gt;
5321&lt;br /&gt;
5335&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;oldreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating from. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NSER&lt;br /&gt;
ILE &lt;br /&gt;
GLU &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ASN &lt;br /&gt;
ASN &lt;br /&gt;
CLYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;newreslog&#039;&#039;&#039; this is the residue code for the residues we are mutating to. If only three letters (i.e. not terminal and so preceded by N--- or C---), ensure that a space is put after it so that the code is four characters overall. If we are inserting a residue then the residue code is XXX or NXXX or CXXX.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NASN&lt;br /&gt;
HIE &lt;br /&gt;
THR &lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ILE &lt;br /&gt;
CPRO&lt;br /&gt;
XXX  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== pathdata and odata.checksp files ===&lt;br /&gt;
&lt;br /&gt;
Same as for the mutation example above. I would expect, for my example here with ChuS, an pathdata file like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CHECKMIN 1 1235&lt;br /&gt;
CYCLES 1235&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
NATOMS_NEW 5464&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
We therefore now have a method in which to transform the stationary points of a database of interest into a mutant or close homologue. This should allow a method in which to directly compare a wild type against mutants of interest or two protein homologues. In the examples above, I have been interested in comparing the pathway of a cofactor as it enters a pocket against other pathways in which key residues have been removed, and against a homologue of suspected similar reactivity.&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that time and computational resources can be significantly saved in transforming one database to a system of similar properties.&lt;br /&gt;
&lt;br /&gt;
It must be noted, however, that following the use of CHECKSPMUTATE, the new pathway might have gaps as not all of the stationary points necessarily will have converged. These gaps will need filled with the [[CONNECTPAIRS]] keyword. The full procedure that I used to fill such gaps is detailed in [[Pathway Gap Filling Post-CHECKSPMUTATE]]&lt;br /&gt;
&lt;br /&gt;
IT MUST ALSO BE NOTED that the pathway for the new system will not necessarily (and is indeed unlikely to be) the optimal one. Therefore, post CHECKSPMUTATE, an appropriate number of rounds of [[SHORTCUT]]/[[SHORTCUT 2 BARRIER]]/[[UNTRAP]] etc will need to be performed. It is not advised that CHECKSPMUTATE be used on proteins which are significantly different.&lt;br /&gt;
&lt;br /&gt;
=== Potential Uses ===&lt;br /&gt;
&lt;br /&gt;
CHECKSPMUTATE could potentially be used to shed light on some of the following problems:&lt;br /&gt;
&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein folding.&lt;br /&gt;
* Comparing a wt protein against some mutations to determine how such mutations affect protein-cofactor interactions.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in the same manner of protein folding.&lt;br /&gt;
* Comparing a protein against a close homologue to see whether it engages in similar protein-cofactor interactions.&lt;br /&gt;
* Transformation of a cofactor (for example from NADH to NADPH) to see whether this affects protein-cofactor interactions.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements ===&lt;br /&gt;
&lt;br /&gt;
Though adk44 wrote the code for CHECKSPMUTATE, he interfaced this code with kr366&#039;s pre-existent python scripts (with minor alterations) which had originally been written to allow mutations as part of kr366&#039;s [[Mutational BH steps]] routine.&lt;br /&gt;
&lt;br /&gt;
--adk44 16.45, 2 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1699</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1699"/>
		<updated>2020-06-03T17:18:31Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Cleanining Up the Pathway */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1698</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1698"/>
		<updated>2020-06-03T17:18:00Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* readmin/readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Note on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleanining Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1697</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1697"/>
		<updated>2020-06-03T17:17:23Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleanining Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;br /&gt;
&lt;br /&gt;
== A Few Notes ==&lt;br /&gt;
&lt;br /&gt;
As mentioned at the top of this article, this method to plug in the gaps of a new pathway is highly idiosyncratic, and was particularly useful for the system I was working on. I don&#039;t necessarily anticipate it being useful for everybody, and that&#039;s why I haven&#039;t really generalised the various scripts I&#039;ve used. Should this prove more popular than I suspect, I would be happy to generalise this code.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, if you have a really big database describing a large system, it make not be practical to create so many directories, and copy over the large points.min and points.ts files. In which case, some of my scripts will have to be adapted. Again, if anybody struggles doing this, I would be happy to step in and help.&lt;br /&gt;
&lt;br /&gt;
--adk44 18.15, 3 June 2020 (BST)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1696</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1696"/>
		<updated>2020-06-03T17:11:46Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;br /&gt;
&lt;br /&gt;
Once all of these connection attempts have been made (and hopefully proven successful), the information in each of these subdirectories need to be merged into the overall one in the directory relevant_connected. Therefore, within the relevant_connected directory, the MERGEDB keyword is introduced to pathdata. To merge the information contained in the subdirectory 00025_00102 into relevant_connected, for example, pathdata would look something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ./00025_00102&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is repeated for all of the other subdirectories, changing the argument to MERGEDB each time.&lt;br /&gt;
&lt;br /&gt;
== We Now Have a Connected Pathway ==&lt;br /&gt;
&lt;br /&gt;
Hooray! We should now have a fully connected pathway for our new, mutated system, akin to the one we had in our original, non-mutated system. We can start to compare the two.&lt;br /&gt;
&lt;br /&gt;
== Cleanining Up the Pathway ==&lt;br /&gt;
&lt;br /&gt;
HOWEVER, it must be noted that this new pathway is probably not optimal. Some barriers are probably awfully high, and the pathway can probably be shortened. A series of SHORTCUT/SHORTCUT 2 BARRIER and UNTRAP runs should probably be performed to refine the pathway. I&#039;d recommend doing this in yet another directory, perhaps called s_s2b_and_u, just to differentiate the resulting data from the unrefined pathway so we can better keep track of the changes such refinements make.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1695</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1695"/>
		<updated>2020-06-03T17:02:05Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* relevant_connected */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;br /&gt;
&lt;br /&gt;
With the minima now grouped into sub-databases, it is time to try to connect these sub-databases. Therefore, connect_sub_databases.sh should now be executed. Before doing so, though, ensure that the name of the submission script in this bash script is consistent with the name of the submission script in your directory.&lt;br /&gt;
&lt;br /&gt;
This bash script first of all calculates all of the distances between all of the unconnected minima, before rearranging them shortest to longest. Sub-directories are then created, and connections attempted within them to connect all of the various sub-databases. If any of this is unclear, please consult [[Connecting Sub-databases]] for more details.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1694</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1694"/>
		<updated>2020-06-03T16:56:03Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* relevant_connected */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The bash scripts, find_connections.sh (which can be found in /svn/SCRIPTS/disconnect) and connect_sub_databases.sh (which can be found in /svn/SCRIPTS/PATHSAMPLE/connecting_sub_databases).&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First of all, the minima need to be grouped into sub-databases. I found that the easiest way to do this is by running disconnectionDPS in a loop until all the minima in the database are assigned. This is done by executing find_connections.sh. Before doing so, ensure that the argument to CONNECTMIN is set to 1 and the PRINTCONNECTED keyword is included. Also, make sure to change the disconnectionDPS binary in the bash script to whatever you&#039;ve called your binary.&lt;br /&gt;
&lt;br /&gt;
I tend to find it a bit of a waste of time to consider really small sub-databases. I only tend to consider sub-databases with 10 minima or more in them. It&#039;s up to you what cutoff, if any, you wish to have. For these sub-databases, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; files which list the minima comprising them are copied to &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; files. Following the completion of find_connections.sh, the &#039;&#039;&#039;connected_*&#039;&#039;&#039; can simply be deleted, but keep the &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; ones. Just make sure that the two minima at the beginning and end of the pathway that you are interested in are retained (i.e. if one of these minima is contained in a &#039;&#039;&#039;connected_*&#039;&#039;&#039; file beneath the cutoff, ensure that this file is also renamed to a &#039;&#039;&#039;relevant_connected_*&#039;&#039;&#039; file).&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1693</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1693"/>
		<updated>2020-06-03T16:43:50Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* relevant_connected */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem. In short, this is a method in which all of the minima within a database are grouped into &#039;sub-databases&#039;. Each sub-database contains all the minima connected to one another within the overall database, but all of the minima from one sub-database are unconnected from all of the minima in any other sub-database. Once grouped into these sub-databases, this method then compares each and every minima from each sub-database with all of the minima from all of the other sub-databases, finding the distances between them. These distances are then arranged from shortest to longest, and connection attempts made in that order. If two minima from two different sub-databases are then connected (and thus, by implication, all of the minima from these two sub-databases become connected), any further connection attempts between two minima in these two sub-databases become unnecessary and so are skipped. This process continues until all the sub-databases are connected.&lt;br /&gt;
&lt;br /&gt;
This organisational scheme is a useful way of circumventing the need to connect two minima a long way apart. It is often the case that two better candidate minima from the same two sub-databases are available, which are closer in space.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From now_use_connectfile_to_fill_gaps, the following should be copied over to relevant_connected:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, odata.connect, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
The following are also required:&lt;br /&gt;
&lt;br /&gt;
* A dinfo file, with PRINTCONNECTED included as a keyword such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! REQUIRED KEYWORDS&lt;br /&gt;
&lt;br /&gt;
DELTA 0.25&lt;br /&gt;
FIRST -15120.0&lt;br /&gt;
LEVELS 800&lt;br /&gt;
MINIMA min.data&lt;br /&gt;
TS ts.data&lt;br /&gt;
&lt;br /&gt;
! OPTIONAL KEYWORDS&lt;br /&gt;
&lt;br /&gt;
NCONNMIN 0&lt;br /&gt;
CONNECTMIN 1&lt;br /&gt;
LABELFORMAT F8.1&lt;br /&gt;
PRINTCONNECTED&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A pathdata file, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
RETAINSP&lt;br /&gt;
! CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A submission script for pathsample, sub_script_connections such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_con&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
mkdir -p $TMP&lt;br /&gt;
cp ${SLURM_SUBMIT_DIR}/{connectfile,coords.inpcrd,coords.mdcrd,coords.prmtop,odata.connect,min.in,min.A,min.B,min.data,ts.data,points.min,points.ts,pathdata,perm.allow} $TMP&lt;br /&gt;
cd $TMP&lt;br /&gt;
&lt;br /&gt;
# echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
# srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
# echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
# pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_retainsp.out&lt;br /&gt;
&lt;br /&gt;
# Copy all files back to the original submission directory&lt;br /&gt;
cp * $SLURM_SUBMIT_DIR&lt;br /&gt;
STATUS=$?&lt;br /&gt;
echo &amp;quot;$STATUS&amp;quot;&lt;br /&gt;
if [ $STATUS == 0 ];&lt;br /&gt;
   then&lt;br /&gt;
      echo &amp;quot;No error in cp&amp;quot;&lt;br /&gt;
      cd $SLURM_SUBMIT_DIR&lt;br /&gt;
      rm -rf $TMP&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1692</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1692"/>
		<updated>2020-06-03T16:17:32Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* now_use_connectfile_to_fill_gaps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;br /&gt;
&lt;br /&gt;
It may be the case that some gaps are so large that there is little chance they will get connected. If there are a few of these, then such connections can clog up the overall CONNECTPAIRS process. One way to get round this is to adapt the [[OPTIM]] code so that gaps above a certain length are not even attempted. This is the purpose of my other executable in pathdata:&lt;br /&gt;
&lt;br /&gt;
 EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
&lt;br /&gt;
=== relevant_connected ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Connection attempts are not always successful. Often this is because the gaps are simply too large to traverse within the given number of connection attempts that have been specified. Some such instances may or may not occur with your system. In case they do (as happened with some of my systems), the methods outlined in [[Connecting Sub-databases]] could be very helpful in overcoming this problem.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1691</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1691"/>
		<updated>2020-06-03T16:07:40Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* now_use_connectfile_to_fill_gaps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure. We are now going to run the CONNECTPAIRS algorithm within [[PATHSAMPLE]] to try to fill in the gaps in our new, mutated pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From merge_minima_into_database, the following files should be copied to now_use_connectfile_to_fill_gaps:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, connectfile from generate_connectfile needs to be copied across to now_use_connectfile_to_fill_gaps.&lt;br /&gt;
&lt;br /&gt;
Also required are:&lt;br /&gt;
&lt;br /&gt;
odata.connect, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
NEWCONNECT 100 3 0.5 100.0 600 1 0.01&lt;br /&gt;
NEWNEB 10 500 0.005&lt;br /&gt;
ADJUSTK 5 5.0 1.03D0&lt;br /&gt;
NEBK 10.0&lt;br /&gt;
DIJKSTRA EXP&lt;br /&gt;
PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
PUSHOFF 0.2&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
BFGSTS 500 10 16 0.01 100&lt;br /&gt;
STEPS 1000&lt;br /&gt;
USEDIAG 2&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
DUMPDATA&lt;br /&gt;
&lt;br /&gt;
NOHESS&lt;br /&gt;
ENDHESS&lt;br /&gt;
ENDNUMHESS&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-4&lt;br /&gt;
AMBER12 start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pathdata of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
! EXEC           /home/adk44/bin/CUDAOPTIM_stop_large_gap&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
SLURM&lt;br /&gt;
COPYFILES coords.inpcrd coords.mdcrd coords.prmtop min.in&lt;br /&gt;
COPYFILES perm.allow&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
CONNECTPAIRS connectfile&lt;br /&gt;
CYCLES 244&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of CYCLES depends on the number of connections we are attempting (i.e. the number of lines in connectfile).&lt;br /&gt;
&lt;br /&gt;
Also required is sub_script_connections, of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=wt_ChuS_ncf&lt;br /&gt;
#SBATCH --ntasks=6 --ntasks-per-node=1&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
echo $SLURM_NTASKS &amp;gt; nodes.info&lt;br /&gt;
srun hostname &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
echo $USER &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
pwd &amp;gt;&amp;gt; nodes.info&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
/home/$USER/bin/PATHSAMPLE_gf_CHECKSP_MUT &amp;gt; pathsample_connectfile.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply submit the submission script. This is a highly parallelizable calculation, and in the example above I have specified that 6 tasks can run at once, with one task per node. Therefore, six connection attempts can be run in parallel. This, of course, can be set to whatever you like.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1690</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1690"/>
		<updated>2020-06-03T15:43:03Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== checkmin/checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== readmin/readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;br /&gt;
&lt;br /&gt;
=== generate_connectfile ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is simply to identify the gaps along the pathway which need to be filled in order to be able to fully connect the first and last transition states in our new database. If the above procedures have been followed correctly, then these two transition states should correspond very closely (if not exactly) to the first and last transition states of the original, non-mutated database.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Copy ts.data from startfrompath into the sub-directory generate_connectfile&lt;br /&gt;
&lt;br /&gt;
The following files are required, which can be found in /svn/SCRIPTS/CHECKSPMUTATE/generate_connectfile&lt;br /&gt;
&lt;br /&gt;
* det_connections.sh, generate_connectfile_prep.py, generate_connectfile.py&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Simply execute det_connections.sh. connectfile shall be generated.&lt;br /&gt;
&lt;br /&gt;
=== merge_minima_into_database ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Before trying to connect all of the minima as listed in connectfile, it makes sense to include all the minima contained in the readmin database. This gives [[OPTIM]] a greater number of pre-existent minima which could be of relevance to draw upon when trying to fill these gaps in the pathway.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From startfrompath, copy the following files to the merge_minima_into_database directory:&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, perm.allow, points.min, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
Use the following pathdata file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
MERGEDB ../../../readmin&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
Run the PATHSAMPLE binary. The [[MERGEDB]] keywords merges the minima from the readmin directory into the present directory, thus expanding the number of minima in the latter.&lt;br /&gt;
&lt;br /&gt;
=== now_use_connectfile_to_fill_gaps ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
This is the business-end of this whole procedure.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1689</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1689"/>
		<updated>2020-06-03T15:26:50Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* all_opt_TSs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also require an odata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH  path.info.initial 1 2&lt;br /&gt;
! CYCLES         0&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a sub_script_CUDAOPTIM file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, descents.sh is executed. This extracts all of the transition states in the database, moves them to a subdirectory with an index corresponding to where it appears in ts.data, and then performs the descent calculations to determine the two minima directly connected to this TS. Additionally, this script creates another subdirectory called startfrompath, in which the path.info file generated from the first TS and its two associated minima is used to create a new database (i.e. two minima should appear in min.data and one in ts.data).&lt;br /&gt;
&lt;br /&gt;
Once all of the calculations are complete, move into the startfrompath directory and change pathdata to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
! STEP 1: creating the initial database from A9OPTIM path.info file&lt;br /&gt;
! STARTFROMPATH path.info.initial 1 2&lt;br /&gt;
! CYCLES 0&lt;br /&gt;
&lt;br /&gt;
ADDPATH path.info.initial&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, move back into the all_opt_TSs directory, and execute addpath.sh. Now, all of the TSs and their associated minima shall be added to the database in the startfrompath directory. Thus now, we don&#039;t just have a database of transition states, but of transition states and their associated minima (note that the database of minima obtained in the readmin directory have not yet been added. This will come later.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1688</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1688"/>
		<updated>2020-06-03T15:16:13Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* all_opt_TSs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Though we now have a database of transition states for our new, mutated system, we have no idea which minima these TSs are directly connected to. To find this out, we need to use the PATH keyword in [[OPTIM]].&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
The following files are copied over from the readts directory to the all_opt_TSs directory. Note: take special care that ts.data and points.ts are copied from readts and NOT from checkts as we are now concerned with the database for the new, mutated system, not the old one.&lt;br /&gt;
&lt;br /&gt;
* coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, perm.allow, points.ts, ts.data&lt;br /&gt;
&lt;br /&gt;
We also required odata, pathdata and sub_script_CUDAOPTIM files of the forms:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CUDA A&lt;br /&gt;
COMMENT DEBUG&lt;br /&gt;
COMMENT CUDATIME&lt;br /&gt;
COMMENT PERMDIST&lt;br /&gt;
EDIFFTOL 8D-4&lt;br /&gt;
GEOMDIFFTOL 0.2&lt;br /&gt;
MAXMAX 2.0&lt;br /&gt;
DUMPALLPATHS&lt;br /&gt;
COMMENT DUMPSTRUCTURES&lt;br /&gt;
COMMENT MODE -1&lt;br /&gt;
DUMPDATA&lt;br /&gt;
NOFRQS&lt;br /&gt;
UPDATES 20 20&lt;br /&gt;
PATH 3&lt;br /&gt;
NOPOINTS&lt;br /&gt;
BFGSTS 200 20 100 0.01 50&lt;br /&gt;
ENDHESS&lt;br /&gt;
NOHESS&lt;br /&gt;
BFGSSTEPS 10000&lt;br /&gt;
BFGSMIN 1D-3&lt;br /&gt;
MAXBFGS 1.0&lt;br /&gt;
AMBER12 extractedts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
EXTRACTTS 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=m_wt_ChuS&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
/home/$USER/bin/CUDAOPTIM_AMB12_gf_030718 &amp;gt; optim.out&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the following scripts, which can be accessed in /svn/SCRIPTS/CHECKSPMUTATE/all_opt_TSs, are required:&lt;br /&gt;
&lt;br /&gt;
* addpath.sh, descents.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1687</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1687"/>
		<updated>2020-06-03T15:05:11Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;br /&gt;
&lt;br /&gt;
=== all_opt_TSs ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1686</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1686"/>
		<updated>2020-06-03T15:02:19Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Readmin/Readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;br /&gt;
&lt;br /&gt;
==== Notes on readts ====&lt;br /&gt;
&lt;br /&gt;
This is the same as for the readmin procedure above but with a few distinctions. First, carry out the calculations in the folder readts.&lt;br /&gt;
&lt;br /&gt;
Rather than checkminfile and pathsample_checkmin.out, we need the files checktsfile and pathsample_checkts.out&lt;br /&gt;
&lt;br /&gt;
Rather than organise_mindatainfo_min.sh, use the script organise_mindatainfo_ts.sh (to be found in /svn/SCRIPTS/CHECKSPMUTATE/readts).&lt;br /&gt;
&lt;br /&gt;
In pathdata, stick with the READMIN (as there isn&#039;t actually a READTS keyword available). This is not a big problem - all that we need to do after running the READMIN calculation is to rename points.min to points.ts and min.data to ts.data.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1685</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1685"/>
		<updated>2020-06-03T14:56:36Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Readmin/Readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN/READTS keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, the organise_mindatainfo_min.sh file is executed. This gives the min.data.info.total file&lt;br /&gt;
&lt;br /&gt;
Then, execute a PATHSAMPLE binary to run READMIN. This shall give you min.data and points.min files for your new, mutated system.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1684</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1684"/>
		<updated>2020-06-03T14:54:07Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Files Required */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN/READTS keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1683</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1683"/>
		<updated>2020-06-03T14:53:54Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Readmin/Readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN/READTS keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). I like to keep my minima/TSs in the same order that their equivalents from the original, non-mutated pathway were in, and so concatenate these files in a specific way, whilst ensuring that those from the overwritten reoptimisations are also included.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd, coords.mdcrd, coords.prmtop, min.in, pathsample_checkmin.out, perm.allow&lt;br /&gt;
&lt;br /&gt;
From checkmin, copy all of the min.data.info.**** files to the readmin directory.&lt;br /&gt;
&lt;br /&gt;
Also, required:&lt;br /&gt;
&lt;br /&gt;
A pathdata file of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5464&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
READMIN min.data.info.total&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the bash script, organise_mindatinfo_min.sh, to be found in /svn/SCRIPTS/CHECKSPMUTATE/readmin&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1682</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1682"/>
		<updated>2020-06-03T14:49:10Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Readmin/Readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve reoptimised all of the stationary points to our new mutated system/homolgue (bearing in mind that not all will have converged) as well as reoptimised any overwritten ones, we now need to create points.min, min.data, points.ts and ts.data files for our new system. The READMIN/READTS keywords can do this by reading in a list of coordinates for all of the reoptimised minima/TSs. Before doing that, we need to create such a file by concatenating all of the min.data.info.**** files into two large min.data.info.total files (one for minima, one for TSs - it is a quirk of the CHECKTS keyword that it also logs its optimised structures in min.data.info.**** files rather than ts.data.info.**** files). &lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1681</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1681"/>
		<updated>2020-06-03T14:43:16Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Checkmin/Checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1680</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1680"/>
		<updated>2020-06-03T14:42:30Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Readmin/Readts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From checkmin/all_launched_simult, copy the following files to the readmin directory:&lt;br /&gt;
&lt;br /&gt;
* checkminfile, coords.inpcrd&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1679</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1679"/>
		<updated>2020-06-03T14:40:46Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Checkmin/Checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/minima&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;br /&gt;
&lt;br /&gt;
==== Note on checkts ====&lt;br /&gt;
&lt;br /&gt;
Because of slightly different requirements, make sure that the auxiliary files from /svn/SCRIPTS/CHECKSPMUTATE/all_launched_simult/TSs are used instead. Also, the file to be read in by duplicates.sh should be called pathsample_checkts.out rather than pathsample_checkmin.out.&lt;br /&gt;
&lt;br /&gt;
=== Readmin/Readts ===&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1678</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1678"/>
		<updated>2020-06-03T14:38:39Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Checkmin/Checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, odata (exactly the same as odata.checksp), original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out (i.e. the output from the CHECKSPMUTATE calculation), which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;br /&gt;
&lt;br /&gt;
The script reoptimise.sh is then used to reoptimise these overwritten minima. pre_pathdata and sub_script_CUDAOPTIM are first manipulated to ensure the correct minima are reoptimised. Each reoptimisation is carried out in a sub-directory named after the index of the minimum being reoptimised.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=File:Mind_Map_directories_for_group_wiki.png&amp;diff=1677</id>
		<title>File:Mind Map directories for group wiki.png</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=File:Mind_Map_directories_for_group_wiki.png&amp;diff=1677"/>
		<updated>2020-06-03T14:34:07Z</updated>

		<summary type="html">&lt;p&gt;Adk44: Adk44 uploaded a new version of File:Mind Map directories for group wiki.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1676</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1676"/>
		<updated>2020-06-03T14:30:42Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Checkmin/Checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
==== Files Required ====&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;br /&gt;
&lt;br /&gt;
Before proceeding, we also required duplicates.sh, duplicates.py, duplicates2.py and reoptimise.sh, all of which can be found in /svn/SCRIPTS/CHECKSPMUTATE.&lt;br /&gt;
&lt;br /&gt;
==== Execution ====&lt;br /&gt;
&lt;br /&gt;
First, execute duplicates.sh. This generates checkminfile, a list of all of the minima which were overwritten during the original CHECKSPMUTATE run. It identifies such minima by reading pathsample_checkmin.out, which gives a log of all of the random numbers each respective OPTIM job was assigned.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1675</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1675"/>
		<updated>2020-06-03T14:24:05Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Checkmin/Checkts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1674</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1674"/>
		<updated>2020-06-03T14:23:29Z</updated>

		<summary type="html">&lt;p&gt;Adk44: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Checkmin/Checkts ===&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run [[CHECKSPMUTATE]] calculations in checkmin and checkts directories respectively. Because of the way [[OPTIM]] jobs are assigned by [[PATHSAMPLE]] - with each job being assigned a random number - it is possible that two or more [[OPTIM]] jobs get assigned the same random number within the same [[PATHSAMPLE]] batch. Therefore, the former job gets overwritten by the latter. This seems to be a fairly significant bug within [[PATHSAMPLE]] but nobody else seems to have had a problem with it before (I can only assume nobody else has run into this problem, or have come up with their own workarounds). I didn&#039;t want to tamper with the cycle2.f90 routine and so my fix involves optimising again these overwritten files. Typically, the number of overwritten files is small compared to the overall number of reoptimisation first conducted by [[CHECKSPMUTATE]]. For example, with my [wt ChuS + haem + NADH] system (please see [[CHECKSPMUTATE]] for details), of the 1235 minima which were reoptimised, it was found that 14 of these had been overwritten.&lt;br /&gt;
&lt;br /&gt;
To find out which files had been overwritten in the first place, a sub-directory (called all_launched_simult) was created within checkmin. The following files from checkmin were copied into this new folder:&lt;br /&gt;
&lt;br /&gt;
* aa_ringdata.pyc, amino_acids.pyc, atomnumberlog, coordinates_mut.pyc, coords.inpcrd, coords.mdcrd, coords.prmtop, min.A, min.B, min.data, min.in, mutate_aa.py, newreslog, nresidueslog, odata.checksp, original_protein.pdb, pathsample_checkmin.out, perm.allow, points.min, points.ts, resnumberlog, ts.data&lt;br /&gt;
&lt;br /&gt;
Additionally, pre_pathdata and pre_sub_script_CUDAOPTIM files of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXEC           /home/adk44/bin/CUDAOPTIM_ppt_final_210918&lt;br /&gt;
CPUS           1&lt;br /&gt;
NATOMS         5501&lt;br /&gt;
NATOMS_CHAIN   5357&lt;br /&gt;
NATOMS_NEW     5464&lt;br /&gt;
CHECKSP_MUT&lt;br /&gt;
SEED           1&lt;br /&gt;
DIRECTION      AB&lt;br /&gt;
CONNECTIONS    1&lt;br /&gt;
TEMPERATURE    0.592&lt;br /&gt;
PLANCK         9.536D-14&lt;br /&gt;
DUMMYRUN&lt;br /&gt;
PERMDIST&lt;br /&gt;
ETOL           8D-4&lt;br /&gt;
GEOMDIFFTOL    0.2D0&lt;br /&gt;
ITOL           0.1D0&lt;br /&gt;
NOINVERSION&lt;br /&gt;
NOFRQS&lt;br /&gt;
CYCLES 1&lt;br /&gt;
&lt;br /&gt;
AMBER12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Request 1 TITAN Black GPU - use &#039;--constraint=teslak20&#039; for a Tesla or &#039;--constraint=maxwell&#039; to request a Maxwell GPU for single precision runs&lt;br /&gt;
#SBATCH --constraint=titanblack&lt;br /&gt;
#SBATCH --job-name=test_top&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
#SBATCH --mail-type=FAIL&lt;br /&gt;
&lt;br /&gt;
hostname&lt;br /&gt;
echo &amp;quot;Time: `date`&amp;quot;&lt;br /&gt;
source /etc/profile.d/modules.sh&lt;br /&gt;
&lt;br /&gt;
# Load the appropriate compiler modules on the node - should be the same as those used to compile the executable on pat&lt;br /&gt;
module add cuda/6.5&lt;br /&gt;
module add icc/64/2013_sp1/4/211&lt;br /&gt;
module add anaconda/python2/2.2.0 # Needed for python networkx module - must be python 2, not 3&lt;br /&gt;
&lt;br /&gt;
# Set the GPU to exclusive process mode&lt;br /&gt;
sudo nvidia-smi -i $CUDA_VISIBLE_DEVICES -c 3&lt;br /&gt;
&lt;br /&gt;
# Make a temporary directory on the node, copy job files there and change to that directory&lt;br /&gt;
# TMP=/scratch/$USER/$SLURM_JOB_ID&lt;br /&gt;
# mkdir -p $TMP&lt;br /&gt;
# cp ${SLURM_SUBMIT_DIR}/{coords.inpcrd,coords.prmtop,perm.allow,odata,min.in,start} $TMP&lt;br /&gt;
# cd $TMP&lt;br /&gt;
&lt;br /&gt;
# Run the executable in the local node scratch directory&lt;br /&gt;
&lt;br /&gt;
echo Finished at `date`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
were included.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1673</id>
		<title>Pathway Gap Filling Post-CHECKSPMUTATE</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pathway_Gap_Filling_Post-CHECKSPMUTATE&amp;diff=1673"/>
		<updated>2020-06-03T11:10:08Z</updated>

		<summary type="html">&lt;p&gt;Adk44: /* Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a recommended procedure to be used following the use of [[CHECKSPMUTATE]], if it was a pathway which was being reoptimised.&lt;br /&gt;
&lt;br /&gt;
[[CHECKSPMUTATE]] mutates a selected set of residues in a protein or protein+ligand system, and reoptimises all of the stationary points from the original system. Thus mutated forms or a close homologue can be directly compared against a wild type protein. This is particularly useful when comparing a particular protein fold or protein+cofactor interaction. In these instances, we are interested in reoptimising only the stationary points comprising a particular pathway, and the database before mutation is set up accordingly.&lt;br /&gt;
&lt;br /&gt;
It is almost inevitable (particularly is we are introducing bulky mutations) that not all of the stationary points post-mutation will reoptimise (there could be steric clashes etc). Thus, there will be gaps in our new, mutated pathway. Hence the need for post-processing to fill these gaps.&lt;br /&gt;
&lt;br /&gt;
Please note this method listed below is highly idiosyncratic, and as such is only meant as a loose guide. It uses very simple bash scripts, which can be easily edited. Please feel free to adapt the procedure to your own needs/preferences.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
&lt;br /&gt;
The directories used for CHECKSPMUTATE and its post-processing. The bash scripts are set up to move between these, so will need to be adapted if the directories are named/organised differently.&lt;br /&gt;
&lt;br /&gt;
[[Image:Mind_Map_directories_for_group_wiki.png|1200px|center]]&lt;br /&gt;
&lt;br /&gt;
Ordinarily, I will have run two CHECKSPMUTATE calculations in&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>