<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://biomolmd.org/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Brendan</id>
	<title>biowiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://biomolmd.org/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Brendan"/>
	<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php/Special:Contributions/Brendan"/>
	<updated>2026-11-17T02:34:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2182</id>
		<title>Tutorial:kturn tut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2182"/>
		<updated>2026-04-22T17:01:01Z</updated>

		<summary type="html">&lt;p&gt;Brendan: /* Box axes (default but system-specific) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Purpose =&lt;br /&gt;
This page documents the standard protocol for preparing and running molecular dynamics (MD) simulations of RNA k-turn systems (and other similar small biomolecular solutes) using AMOEBA in Tinker9. It takes a starting PDB structure through system preparation, equilibration, and production MD. Umbrella sampling / pulling is &#039;&#039;&#039;not&#039;&#039;&#039; covered here.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
# Obtain a clean starting PDB&lt;br /&gt;
# Standardize the PDB via a &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; round-trip, which also generates the &amp;lt;code&amp;gt;.seq&amp;lt;/code&amp;gt; file&lt;br /&gt;
# Solvate + neutralize + build a key file with Tinker-GUI&lt;br /&gt;
# Energy minimization (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Heating: 5 temperatures with strong position restraints on the solute (NVT)&lt;br /&gt;
# Restraint phase-down: gradually relax position restraints at 298 K (NVT)&lt;br /&gt;
# Production: unrestrained NPT MD&lt;br /&gt;
&lt;br /&gt;
Force field: AMOEBA (&amp;lt;code&amp;gt;amoebabio18.prm&amp;lt;/code&amp;gt;). Engine: [https://github.com/TinkerTools/tinker Tinker8] and [https://github.com/TinkerTools/tinker9 Tinker9] (&amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= 1. PDB preparation =&lt;br /&gt;
&lt;br /&gt;
== Source PDB ==&lt;br /&gt;
&lt;br /&gt;
Start from a crystal / cryo-EM structure in PDB format. A good test / example system for this protocol is &#039;&#039;&#039;[https://www.rcsb.org/structure/5FJ0 PDB 5FJ0]&#039;&#039;&#039; — a 27-nt RNA k-turn. Download the file in &#039;&#039;&#039;PDB format&#039;&#039;&#039; (on RCSB: &#039;&#039;Download Files → PDB Format&#039;&#039;); the direct link is [https://files.rcsb.org/download/5FJ0.pdb files.rcsb.org/download/5FJ0.pdb]. The mmCIF format will not work with &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before running anything:&lt;br /&gt;
&lt;br /&gt;
* Decide the protonation states of ionizable residues (for RNA/DNA the standard assumption is deprotonated phosphates; for proteins use PROPKA or similar).&lt;br /&gt;
* Remove or keep heteroatoms intentionally (crystallographic waters, buffer ions, ligands). &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; will silently drop anything it doesn&#039;t recognize.&lt;br /&gt;
* Decide what to do with missing atoms/residues. If the structure is incomplete, fix it externally first (e.g. with PDBFixer) &#039;&#039;&#039;before&#039;&#039;&#039; the steps below.&lt;br /&gt;
&lt;br /&gt;
== pdbxyz → xyzpdb round-trip ==&lt;br /&gt;
&lt;br /&gt;
The goal of this step is to produce a PDB in the exact format that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; will emit from then on, so that any future PDB written from an MD trajectory (for visualization, diffing, or restart) is line-for-line comparable to the starting reference.&lt;br /&gt;
&lt;br /&gt;
 pdbxyz  myfile.pdb  -k tinker.key&lt;br /&gt;
 xyzpdb  myfile.xyz  -k tinker.key&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;tinker.key&amp;lt;/code&amp;gt; points at the AMOEBA parameter file:&lt;br /&gt;
&lt;br /&gt;
 parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pdbxyz outputs two files:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.xyz&amp;lt;/code&amp;gt; — the Tinker-format coordinate file&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; — a sequence / base-pair map of the solute. This file is required whenever &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; is run.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xyzpdb requires the .seq file to share the same prefix as the .xyz&#039;&#039;&#039; — there is no command-line option to point at a specific .seq. If you call &amp;lt;code&amp;gt;xyzpdb myfile.xyz&amp;lt;/code&amp;gt;, Tinker looks for &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; in the same directory. If you rename or move the .xyz, rename / copy the .seq to match.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output files are not overwritten.&#039;&#039;&#039; Tinker writes to the next available numeric suffix:&lt;br /&gt;
&lt;br /&gt;
 myfile.pdb      (original)&lt;br /&gt;
 myfile.pdb_2    (first xyzpdb output)&lt;br /&gt;
 myfile.pdb_3    (next xyzpdb output)&lt;br /&gt;
 …&lt;br /&gt;
&lt;br /&gt;
Same convention for &amp;lt;code&amp;gt;.xyz_2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.xyz_3&amp;lt;/code&amp;gt;, etc. The &#039;&#039;&#039;canonical&#039;&#039;&#039; PDB for this system is the first xyzpdb output (&amp;lt;code&amp;gt;myfile.pdb_2&amp;lt;/code&amp;gt;). Use that — not the raw crystal PDB — as your reference structure from this point on when comparing to simulation frames.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why do the round-trip:&#039;&#039;&#039;&lt;br /&gt;
* The crystal PDB contains headers (&amp;lt;code&amp;gt;HEADER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOURCE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMPND&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;REMARK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MASTER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CONECT&amp;lt;/code&amp;gt;…) and metadata that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; does not emit.&lt;br /&gt;
* Hydrogens added by &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; get standardized names/ordering.&lt;br /&gt;
* Atom numbering, chain ID handling, and record termination all match the Tinker convention after the round-trip.&lt;br /&gt;
&lt;br /&gt;
Without this step, a diff between the input PDB and a later xyzpdb output is dominated by format noise rather than real coordinate differences.&lt;br /&gt;
&lt;br /&gt;
= 2. Solvation and neutralization (Tinker-GUI) =&lt;br /&gt;
&lt;br /&gt;
System building is handled by &amp;lt;code&amp;gt;cli.py&amp;lt;/code&amp;gt; in [https://github.com/prenlab/Tinker-GUI Tinker-GUI] at &amp;lt;code&amp;gt;/path/to/Tinker-GUI&amp;lt;/code&amp;gt;. The program takes a YAML file and produces a minimization-ready &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; pair, plus intermediate files in &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== config.yaml ==&lt;br /&gt;
&lt;br /&gt;
Example for an RNA k-turn system with neutralizing Mg²⁺/Na⁺/Cl⁻, no added bulk salt, 12 Å buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
tinker_path: /path/to/Tinker8/latest/bin&lt;br /&gt;
amoeba_prm:  /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
output_prefix: minimize&lt;br /&gt;
solutes:&lt;br /&gt;
  nucleic_acid:&lt;br /&gt;
    - myfile.pdb            # use the round-tripped PDB from step 1&lt;br /&gt;
solvent:&lt;br /&gt;
  name: water&lt;br /&gt;
ions:&lt;br /&gt;
  neutralizers:&lt;br /&gt;
    - Mg2+&lt;br /&gt;
    - Na+&lt;br /&gt;
    - Cl-&lt;br /&gt;
  salts:&lt;br /&gt;
    names:&lt;br /&gt;
      - Mg2+&lt;br /&gt;
      - Na+&lt;br /&gt;
      - Cl-&lt;br /&gt;
    concentrations:&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
box:&lt;br /&gt;
  type: rectangular          # cubic or rectangular&lt;br /&gt;
  buffer: 12.0               # Å between solute and box wall&lt;br /&gt;
  # size: [60, 60, 60]       # if set, overrides buffer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Key fields:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;output_prefix&amp;lt;/code&amp;gt; — the prefix for the final output files. If set to &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;, Tinker-GUI writes &amp;lt;code&amp;gt;X_final.xyz&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;X_final.key&amp;lt;/code&amp;gt;. In the rest of this page we use &amp;lt;code&amp;gt;minimize&amp;lt;/code&amp;gt;, giving &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;neutralizers&amp;lt;/code&amp;gt; — Tinker-GUI adds whichever of these are needed to zero out the net charge. For RNA (negative backbone) you&#039;ll typically need Mg²⁺ and/or Na⁺.&lt;br /&gt;
* &amp;lt;code&amp;gt;salts.concentrations&amp;lt;/code&amp;gt; — set to 0.0 for pure counter-ion neutralization. Use non-zero values (mol/L) to add bulk salt on top of neutralization.&lt;br /&gt;
* &amp;lt;code&amp;gt;buffer: 12.0&amp;lt;/code&amp;gt; — distance from solute to the nearest box face. 12–15 Å is standard; 15 Å is safer for larger conformational changes.&lt;br /&gt;
&lt;br /&gt;
== Running Tinker-GUI ==&lt;br /&gt;
&lt;br /&gt;
 python /path/to/Tinker-GUI/cli.py -c config.yaml&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outputs:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; — solvated, neutralized starting structure&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; — matching key file with box dimensions and parameter path&lt;br /&gt;
* &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt; — intermediate files (solute-only xyz, water box, per-ion-addition snapshots, logs)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rerunning:&#039;&#039;&#039; if Tinker-GUI errors or you need to change config and re-run, always clear the intermediate directory first:&lt;br /&gt;
&lt;br /&gt;
 rm -rf temp&lt;br /&gt;
&lt;br /&gt;
Otherwise Tinker-GUI may pick up stale intermediates and silently produce a mismatched output. The same applies if you need to rebuild from scratch for any reason — delete &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sanity check ==&lt;br /&gt;
&lt;br /&gt;
Before proceeding, verify the system is sensible:&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  em&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Net charge should be 0&#039;&#039;&#039; (within rounding). If it isn&#039;t, see below.&lt;br /&gt;
* Total dipole should be finite (no NaNs).&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  ep&lt;br /&gt;
&lt;br /&gt;
* Every atom should have multipole and vdW parameters. Missing parameters on any atom means an unrecognized residue / atom name that &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; couldn&#039;t map.&lt;br /&gt;
&lt;br /&gt;
=== Fixing a non-zero net charge ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; reports a non-zero net charge, either the neutralizer list in &amp;lt;code&amp;gt;config.yaml&amp;lt;/code&amp;gt; was wrong, or the counts Tinker-GUI added don&#039;t quite cancel the solute charge. Don&#039;t re-run the full pipeline — edit the &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; directly. Two operations cover every case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Converting a water to an ion&#039;&#039;&#039; (when net charge is negative and you need another cation):&lt;br /&gt;
# Find a water molecule whose oxygen is far from the solute (e.g. ≥ 5 Å away).&lt;br /&gt;
# Delete both hydrogen lines of that water.&lt;br /&gt;
# Change the oxygen&#039;s atom type (last integer before the connectivity columns) to the desired ion&#039;s AMOEBA type — e.g. for Na⁺ in amoebabio18 the oxygen type (&amp;lt;code&amp;gt;349&amp;lt;/code&amp;gt;) becomes Na⁺ type (&amp;lt;code&amp;gt;352&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Clear the oxygen line&#039;s connectivity entries (an ion has no bonds).&lt;br /&gt;
# Update the atom count on line 1 of the file to match the new total (decrease by 2 for every water → ion conversion).&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber the remaining atom indices&#039;&#039;&#039; — Tinker is tolerant of gaps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deleting an ion&#039;&#039;&#039; (when net charge is positive and you have one more cation than needed):&lt;br /&gt;
# Delete the ion&#039;s atom line.&lt;br /&gt;
# Decrease the atom count on line 1 by 1.&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber&#039;&#039;&#039; — leave the gap in the indices.&lt;br /&gt;
&lt;br /&gt;
After either operation, re-run &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; to confirm the net charge is now 0. (There&#039;s also a script in &amp;lt;code&amp;gt;~/scripts/&amp;lt;/code&amp;gt; that does the water → Na⁺ replacement in bulk while respecting distance filters — useful when many waters need replacing to reach a target salt concentration.)&lt;br /&gt;
&lt;br /&gt;
= 3. Key file structure =&lt;br /&gt;
&lt;br /&gt;
All Tinker9 MD runs (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;) read a plain-text &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; file. Every key file in this protocol has the same three-part layout:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Default block&#039;&#039;&#039; — identical keywords in every key file (force field, integrator, cutoffs, thermostat/barostat). Only the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; &#039;&#039;value&#039;&#039; inside this block changes per step.&lt;br /&gt;
# &#039;&#039;&#039;Box axes&#039;&#039;&#039; — same three &amp;lt;code&amp;gt;a-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;b-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;c-axis&amp;lt;/code&amp;gt; lines in every key file for a given system, but the numeric values come from whatever Tinker-GUI wrote into &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; for your box.&lt;br /&gt;
# &#039;&#039;&#039;Step-specific terms&#039;&#039;&#039; — differ per step: the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line is present in some key files and absent in others, with varying force constant.&lt;br /&gt;
&lt;br /&gt;
== Default block ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brief rationale:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters …amoebabio18.prm&amp;lt;/code&amp;gt; — AMOEBA 2018 biomolecular parameter set (covers proteins and nucleic acids).&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt; — multi-timestep integrator; required for a 2 fs time step to be safe.&lt;br /&gt;
* &amp;lt;code&amp;gt;archive&amp;lt;/code&amp;gt; — write each dumped frame to &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;. Without this, Tinker9 only keeps the final frame.&lt;br /&gt;
* &amp;lt;code&amp;gt;ewald&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ewald-cutoff 7.0&amp;lt;/code&amp;gt; — real-space electrostatic cutoff for PME (long-range is handled in reciprocal space).&lt;br /&gt;
* &amp;lt;code&amp;gt;vdw-cutoff 12.0&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;vdw-correction&amp;lt;/code&amp;gt; — vdW cutoff and analytic long-range correction.&lt;br /&gt;
* &amp;lt;code&amp;gt;neighbor-list&amp;lt;/code&amp;gt; — pair-list speed-up, assumes box ≳ 2 × cutoff.&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-predict&amp;lt;/code&amp;gt; — reuse the previous step&#039;s induced-dipole solution as the initial guess (fewer solver iterations per step).&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps &amp;amp;lt;value&amp;amp;gt;&amp;lt;/code&amp;gt; — induced-dipole convergence threshold. &#039;&#039;&#039;This value is the one entry in the default block that changes per step&#039;&#039;&#039; (see table below).&lt;br /&gt;
* &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt; — Bussi velocity-rescaling thermostat (correct canonical fluctuations).&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt; — MC barostat for NPT. Inert during NVT runs, safe to leave in every key file.&lt;br /&gt;
&lt;br /&gt;
== Box axes (default but system-specific) ==&lt;br /&gt;
&lt;br /&gt;
Add directly below the default block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a-axis  XX.XXXX&lt;br /&gt;
b-axis  YY.YYYY&lt;br /&gt;
c-axis  ZZ.ZZZZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the numeric values verbatim from &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; (Tinker-GUI writes them there after solvation). The same three lines go into every key file for a given system. For a cubic box all three values are equal; for a rectangular box they differ.&lt;br /&gt;
&lt;br /&gt;
If minimization isn&#039;t converging, it&#039;s possible that the box size entered is slightly too small. Increase each axis by 1-4 to prevent atoms overlapping across  the periodic box boundaries.&lt;br /&gt;
&lt;br /&gt;
== Step-specific terms ==&lt;br /&gt;
&lt;br /&gt;
What actually changes between the key files in this protocol: the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; value inside the default block, and the presence / force constant of the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key file !! &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line&lt;br /&gt;
|-&lt;br /&gt;
| minimize.key         || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| heating.key          || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_10.key     || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 10.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_1.key      || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 1.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_0.1.key    || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_none.key   || 0.01    || &#039;&#039;(omit — no restraint line)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| production.key       || 0.001 (tunable, see Production section) || &#039;&#039;(omit)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = solute atom count (see Minimization section for the full convention — do &#039;&#039;&#039;not&#039;&#039;&#039; include added water / ions / kept crystal waters unless you explicitly want them restrained).&lt;br /&gt;
&lt;br /&gt;
Always add the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line (when present) with an inline comment noting what it restrains, so the key file is self-documenting:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION -1 1000 50.0   # solute atoms 1-1000, FC = 50 kcal/mol/Å²&lt;br /&gt;
&lt;br /&gt;
== Example: complete heating.key ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps 0.01&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&lt;br /&gt;
RESTRAIN-POSITION -1 1000 50.0   # solute atoms 1-1000, FC = 50 kcal/mol/Å²&lt;br /&gt;
&lt;br /&gt;
a-axis  62.2300&lt;br /&gt;
b-axis  62.2300&lt;br /&gt;
c-axis  62.2300&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every other key file in the protocol is built by changing only the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; value and / or the RESTRAIN-POSITION line, keeping everything else identical.&lt;br /&gt;
&lt;br /&gt;
= 4. Minimization =&lt;br /&gt;
&lt;br /&gt;
Performed by &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt; with a gradient tolerance of 0.5 kcal/mol/Å, using a key file that includes a position restraint on the solute:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION  -1  N  50.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = number of atoms in the original PDB&#039;&#039;&#039; (the solute only — the RNA). &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; restrains atoms 1 through N, leaving everything after atom N (added water, neutralizing ions, bulk salt) free to move. The force constant 50.0 is in kcal/mol/Å².&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If the source PDB already contained waters or ions that you kept through pdbxyz&#039;&#039;&#039;, set &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; to just the RNA atom count, not the RNA + original-waters count — otherwise those waters / ions are held in place too (a 1000-atom RNA plus 15 crystal waters gives a pdbxyz .xyz with 1045 atoms, but you should still set &amp;lt;code&amp;gt;N = 1000&amp;lt;/code&amp;gt; so the crystal waters can move).&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 minimize9  minimize_final.xyz  -k minimize.key  0.5&lt;br /&gt;
&lt;br /&gt;
The trailing &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt; is the gradient tolerance (RMS gradient at which minimization stops, kcal/mol/Å). &#039;&#039;&#039;0.5 is a good default&#039;&#039;&#039;; if minimization is unusually slow or grinds without converging, loosen it to e.g. &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt; — larger value = looser convergence = fewer iterations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why a restraint during minimization:&#039;&#039;&#039; without it, small clashes between water/ion placement and the solute can pull the solute geometry off the reference structure before dynamics even starts. The restraint also suppresses any collapse of the experimentally-determined conformation during the initial energy drop.&lt;br /&gt;
&lt;br /&gt;
= 5. Heating (restrained, NVT) =&lt;br /&gt;
&lt;br /&gt;
Five sequential NVT runs at increasing temperatures. All use the same key file (&amp;lt;code&amp;gt;heating.key&amp;lt;/code&amp;gt;) with &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; on the solute and &amp;lt;code&amp;gt;polar-eps 0.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! Temperature (K) !! Steps !! dt (fs) !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_10K   || 10  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_75K   || 75  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_150K  || 150 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_225K  || 225 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_298K  || 298 || 200 000 || 2.0 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Command used for each temperature:&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k heating.key  200000  2.0  10.0  2  &amp;lt;T&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Argument order: &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(2=NVT)  T_K&amp;lt;/code&amp;gt;. NVT does not take a pressure argument — do &#039;&#039;&#039;not&#039;&#039;&#039; append &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; at the end.&lt;br /&gt;
&lt;br /&gt;
The output trajectory &amp;lt;code&amp;gt;pre_production.arc&amp;lt;/code&amp;gt; accumulates across all five heating steps (Tinker9 appends to an existing &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;). Total heating time: 2 ns across 5 temperature rungs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why this schedule:&#039;&#039;&#039;&lt;br /&gt;
* Starting at 10 K avoids the initial velocity kick that would shake apart a minimized-but-cold system.&lt;br /&gt;
* Going straight to 298 K routinely produces &amp;quot;induced dipole not converging&amp;quot; errors in AMOEBA because of transient bad contacts. Gradual heating in 5 rungs drains that risk.&lt;br /&gt;
* The strong restraint (FC = 50) keeps the solute essentially frozen while solvent and ions thermalize.&lt;br /&gt;
&lt;br /&gt;
= 6. Restraint phase-down (NVT, 298 K) =&lt;br /&gt;
&lt;br /&gt;
Four sequential NVT runs at 298 K, stepping the solute position-restraint force constant down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! FC (kcal/mol/Å²) !! Steps !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_10    || 10.0 || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_1     || 1.0  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_0.1   || 0.1  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_None  || — (no restraint line) || 200 000 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each step uses a separate key file (&amp;lt;code&amp;gt;restraint_10.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_0.1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_none.key&amp;lt;/code&amp;gt;) that differs only in the RESTRAIN-POSITION line (absent in the last one).&lt;br /&gt;
&lt;br /&gt;
Command (NVT, no pressure argument):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k restraint_&amp;lt;FC&amp;gt;.key  200000  2.0  10.0  2  298&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why step down rather than release at once:&#039;&#039;&#039; an abrupt release at FC = 50 → 0 can cause a sudden &amp;quot;spring release&amp;quot; where the solute snaps to a lower-energy conformation that is different from the experimental reference. A 50 → 10 → 1 → 0.1 → 0 sequence lets the solute relax gradually while solvent / ion distribution tracks it.&lt;br /&gt;
&lt;br /&gt;
After this stage the system is fully equilibrated at 298 K, unrestrained, at the constant-volume box from solvation. 1.6 ns total across the 4 steps.&lt;br /&gt;
&lt;br /&gt;
= 7. Production (NPT) =&lt;br /&gt;
&lt;br /&gt;
The production run is NPT at 298 K, 1 atm, unrestrained:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt;, 2 fs timestep&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; — tunable, see below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Starting frame:&#039;&#039;&#039; extract the final frame of the pre-production trajectory into &amp;lt;code&amp;gt;production.xyz&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
 tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
Then launch production (NPT, so a pressure argument is required):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  production.xyz  -k production.key  5000000  2.0  10.0  4  298  1.0&lt;br /&gt;
&lt;br /&gt;
Argument order (NPT): &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(4=NPT)  T_K  P_atm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Production length is case-dependent.&#039;&#039;&#039; 5 000 000 steps × 2 fs = &#039;&#039;&#039;10 ns&#039;&#039;&#039; is an arbitrary default that&#039;s fine for a first pass; adjust &amp;lt;code&amp;gt;nsteps&amp;lt;/code&amp;gt; based on the system and the scientific question. Short equilibration-like checks can be 5 ns; publication-quality sampling for slow degrees of freedom may need 50–100 ns or more.&lt;br /&gt;
&lt;br /&gt;
== polar-eps tradeoff ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; sets the convergence threshold for the induced-dipole solver each step. &#039;&#039;&#039;It directly trades simulation speed against energy / force accuracy.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! polar-eps !! Relative speed !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0.01     || fastest  || Often sufficient for structural observables and general equilibration&lt;br /&gt;
|-&lt;br /&gt;
| 0.001    || medium   || Reasonable middle ground for routine production&lt;br /&gt;
|-&lt;br /&gt;
| 0.0001   || slow     || High accuracy; use when energetics / forces matter (e.g. free energy work)&lt;br /&gt;
|-&lt;br /&gt;
| 0.00001  || slowest  || Very precise; rarely needed for structural work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
More zeros = tighter convergence = more solver iterations per step = slower. Pick based on the tradeoff: 0.01 is often good enough, 0.0001 is very precise. Default to something around 0.001 unless you know you need tighter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why NPT for production:&#039;&#039;&#039; the box dimensions from the solvation step correspond to a density that is close to but not exactly 1.0 g/cc at 298 K under the AMOEBA potential. NPT lets the box settle to the correct density. Skipping this and running NVT with the as-built box can leave the system slightly compressed or stretched, which biases structural observables.&lt;br /&gt;
&lt;br /&gt;
= 8. Running on a GPU =&lt;br /&gt;
&lt;br /&gt;
All Tinker9 MD above runs on a single GPU. Select which GPU before launching:&lt;br /&gt;
&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
&lt;br /&gt;
The integer is the GPU index on that node. Change it (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, …) to select a different GPU on multi-GPU nodes.&lt;br /&gt;
&lt;br /&gt;
Typical launch on a GPU node:&lt;br /&gt;
&lt;br /&gt;
 ssh nodeXXX&lt;br /&gt;
 cd /path/to/project&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
 nohup bash masterscript.sh &amp;gt; masterscript.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
= Notes and common pitfalls =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Induced dipole not converging&#039;&#039;&#039; during heating almost always means the starting structure has a bad contact. Re-check minimization went to a reasonable gradient, and that the solvation step didn&#039;t place a water atop a solute atom. You can temporarily add &amp;lt;code&amp;gt;USOLVE-CUTOFF 0.0&amp;lt;/code&amp;gt; to the heating key if convergence is marginal; remove for production.&lt;br /&gt;
* &#039;&#039;&#039;RESTRAIN-POSITION force constant is in kcal/mol/Å²&#039;&#039;&#039;, not kcal/mol. Don&#039;t change the numbers without understanding the scale.&lt;br /&gt;
* &#039;&#039;&#039;Restarting a crashed run:&#039;&#039;&#039; Tinker9 resumes from &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; if present. To restart from scratch, remove both &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt; (otherwise the new trajectory appends to the old one).&lt;br /&gt;
* &#039;&#039;&#039;Stopping a running MD cleanly:&#039;&#039;&#039; &amp;lt;code&amp;gt;touch pre_production.end&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;production.end&amp;lt;/code&amp;gt;). Tinker9 checks for this file each frame and stops gracefully, leaving a valid &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; to resume from.&lt;br /&gt;
* &#039;&#039;&#039;Always &amp;lt;code&amp;gt;rm -rf temp&amp;lt;/code&amp;gt;&#039;&#039;&#039; before re-running Tinker-GUI.&lt;br /&gt;
&lt;br /&gt;
= Example masterscript =&lt;br /&gt;
&lt;br /&gt;
A reference Bash script that runs minimization → heating → restraint phase-down → production using the key-file and convention described above. Edit &amp;lt;code&amp;gt;TINKER_BIN&amp;lt;/code&amp;gt; and the parameter path at the top to match your installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env bash&lt;br /&gt;
set -euo pipefail&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Configuration&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
TINKER_BIN=&amp;quot;/path/to/Tinker9/latest/build&amp;quot;&lt;br /&gt;
AMOEBA_PRM=&amp;quot;/path/to/Tinker8/latest/params/amoebabio18.prm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COUNT_FILE=&amp;quot;./minimize_final.xyz&amp;quot;&lt;br /&gt;
INIT_KEY=&amp;quot;./minimize_final.key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [[ ! -f &amp;quot;$COUNT_FILE&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $COUNT_FILE not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
if [[ ! -f &amp;quot;$INIT_KEY&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $INIT_KEY not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# N = number of solute atoms in the original PDB (from the solute-only xyz&lt;br /&gt;
# produced by Tinker-GUI in temp/). Adjust manually if you want to restrain&lt;br /&gt;
# a different range.&lt;br /&gt;
first_line=&amp;quot;$(head -n 1 ./temp/minimize.xyz)&amp;quot;&lt;br /&gt;
N=&amp;quot;$(echo &amp;quot;$first_line&amp;quot; | grep -oE &#039;[0-9]+&#039; | head -n 1)&amp;quot;&lt;br /&gt;
if [[ -z &amp;quot;$N&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: could not read atom count from ./temp/minimize.xyz&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Pull a-axis / b-axis / c-axis lines from the starting key file&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
get_line_or_empty() {&lt;br /&gt;
    local key=&amp;quot;${1}&amp;quot;&lt;br /&gt;
    grep -i -E &amp;quot;^[[:space:]]*$key\b&amp;quot; &amp;quot;$INIT_KEY&amp;quot; | head -n1 || true&lt;br /&gt;
}&lt;br /&gt;
A_AXIS=&amp;quot;$(get_line_or_empty &#039;a-axis&#039;)&amp;quot;&lt;br /&gt;
B_AXIS=&amp;quot;$(get_line_or_empty &#039;b-axis&#039;)&amp;quot;&lt;br /&gt;
C_AXIS=&amp;quot;$(get_line_or_empty &#039;c-axis&#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
append_axes() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$A_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$A_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$B_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$B_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$C_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$C_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Key file generator&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
write_key_file() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  local restraint_val=&amp;quot;$2&amp;quot;&lt;br /&gt;
  local polar_eps=&amp;quot;$3&amp;quot;&lt;br /&gt;
  local add_restrain=&amp;quot;$4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  cat &amp;gt; &amp;quot;$outfile&amp;quot; &amp;lt;&amp;lt;EOF&lt;br /&gt;
parameters $AMOEBA_PRM&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps $polar_eps&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
  if [[ &amp;quot;$add_restrain&amp;quot; == &amp;quot;yes&amp;quot; &amp;amp;&amp;amp; -n &amp;quot;$restraint_val&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;RESTRAIN-POSITION -1 $N $restraint_val&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
  append_axes &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# filename              FC     polar-eps  restraint?&lt;br /&gt;
write_key_file &amp;quot;heating.key&amp;quot;         &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;minimize.key&amp;quot;        &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_10.key&amp;quot;    &amp;quot;10.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_1.key&amp;quot;     &amp;quot;1.0&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_0.1.key&amp;quot;   &amp;quot;0.1&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_none.key&amp;quot;  &amp;quot;&amp;quot;      &amp;quot;0.01&amp;quot;    &amp;quot;no&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;production.key&amp;quot;      &amp;quot;&amp;quot;      &amp;quot;0.001&amp;quot;   &amp;quot;no&amp;quot;    # tune polar-eps to taste&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Minimization&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Energy minimization ---&amp;quot;&lt;br /&gt;
&amp;quot;$TINKER_BIN/minimize9&amp;quot; minimize_final.xyz -k minimize.key 0.5&lt;br /&gt;
&lt;br /&gt;
cp minimize_final.xyz pre_production.xyz&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Heating (NVT, no pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Heating (5 rungs) ---&amp;quot;&lt;br /&gt;
for T in 10 75 150 225 298; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k heating.key \&lt;br /&gt;
        200000 2.0 10.0 2 &amp;quot;$T&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Restraint phase-down (NVT, 298 K)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Restraint phase-down ---&amp;quot;&lt;br /&gt;
for FC in 10 1 0.1 none; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k &amp;quot;restraint_${FC}.key&amp;quot; \&lt;br /&gt;
        200000 2.0 10.0 2 298&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Production (NPT, with pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Production ---&amp;quot;&lt;br /&gt;
xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
&amp;quot;$TINKER_BIN/dynamic9&amp;quot; production.xyz -k production.key \&lt;br /&gt;
    5000000 2.0 10.0 4 298 1.0&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;--- Done ---&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2181</id>
		<title>Tutorial:kturn tut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2181"/>
		<updated>2026-04-22T16:58:56Z</updated>

		<summary type="html">&lt;p&gt;Brendan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Purpose =&lt;br /&gt;
This page documents the standard protocol for preparing and running molecular dynamics (MD) simulations of RNA k-turn systems (and other similar small biomolecular solutes) using AMOEBA in Tinker9. It takes a starting PDB structure through system preparation, equilibration, and production MD. Umbrella sampling / pulling is &#039;&#039;&#039;not&#039;&#039;&#039; covered here.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
# Obtain a clean starting PDB&lt;br /&gt;
# Standardize the PDB via a &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; round-trip, which also generates the &amp;lt;code&amp;gt;.seq&amp;lt;/code&amp;gt; file&lt;br /&gt;
# Solvate + neutralize + build a key file with Tinker-GUI&lt;br /&gt;
# Energy minimization (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Heating: 5 temperatures with strong position restraints on the solute (NVT)&lt;br /&gt;
# Restraint phase-down: gradually relax position restraints at 298 K (NVT)&lt;br /&gt;
# Production: unrestrained NPT MD&lt;br /&gt;
&lt;br /&gt;
Force field: AMOEBA (&amp;lt;code&amp;gt;amoebabio18.prm&amp;lt;/code&amp;gt;). Engine: [https://github.com/TinkerTools/tinker Tinker8] and [https://github.com/TinkerTools/tinker9 Tinker9] (&amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= 1. PDB preparation =&lt;br /&gt;
&lt;br /&gt;
== Source PDB ==&lt;br /&gt;
&lt;br /&gt;
Start from a crystal / cryo-EM structure in PDB format. A good test / example system for this protocol is &#039;&#039;&#039;[https://www.rcsb.org/structure/5FJ0 PDB 5FJ0]&#039;&#039;&#039; — a 27-nt RNA k-turn. Download the file in &#039;&#039;&#039;PDB format&#039;&#039;&#039; (on RCSB: &#039;&#039;Download Files → PDB Format&#039;&#039;); the direct link is [https://files.rcsb.org/download/5FJ0.pdb files.rcsb.org/download/5FJ0.pdb]. The mmCIF format will not work with &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before running anything:&lt;br /&gt;
&lt;br /&gt;
* Decide the protonation states of ionizable residues (for RNA/DNA the standard assumption is deprotonated phosphates; for proteins use PROPKA or similar).&lt;br /&gt;
* Remove or keep heteroatoms intentionally (crystallographic waters, buffer ions, ligands). &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; will silently drop anything it doesn&#039;t recognize.&lt;br /&gt;
* Decide what to do with missing atoms/residues. If the structure is incomplete, fix it externally first (e.g. with PDBFixer) &#039;&#039;&#039;before&#039;&#039;&#039; the steps below.&lt;br /&gt;
&lt;br /&gt;
== pdbxyz → xyzpdb round-trip ==&lt;br /&gt;
&lt;br /&gt;
The goal of this step is to produce a PDB in the exact format that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; will emit from then on, so that any future PDB written from an MD trajectory (for visualization, diffing, or restart) is line-for-line comparable to the starting reference.&lt;br /&gt;
&lt;br /&gt;
 pdbxyz  myfile.pdb  -k tinker.key&lt;br /&gt;
 xyzpdb  myfile.xyz  -k tinker.key&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;tinker.key&amp;lt;/code&amp;gt; points at the AMOEBA parameter file:&lt;br /&gt;
&lt;br /&gt;
 parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pdbxyz outputs two files:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.xyz&amp;lt;/code&amp;gt; — the Tinker-format coordinate file&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; — a sequence / base-pair map of the solute. This file is required whenever &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; is run.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xyzpdb requires the .seq file to share the same prefix as the .xyz&#039;&#039;&#039; — there is no command-line option to point at a specific .seq. If you call &amp;lt;code&amp;gt;xyzpdb myfile.xyz&amp;lt;/code&amp;gt;, Tinker looks for &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; in the same directory. If you rename or move the .xyz, rename / copy the .seq to match.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output files are not overwritten.&#039;&#039;&#039; Tinker writes to the next available numeric suffix:&lt;br /&gt;
&lt;br /&gt;
 myfile.pdb      (original)&lt;br /&gt;
 myfile.pdb_2    (first xyzpdb output)&lt;br /&gt;
 myfile.pdb_3    (next xyzpdb output)&lt;br /&gt;
 …&lt;br /&gt;
&lt;br /&gt;
Same convention for &amp;lt;code&amp;gt;.xyz_2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.xyz_3&amp;lt;/code&amp;gt;, etc. The &#039;&#039;&#039;canonical&#039;&#039;&#039; PDB for this system is the first xyzpdb output (&amp;lt;code&amp;gt;myfile.pdb_2&amp;lt;/code&amp;gt;). Use that — not the raw crystal PDB — as your reference structure from this point on when comparing to simulation frames.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why do the round-trip:&#039;&#039;&#039;&lt;br /&gt;
* The crystal PDB contains headers (&amp;lt;code&amp;gt;HEADER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOURCE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMPND&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;REMARK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MASTER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CONECT&amp;lt;/code&amp;gt;…) and metadata that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; does not emit.&lt;br /&gt;
* Hydrogens added by &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; get standardized names/ordering.&lt;br /&gt;
* Atom numbering, chain ID handling, and record termination all match the Tinker convention after the round-trip.&lt;br /&gt;
&lt;br /&gt;
Without this step, a diff between the input PDB and a later xyzpdb output is dominated by format noise rather than real coordinate differences.&lt;br /&gt;
&lt;br /&gt;
= 2. Solvation and neutralization (Tinker-GUI) =&lt;br /&gt;
&lt;br /&gt;
System building is handled by &amp;lt;code&amp;gt;cli.py&amp;lt;/code&amp;gt; in [https://github.com/prenlab/Tinker-GUI Tinker-GUI] at &amp;lt;code&amp;gt;/path/to/Tinker-GUI&amp;lt;/code&amp;gt;. The program takes a YAML file and produces a minimization-ready &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; pair, plus intermediate files in &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== config.yaml ==&lt;br /&gt;
&lt;br /&gt;
Example for an RNA k-turn system with neutralizing Mg²⁺/Na⁺/Cl⁻, no added bulk salt, 12 Å buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
tinker_path: /path/to/Tinker8/latest/bin&lt;br /&gt;
amoeba_prm:  /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
output_prefix: minimize&lt;br /&gt;
solutes:&lt;br /&gt;
  nucleic_acid:&lt;br /&gt;
    - myfile.pdb            # use the round-tripped PDB from step 1&lt;br /&gt;
solvent:&lt;br /&gt;
  name: water&lt;br /&gt;
ions:&lt;br /&gt;
  neutralizers:&lt;br /&gt;
    - Mg2+&lt;br /&gt;
    - Na+&lt;br /&gt;
    - Cl-&lt;br /&gt;
  salts:&lt;br /&gt;
    names:&lt;br /&gt;
      - Mg2+&lt;br /&gt;
      - Na+&lt;br /&gt;
      - Cl-&lt;br /&gt;
    concentrations:&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
box:&lt;br /&gt;
  type: rectangular          # cubic or rectangular&lt;br /&gt;
  buffer: 12.0               # Å between solute and box wall&lt;br /&gt;
  # size: [60, 60, 60]       # if set, overrides buffer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Key fields:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;output_prefix&amp;lt;/code&amp;gt; — the prefix for the final output files. If set to &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;, Tinker-GUI writes &amp;lt;code&amp;gt;X_final.xyz&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;X_final.key&amp;lt;/code&amp;gt;. In the rest of this page we use &amp;lt;code&amp;gt;minimize&amp;lt;/code&amp;gt;, giving &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;neutralizers&amp;lt;/code&amp;gt; — Tinker-GUI adds whichever of these are needed to zero out the net charge. For RNA (negative backbone) you&#039;ll typically need Mg²⁺ and/or Na⁺.&lt;br /&gt;
* &amp;lt;code&amp;gt;salts.concentrations&amp;lt;/code&amp;gt; — set to 0.0 for pure counter-ion neutralization. Use non-zero values (mol/L) to add bulk salt on top of neutralization.&lt;br /&gt;
* &amp;lt;code&amp;gt;buffer: 12.0&amp;lt;/code&amp;gt; — distance from solute to the nearest box face. 12–15 Å is standard; 15 Å is safer for larger conformational changes.&lt;br /&gt;
&lt;br /&gt;
== Running Tinker-GUI ==&lt;br /&gt;
&lt;br /&gt;
 python /path/to/Tinker-GUI/cli.py -c config.yaml&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outputs:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; — solvated, neutralized starting structure&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; — matching key file with box dimensions and parameter path&lt;br /&gt;
* &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt; — intermediate files (solute-only xyz, water box, per-ion-addition snapshots, logs)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rerunning:&#039;&#039;&#039; if Tinker-GUI errors or you need to change config and re-run, always clear the intermediate directory first:&lt;br /&gt;
&lt;br /&gt;
 rm -rf temp&lt;br /&gt;
&lt;br /&gt;
Otherwise Tinker-GUI may pick up stale intermediates and silently produce a mismatched output. The same applies if you need to rebuild from scratch for any reason — delete &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sanity check ==&lt;br /&gt;
&lt;br /&gt;
Before proceeding, verify the system is sensible:&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  em&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Net charge should be 0&#039;&#039;&#039; (within rounding). If it isn&#039;t, see below.&lt;br /&gt;
* Total dipole should be finite (no NaNs).&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  ep&lt;br /&gt;
&lt;br /&gt;
* Every atom should have multipole and vdW parameters. Missing parameters on any atom means an unrecognized residue / atom name that &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; couldn&#039;t map.&lt;br /&gt;
&lt;br /&gt;
=== Fixing a non-zero net charge ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; reports a non-zero net charge, either the neutralizer list in &amp;lt;code&amp;gt;config.yaml&amp;lt;/code&amp;gt; was wrong, or the counts Tinker-GUI added don&#039;t quite cancel the solute charge. Don&#039;t re-run the full pipeline — edit the &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; directly. Two operations cover every case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Converting a water to an ion&#039;&#039;&#039; (when net charge is negative and you need another cation):&lt;br /&gt;
# Find a water molecule whose oxygen is far from the solute (e.g. ≥ 5 Å away).&lt;br /&gt;
# Delete both hydrogen lines of that water.&lt;br /&gt;
# Change the oxygen&#039;s atom type (last integer before the connectivity columns) to the desired ion&#039;s AMOEBA type — e.g. for Na⁺ in amoebabio18 the oxygen type (&amp;lt;code&amp;gt;349&amp;lt;/code&amp;gt;) becomes Na⁺ type (&amp;lt;code&amp;gt;352&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Clear the oxygen line&#039;s connectivity entries (an ion has no bonds).&lt;br /&gt;
# Update the atom count on line 1 of the file to match the new total (decrease by 2 for every water → ion conversion).&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber the remaining atom indices&#039;&#039;&#039; — Tinker is tolerant of gaps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deleting an ion&#039;&#039;&#039; (when net charge is positive and you have one more cation than needed):&lt;br /&gt;
# Delete the ion&#039;s atom line.&lt;br /&gt;
# Decrease the atom count on line 1 by 1.&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber&#039;&#039;&#039; — leave the gap in the indices.&lt;br /&gt;
&lt;br /&gt;
After either operation, re-run &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; to confirm the net charge is now 0. (There&#039;s also a script in &amp;lt;code&amp;gt;~/scripts/&amp;lt;/code&amp;gt; that does the water → Na⁺ replacement in bulk while respecting distance filters — useful when many waters need replacing to reach a target salt concentration.)&lt;br /&gt;
&lt;br /&gt;
= 3. Key file structure =&lt;br /&gt;
&lt;br /&gt;
All Tinker9 MD runs (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;) read a plain-text &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; file. Every key file in this protocol has the same three-part layout:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Default block&#039;&#039;&#039; — identical keywords in every key file (force field, integrator, cutoffs, thermostat/barostat). Only the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; &#039;&#039;value&#039;&#039; inside this block changes per step.&lt;br /&gt;
# &#039;&#039;&#039;Box axes&#039;&#039;&#039; — same three &amp;lt;code&amp;gt;a-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;b-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;c-axis&amp;lt;/code&amp;gt; lines in every key file for a given system, but the numeric values come from whatever Tinker-GUI wrote into &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; for your box.&lt;br /&gt;
# &#039;&#039;&#039;Step-specific terms&#039;&#039;&#039; — differ per step: the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line is present in some key files and absent in others, with varying force constant.&lt;br /&gt;
&lt;br /&gt;
== Default block ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brief rationale:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters …amoebabio18.prm&amp;lt;/code&amp;gt; — AMOEBA 2018 biomolecular parameter set (covers proteins and nucleic acids).&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt; — multi-timestep integrator; required for a 2 fs time step to be safe.&lt;br /&gt;
* &amp;lt;code&amp;gt;archive&amp;lt;/code&amp;gt; — write each dumped frame to &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;. Without this, Tinker9 only keeps the final frame.&lt;br /&gt;
* &amp;lt;code&amp;gt;ewald&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ewald-cutoff 7.0&amp;lt;/code&amp;gt; — real-space electrostatic cutoff for PME (long-range is handled in reciprocal space).&lt;br /&gt;
* &amp;lt;code&amp;gt;vdw-cutoff 12.0&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;vdw-correction&amp;lt;/code&amp;gt; — vdW cutoff and analytic long-range correction.&lt;br /&gt;
* &amp;lt;code&amp;gt;neighbor-list&amp;lt;/code&amp;gt; — pair-list speed-up, assumes box ≳ 2 × cutoff.&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-predict&amp;lt;/code&amp;gt; — reuse the previous step&#039;s induced-dipole solution as the initial guess (fewer solver iterations per step).&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps &amp;amp;lt;value&amp;amp;gt;&amp;lt;/code&amp;gt; — induced-dipole convergence threshold. &#039;&#039;&#039;This value is the one entry in the default block that changes per step&#039;&#039;&#039; (see table below).&lt;br /&gt;
* &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt; — Bussi velocity-rescaling thermostat (correct canonical fluctuations).&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt; — MC barostat for NPT. Inert during NVT runs, safe to leave in every key file.&lt;br /&gt;
&lt;br /&gt;
== Box axes (default but system-specific) ==&lt;br /&gt;
&lt;br /&gt;
Add directly below the default block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a-axis  XX.XXXX&lt;br /&gt;
b-axis  YY.YYYY&lt;br /&gt;
c-axis  ZZ.ZZZZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the numeric values verbatim from &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; (Tinker-GUI writes them there after solvation). The same three lines go into every key file for a given system. For a cubic box all three values are equal; for a rectangular box they differ.&lt;br /&gt;
&lt;br /&gt;
== Step-specific terms ==&lt;br /&gt;
&lt;br /&gt;
What actually changes between the key files in this protocol: the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; value inside the default block, and the presence / force constant of the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key file !! &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line&lt;br /&gt;
|-&lt;br /&gt;
| minimize.key         || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| heating.key          || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_10.key     || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 10.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_1.key      || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 1.0&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_0.1.key    || 0.01    || &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| restraint_none.key   || 0.01    || &#039;&#039;(omit — no restraint line)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| production.key       || 0.001 (tunable, see Production section) || &#039;&#039;(omit)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = solute atom count (see Minimization section for the full convention — do &#039;&#039;&#039;not&#039;&#039;&#039; include added water / ions / kept crystal waters unless you explicitly want them restrained).&lt;br /&gt;
&lt;br /&gt;
Always add the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line (when present) with an inline comment noting what it restrains, so the key file is self-documenting:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION -1 1000 50.0   # solute atoms 1-1000, FC = 50 kcal/mol/Å²&lt;br /&gt;
&lt;br /&gt;
== Example: complete heating.key ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps 0.01&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&lt;br /&gt;
RESTRAIN-POSITION -1 1000 50.0   # solute atoms 1-1000, FC = 50 kcal/mol/Å²&lt;br /&gt;
&lt;br /&gt;
a-axis  62.2300&lt;br /&gt;
b-axis  62.2300&lt;br /&gt;
c-axis  62.2300&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every other key file in the protocol is built by changing only the &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; value and / or the RESTRAIN-POSITION line, keeping everything else identical.&lt;br /&gt;
&lt;br /&gt;
= 4. Minimization =&lt;br /&gt;
&lt;br /&gt;
Performed by &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt; with a gradient tolerance of 0.5 kcal/mol/Å, using a key file that includes a position restraint on the solute:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION  -1  N  50.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = number of atoms in the original PDB&#039;&#039;&#039; (the solute only — the RNA). &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; restrains atoms 1 through N, leaving everything after atom N (added water, neutralizing ions, bulk salt) free to move. The force constant 50.0 is in kcal/mol/Å².&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If the source PDB already contained waters or ions that you kept through pdbxyz&#039;&#039;&#039;, set &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; to just the RNA atom count, not the RNA + original-waters count — otherwise those waters / ions are held in place too (a 1000-atom RNA plus 15 crystal waters gives a pdbxyz .xyz with 1045 atoms, but you should still set &amp;lt;code&amp;gt;N = 1000&amp;lt;/code&amp;gt; so the crystal waters can move).&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 minimize9  minimize_final.xyz  -k minimize.key  0.5&lt;br /&gt;
&lt;br /&gt;
The trailing &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt; is the gradient tolerance (RMS gradient at which minimization stops, kcal/mol/Å). &#039;&#039;&#039;0.5 is a good default&#039;&#039;&#039;; if minimization is unusually slow or grinds without converging, loosen it to e.g. &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt; — larger value = looser convergence = fewer iterations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why a restraint during minimization:&#039;&#039;&#039; without it, small clashes between water/ion placement and the solute can pull the solute geometry off the reference structure before dynamics even starts. The restraint also suppresses any collapse of the experimentally-determined conformation during the initial energy drop.&lt;br /&gt;
&lt;br /&gt;
= 5. Heating (restrained, NVT) =&lt;br /&gt;
&lt;br /&gt;
Five sequential NVT runs at increasing temperatures. All use the same key file (&amp;lt;code&amp;gt;heating.key&amp;lt;/code&amp;gt;) with &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; on the solute and &amp;lt;code&amp;gt;polar-eps 0.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! Temperature (K) !! Steps !! dt (fs) !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_10K   || 10  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_75K   || 75  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_150K  || 150 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_225K  || 225 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_298K  || 298 || 200 000 || 2.0 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Command used for each temperature:&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k heating.key  200000  2.0  10.0  2  &amp;lt;T&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Argument order: &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(2=NVT)  T_K&amp;lt;/code&amp;gt;. NVT does not take a pressure argument — do &#039;&#039;&#039;not&#039;&#039;&#039; append &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; at the end.&lt;br /&gt;
&lt;br /&gt;
The output trajectory &amp;lt;code&amp;gt;pre_production.arc&amp;lt;/code&amp;gt; accumulates across all five heating steps (Tinker9 appends to an existing &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;). Total heating time: 2 ns across 5 temperature rungs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why this schedule:&#039;&#039;&#039;&lt;br /&gt;
* Starting at 10 K avoids the initial velocity kick that would shake apart a minimized-but-cold system.&lt;br /&gt;
* Going straight to 298 K routinely produces &amp;quot;induced dipole not converging&amp;quot; errors in AMOEBA because of transient bad contacts. Gradual heating in 5 rungs drains that risk.&lt;br /&gt;
* The strong restraint (FC = 50) keeps the solute essentially frozen while solvent and ions thermalize.&lt;br /&gt;
&lt;br /&gt;
= 6. Restraint phase-down (NVT, 298 K) =&lt;br /&gt;
&lt;br /&gt;
Four sequential NVT runs at 298 K, stepping the solute position-restraint force constant down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! FC (kcal/mol/Å²) !! Steps !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_10    || 10.0 || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_1     || 1.0  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_0.1   || 0.1  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_None  || — (no restraint line) || 200 000 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each step uses a separate key file (&amp;lt;code&amp;gt;restraint_10.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_0.1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_none.key&amp;lt;/code&amp;gt;) that differs only in the RESTRAIN-POSITION line (absent in the last one).&lt;br /&gt;
&lt;br /&gt;
Command (NVT, no pressure argument):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k restraint_&amp;lt;FC&amp;gt;.key  200000  2.0  10.0  2  298&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why step down rather than release at once:&#039;&#039;&#039; an abrupt release at FC = 50 → 0 can cause a sudden &amp;quot;spring release&amp;quot; where the solute snaps to a lower-energy conformation that is different from the experimental reference. A 50 → 10 → 1 → 0.1 → 0 sequence lets the solute relax gradually while solvent / ion distribution tracks it.&lt;br /&gt;
&lt;br /&gt;
After this stage the system is fully equilibrated at 298 K, unrestrained, at the constant-volume box from solvation. 1.6 ns total across the 4 steps.&lt;br /&gt;
&lt;br /&gt;
= 7. Production (NPT) =&lt;br /&gt;
&lt;br /&gt;
The production run is NPT at 298 K, 1 atm, unrestrained:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt;, 2 fs timestep&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; — tunable, see below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Starting frame:&#039;&#039;&#039; extract the final frame of the pre-production trajectory into &amp;lt;code&amp;gt;production.xyz&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
 tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
Then launch production (NPT, so a pressure argument is required):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  production.xyz  -k production.key  5000000  2.0  10.0  4  298  1.0&lt;br /&gt;
&lt;br /&gt;
Argument order (NPT): &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(4=NPT)  T_K  P_atm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Production length is case-dependent.&#039;&#039;&#039; 5 000 000 steps × 2 fs = &#039;&#039;&#039;10 ns&#039;&#039;&#039; is an arbitrary default that&#039;s fine for a first pass; adjust &amp;lt;code&amp;gt;nsteps&amp;lt;/code&amp;gt; based on the system and the scientific question. Short equilibration-like checks can be 5 ns; publication-quality sampling for slow degrees of freedom may need 50–100 ns or more.&lt;br /&gt;
&lt;br /&gt;
== polar-eps tradeoff ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; sets the convergence threshold for the induced-dipole solver each step. &#039;&#039;&#039;It directly trades simulation speed against energy / force accuracy.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! polar-eps !! Relative speed !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0.01     || fastest  || Often sufficient for structural observables and general equilibration&lt;br /&gt;
|-&lt;br /&gt;
| 0.001    || medium   || Reasonable middle ground for routine production&lt;br /&gt;
|-&lt;br /&gt;
| 0.0001   || slow     || High accuracy; use when energetics / forces matter (e.g. free energy work)&lt;br /&gt;
|-&lt;br /&gt;
| 0.00001  || slowest  || Very precise; rarely needed for structural work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
More zeros = tighter convergence = more solver iterations per step = slower. Pick based on the tradeoff: 0.01 is often good enough, 0.0001 is very precise. Default to something around 0.001 unless you know you need tighter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why NPT for production:&#039;&#039;&#039; the box dimensions from the solvation step correspond to a density that is close to but not exactly 1.0 g/cc at 298 K under the AMOEBA potential. NPT lets the box settle to the correct density. Skipping this and running NVT with the as-built box can leave the system slightly compressed or stretched, which biases structural observables.&lt;br /&gt;
&lt;br /&gt;
= 8. Running on a GPU =&lt;br /&gt;
&lt;br /&gt;
All Tinker9 MD above runs on a single GPU. Select which GPU before launching:&lt;br /&gt;
&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
&lt;br /&gt;
The integer is the GPU index on that node. Change it (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, …) to select a different GPU on multi-GPU nodes.&lt;br /&gt;
&lt;br /&gt;
Typical launch on a GPU node:&lt;br /&gt;
&lt;br /&gt;
 ssh nodeXXX&lt;br /&gt;
 cd /path/to/project&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
 nohup bash masterscript.sh &amp;gt; masterscript.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
= Notes and common pitfalls =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Induced dipole not converging&#039;&#039;&#039; during heating almost always means the starting structure has a bad contact. Re-check minimization went to a reasonable gradient, and that the solvation step didn&#039;t place a water atop a solute atom. You can temporarily add &amp;lt;code&amp;gt;USOLVE-CUTOFF 0.0&amp;lt;/code&amp;gt; to the heating key if convergence is marginal; remove for production.&lt;br /&gt;
* &#039;&#039;&#039;RESTRAIN-POSITION force constant is in kcal/mol/Å²&#039;&#039;&#039;, not kcal/mol. Don&#039;t change the numbers without understanding the scale.&lt;br /&gt;
* &#039;&#039;&#039;Restarting a crashed run:&#039;&#039;&#039; Tinker9 resumes from &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; if present. To restart from scratch, remove both &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt; (otherwise the new trajectory appends to the old one).&lt;br /&gt;
* &#039;&#039;&#039;Stopping a running MD cleanly:&#039;&#039;&#039; &amp;lt;code&amp;gt;touch pre_production.end&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;production.end&amp;lt;/code&amp;gt;). Tinker9 checks for this file each frame and stops gracefully, leaving a valid &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; to resume from.&lt;br /&gt;
* &#039;&#039;&#039;Always &amp;lt;code&amp;gt;rm -rf temp&amp;lt;/code&amp;gt;&#039;&#039;&#039; before re-running Tinker-GUI.&lt;br /&gt;
&lt;br /&gt;
= Example masterscript =&lt;br /&gt;
&lt;br /&gt;
A reference Bash script that runs minimization → heating → restraint phase-down → production using the key-file and convention described above. Edit &amp;lt;code&amp;gt;TINKER_BIN&amp;lt;/code&amp;gt; and the parameter path at the top to match your installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env bash&lt;br /&gt;
set -euo pipefail&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Configuration&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
TINKER_BIN=&amp;quot;/path/to/Tinker9/latest/build&amp;quot;&lt;br /&gt;
AMOEBA_PRM=&amp;quot;/path/to/Tinker8/latest/params/amoebabio18.prm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COUNT_FILE=&amp;quot;./minimize_final.xyz&amp;quot;&lt;br /&gt;
INIT_KEY=&amp;quot;./minimize_final.key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [[ ! -f &amp;quot;$COUNT_FILE&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $COUNT_FILE not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
if [[ ! -f &amp;quot;$INIT_KEY&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $INIT_KEY not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# N = number of solute atoms in the original PDB (from the solute-only xyz&lt;br /&gt;
# produced by Tinker-GUI in temp/). Adjust manually if you want to restrain&lt;br /&gt;
# a different range.&lt;br /&gt;
first_line=&amp;quot;$(head -n 1 ./temp/minimize.xyz)&amp;quot;&lt;br /&gt;
N=&amp;quot;$(echo &amp;quot;$first_line&amp;quot; | grep -oE &#039;[0-9]+&#039; | head -n 1)&amp;quot;&lt;br /&gt;
if [[ -z &amp;quot;$N&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: could not read atom count from ./temp/minimize.xyz&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Pull a-axis / b-axis / c-axis lines from the starting key file&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
get_line_or_empty() {&lt;br /&gt;
    local key=&amp;quot;${1}&amp;quot;&lt;br /&gt;
    grep -i -E &amp;quot;^[[:space:]]*$key\b&amp;quot; &amp;quot;$INIT_KEY&amp;quot; | head -n1 || true&lt;br /&gt;
}&lt;br /&gt;
A_AXIS=&amp;quot;$(get_line_or_empty &#039;a-axis&#039;)&amp;quot;&lt;br /&gt;
B_AXIS=&amp;quot;$(get_line_or_empty &#039;b-axis&#039;)&amp;quot;&lt;br /&gt;
C_AXIS=&amp;quot;$(get_line_or_empty &#039;c-axis&#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
append_axes() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$A_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$A_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$B_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$B_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$C_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$C_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Key file generator&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
write_key_file() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  local restraint_val=&amp;quot;$2&amp;quot;&lt;br /&gt;
  local polar_eps=&amp;quot;$3&amp;quot;&lt;br /&gt;
  local add_restrain=&amp;quot;$4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  cat &amp;gt; &amp;quot;$outfile&amp;quot; &amp;lt;&amp;lt;EOF&lt;br /&gt;
parameters $AMOEBA_PRM&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps $polar_eps&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
  if [[ &amp;quot;$add_restrain&amp;quot; == &amp;quot;yes&amp;quot; &amp;amp;&amp;amp; -n &amp;quot;$restraint_val&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;RESTRAIN-POSITION -1 $N $restraint_val&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
  append_axes &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# filename              FC     polar-eps  restraint?&lt;br /&gt;
write_key_file &amp;quot;heating.key&amp;quot;         &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;minimize.key&amp;quot;        &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_10.key&amp;quot;    &amp;quot;10.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_1.key&amp;quot;     &amp;quot;1.0&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_0.1.key&amp;quot;   &amp;quot;0.1&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_none.key&amp;quot;  &amp;quot;&amp;quot;      &amp;quot;0.01&amp;quot;    &amp;quot;no&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;production.key&amp;quot;      &amp;quot;&amp;quot;      &amp;quot;0.001&amp;quot;   &amp;quot;no&amp;quot;    # tune polar-eps to taste&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Minimization&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Energy minimization ---&amp;quot;&lt;br /&gt;
&amp;quot;$TINKER_BIN/minimize9&amp;quot; minimize_final.xyz -k minimize.key 0.5&lt;br /&gt;
&lt;br /&gt;
cp minimize_final.xyz pre_production.xyz&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Heating (NVT, no pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Heating (5 rungs) ---&amp;quot;&lt;br /&gt;
for T in 10 75 150 225 298; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k heating.key \&lt;br /&gt;
        200000 2.0 10.0 2 &amp;quot;$T&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Restraint phase-down (NVT, 298 K)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Restraint phase-down ---&amp;quot;&lt;br /&gt;
for FC in 10 1 0.1 none; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k &amp;quot;restraint_${FC}.key&amp;quot; \&lt;br /&gt;
        200000 2.0 10.0 2 298&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Production (NPT, with pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Production ---&amp;quot;&lt;br /&gt;
xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
&amp;quot;$TINKER_BIN/dynamic9&amp;quot; production.xyz -k production.key \&lt;br /&gt;
    5000000 2.0 10.0 4 298 1.0&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;--- Done ---&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2180</id>
		<title>Tutorial:kturn tut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2180"/>
		<updated>2026-04-22T16:57:43Z</updated>

		<summary type="html">&lt;p&gt;Brendan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Purpose =&lt;br /&gt;
This page documents the standard protocol for preparing and running molecular dynamics (MD) simulations of RNA k-turn systems (and other similar small biomolecular solutes) using AMOEBA in Tinker9. It takes a starting PDB structure through system preparation, equilibration, and production MD. Umbrella sampling / pulling is &#039;&#039;&#039;not&#039;&#039;&#039; covered here; see the umbrella sampling / REUS pages for that.&lt;br /&gt;
&lt;br /&gt;
The protocol is implemented by &amp;lt;code&amp;gt;~/scripts/base_masterscript.sh&amp;lt;/code&amp;gt; (copied into each project as &amp;lt;code&amp;gt;masterscript.sh&amp;lt;/code&amp;gt;). This page describes what that script does, the steps before it runs, and the reasoning behind each choice.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
# Obtain a clean starting PDB&lt;br /&gt;
# Standardize the PDB via a &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; round-trip&lt;br /&gt;
# Solvate + neutralize + build a key file with &amp;lt;code&amp;gt;Tinker-GUI/cli.py&amp;lt;/code&amp;gt;&lt;br /&gt;
# Energy minimization (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Heating: 5 temperatures with strong position restraints on the solute (NVT)&lt;br /&gt;
# Restraint phase-down: gradually relax position restraints at 298 K (NVT)&lt;br /&gt;
# Production: unrestrained NPT MD&lt;br /&gt;
&lt;br /&gt;
Force field: AMOEBA (&amp;lt;code&amp;gt;amoebabio18.prm&amp;lt;/code&amp;gt;). Engine: Tinker9 (&amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= 1. PDB preparation =&lt;br /&gt;
&lt;br /&gt;
== Source PDB ==&lt;br /&gt;
&lt;br /&gt;
Start from a crystal / cryo-EM structure in PDB format. Before running anything:&lt;br /&gt;
&lt;br /&gt;
* Decide the protonation states of ionizable residues (for RNA/DNA the standard assumption is deprotonated phosphates; for proteins use PROPKA or similar).&lt;br /&gt;
* Remove or keep heteroatoms intentionally (crystallographic waters, buffer ions, ligands). &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; will silently drop anything it doesn&#039;t recognize.&lt;br /&gt;
* Decide what to do with missing atoms/residues. If the structure is incomplete, fix it externally first (e.g. with PDBFixer) &#039;&#039;&#039;before&#039;&#039;&#039; the steps below.&lt;br /&gt;
&lt;br /&gt;
== pdbxyz → xyzpdb round-trip ==&lt;br /&gt;
&lt;br /&gt;
The goal of this step is to produce a PDB in the exact format that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; will emit from then on, so that any future PDB written from an MD trajectory (e.g. for visualization, diffing, or restart) is line-for-line comparable to the starting reference.&lt;br /&gt;
&lt;br /&gt;
 pdbxyz  input.pdb  -k tinker.key&lt;br /&gt;
 xyzpdb  input.xyz  -k tinker.key&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;tinker.key&amp;lt;/code&amp;gt; points at the AMOEBA parameter file:&lt;br /&gt;
 parameters /home/yw24267/programs/tinker/Tinker8/2501/params/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;lt;code&amp;gt;input.pdb&amp;lt;/code&amp;gt; (overwriting the input, so back up the original) is the &#039;&#039;&#039;canonical&#039;&#039;&#039; PDB for this system. Use this as your reference structure from this point on — not the crystal PDB — when comparing to simulation frames.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why do the round-trip:&#039;&#039;&#039;&lt;br /&gt;
* The crystal PDB contains headers (&amp;lt;code&amp;gt;HEADER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOURCE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMPND&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;REMARK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MASTER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CONECT&amp;lt;/code&amp;gt;…) and metadata that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; does not emit.&lt;br /&gt;
* Hydrogens added by &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; get standardized names/ordering.&lt;br /&gt;
* Atom numbering, chain ID handling, and record termination match the Tinker convention after the round-trip.&lt;br /&gt;
&lt;br /&gt;
Without this step, a diff between the input PDB and later xyzpdb output is dominated by format noise rather than real coordinate differences.&lt;br /&gt;
&lt;br /&gt;
= 2. Solvation and neutralization (Tinker-GUI) =&lt;br /&gt;
&lt;br /&gt;
System building is handled by &amp;lt;code&amp;gt;cli.py&amp;lt;/code&amp;gt; in [https://github.com/prenlab/Tinker-GUI Tinker-GUI]. The CLI takes a YAML config and produces a minimized-ready &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; pair plus intermediates in &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== config.yaml ==&lt;br /&gt;
&lt;br /&gt;
Example for an RNA k-turn system with neutralizing Mg²⁺/Na⁺/Cl⁻, no added bulk salt, 12 Å buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
tinker_path: /home/yw24267/programs/tinker/Tinker8/2501/bin&lt;br /&gt;
amoeba_prm:  /home/yw24267/programs/tinker/Tinker8/2501/params/amoebabio18.prm&lt;br /&gt;
output_prefix: minimize&lt;br /&gt;
solutes:&lt;br /&gt;
  nucleic_acid:&lt;br /&gt;
    - myrna.pdb             # use the round-tripped PDB from step 1&lt;br /&gt;
solvent:&lt;br /&gt;
  name: water&lt;br /&gt;
ions:&lt;br /&gt;
  neutralizers:&lt;br /&gt;
    - Mg2+&lt;br /&gt;
    - Na+&lt;br /&gt;
    - Cl-&lt;br /&gt;
  salts:&lt;br /&gt;
    names:&lt;br /&gt;
      - Mg2+&lt;br /&gt;
      - Na+&lt;br /&gt;
      - Cl-&lt;br /&gt;
    concentrations:&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
box:&lt;br /&gt;
  type: rectangular          # cubic or rectangular&lt;br /&gt;
  buffer: 12.0               # Å between solute and box wall&lt;br /&gt;
  # size: [60, 60, 60]       # if set, overrides buffer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Key fields:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;output_prefix: minimize&amp;lt;/code&amp;gt; — the downstream masterscript expects &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt;, so keep this as &amp;lt;code&amp;gt;minimize&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;neutralizers&amp;lt;/code&amp;gt; — the CLI adds whichever of these are needed to zero out the net charge. For RNA (negative backbone) you&#039;ll typically need Mg²⁺ and/or Na⁺.&lt;br /&gt;
* &amp;lt;code&amp;gt;salts.concentrations&amp;lt;/code&amp;gt; — set to 0.0 for pure counter-ion neutralization. Use non-zero values (mol/L) to add bulk salt on top of neutralization.&lt;br /&gt;
* &amp;lt;code&amp;gt;buffer: 12.0&amp;lt;/code&amp;gt; — distance from solute to the nearest box face. 12–15 Å is standard; 15 Å is safer for larger conformational changes.&lt;br /&gt;
&lt;br /&gt;
== Running the CLI ==&lt;br /&gt;
&lt;br /&gt;
 python /home/bae969/programs/Tinker-GUI/cli.py -c config.yaml&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outputs:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; — solvated, neutralized starting structure&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; — matching key file with box dimensions and parameter path&lt;br /&gt;
* &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt; — intermediate files (solute-only xyz, water box, per-ion-addition snapshots, logs). &#039;&#039;&#039;Do not delete&#039;&#039;&#039; &amp;lt;code&amp;gt;temp/minimize.xyz&amp;lt;/code&amp;gt; — the masterscript reads it to determine how many solute atoms to restrain.&lt;br /&gt;
&lt;br /&gt;
== Sanity check ==&lt;br /&gt;
&lt;br /&gt;
Before proceeding, verify the system is sensible:&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  em&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Net charge should be 0&#039;&#039;&#039; (within rounding). If not, the neutralizer list in config.yaml needs adjustment.&lt;br /&gt;
* Total dipole should be finite (no NaNs).&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  ep&lt;br /&gt;
&lt;br /&gt;
* Every atom should have multipole and vdW parameters. Missing parameters on any atom means an unrecognized residue / atom name that &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; couldn&#039;t map.&lt;br /&gt;
&lt;br /&gt;
= 3. Minimization =&lt;br /&gt;
&lt;br /&gt;
Performed by &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt; with a gradient tolerance of 0.5 kcal/mol/Å using a key file that &#039;&#039;&#039;includes a position restraint on the solute&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION  -1  N  50.0&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; is the number of solute atoms (read by the masterscript from &amp;lt;code&amp;gt;temp/minimize.xyz&amp;lt;/code&amp;gt;). The restraint keeps the solute near its starting coordinates while water and ions relax around it. The force constant 50.0 is in kcal/mol/Å².&lt;br /&gt;
&lt;br /&gt;
The exact command run by the masterscript:&lt;br /&gt;
&lt;br /&gt;
 minimize9  minimize_final.xyz  -k minimize.key  0.5&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why a restraint during minimization:&#039;&#039;&#039; without it, small clashes between water/ion placement and the solute can pull the solute geometry off the reference structure before dynamics even starts. The restraint also suppresses any collapse of the experimentally-determined conformation during the initial energy drop.&lt;br /&gt;
&lt;br /&gt;
= 4. Heating (restrained, NVT) =&lt;br /&gt;
&lt;br /&gt;
Five sequential NVT runs at increasing temperatures, all with the same key file (&amp;lt;code&amp;gt;heating.key&amp;lt;/code&amp;gt;, FC = 50 kcal/mol/Å² on all solute atoms, &amp;lt;code&amp;gt;polar-eps 0.01&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! Temperature (K) !! Steps !! dt (fs) !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_10K   || 10  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_75K   || 75  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_150K  || 150 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_225K  || 225 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_298K  || 298 || 200 000 || 2.0 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Command used for each:&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k heating.key  200000  2.0  10.0  2  &amp;lt;T&amp;gt;  1.0&lt;br /&gt;
&lt;br /&gt;
Argument order: &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(2=NVT)  T_K  P_atm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The output trajectory &amp;lt;code&amp;gt;pre_production.arc&amp;lt;/code&amp;gt; accumulates across all five heating steps (Tinker9 appends to an existing &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;). Total heating time: 2 ns across 5 temperature rungs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why this schedule:&#039;&#039;&#039;&lt;br /&gt;
* Starting at 10 K avoids the initial velocity kick that would shake apart a minimized-but-cold system.&lt;br /&gt;
* Going straight to 298 K routinely produces &amp;quot;induced dipole not converging&amp;quot; errors in AMOEBA because of transient bad contacts. Gradual heating in 5 rungs drains that risk.&lt;br /&gt;
* The strong restraint (FC = 50) keeps the solute essentially frozen while solvent and ions thermalize.&lt;br /&gt;
&lt;br /&gt;
= 5. Restraint phase-down (NVT, 298 K) =&lt;br /&gt;
&lt;br /&gt;
Four sequential NVT runs at 298 K, each stepping the solute position-restraint force constant down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! FC (kcal/mol/Å²) !! Steps !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_10    || 10.0 || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_1     || 1.0  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_0.1   || 0.1  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_None  || —    || 200 000 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each step uses a separate key file (&amp;lt;code&amp;gt;restraint_10.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_0.1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_none.key&amp;lt;/code&amp;gt;) that differs only in the RESTRAIN-POSITION line (absent in the last one).&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k restraint_&amp;lt;FC&amp;gt;.key  200000  2.0  10.0  2  298  1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why step down rather than release at once:&#039;&#039;&#039; an abrupt release at FC = 50 → 0 can cause a sudden &amp;quot;spring release&amp;quot; where the solute snaps to a lower-energy conformation that is different from the experimental reference. A 50 → 10 → 1 → 0.1 → 0 sequence lets the solute relax gradually while solvent/ion distribution tracks it.&lt;br /&gt;
&lt;br /&gt;
After this stage the system is fully equilibrated at 298 K, unrestrained, at the constant-volume box from solvation. 1.6 ns total across the 4 steps.&lt;br /&gt;
&lt;br /&gt;
= 6. Production (NPT) =&lt;br /&gt;
&lt;br /&gt;
The production run is NPT at 298 K, 1 atm, unrestrained, with a tighter polarization convergence:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps 0.0001&amp;lt;/code&amp;gt; (vs 0.01 during equilibration)&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt;, 2 fs timestep&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Starting frame:&#039;&#039;&#039; the masterscript extracts the &#039;&#039;&#039;final frame&#039;&#039;&#039; of the &amp;lt;code&amp;gt;pre_production.arc&amp;lt;/code&amp;gt; trajectory (the last &amp;lt;code&amp;gt;xyz_linecount&amp;lt;/code&amp;gt; lines) into &amp;lt;code&amp;gt;production.xyz&amp;lt;/code&amp;gt;, then launches production from there:&lt;br /&gt;
&lt;br /&gt;
 tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
 dynamic9  production.xyz  -k production.key  20000000  2.0  10.0  4  298  1.0&lt;br /&gt;
&lt;br /&gt;
Argument order (NPT): &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(4=NPT)  T_K  P_atm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
20 000 000 steps × 2 fs = &#039;&#039;&#039;40 ns&#039;&#039;&#039; production. Frames are written every 10 ps (4 000 frames total). Adjust &amp;lt;code&amp;gt;nsteps&amp;lt;/code&amp;gt; for the system / question — 20–100 ns is typical.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why NPT for production:&#039;&#039;&#039; the box dimensions from the solvation step correspond to a density that is close to but not exactly 1.0 g/cc at 298 K. NPT lets the box settle to the correct density under the AMOEBA potential. Skipping this and running NVT with the as-built box can leave the system slightly compressed or stretched, which biases structural observables.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why tighter &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt;:&#039;&#039;&#039; 0.01 is fine for equilibration (faster, noise is averaged out over the short run). For production the induced-dipole error should be as small as practical because it enters every observable; 1e-4 is the routine choice and 1e-5 is worth it if energetics are the main observable.&lt;br /&gt;
&lt;br /&gt;
= 7. Running the whole pipeline =&lt;br /&gt;
&lt;br /&gt;
Copy &amp;lt;code&amp;gt;~/scripts/base_masterscript.sh&amp;lt;/code&amp;gt; into the project directory as &amp;lt;code&amp;gt;masterscript.sh&amp;lt;/code&amp;gt;. It assumes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; are present in the current directory (outputs of step 2).&lt;br /&gt;
* &amp;lt;code&amp;gt;temp/minimize.xyz&amp;lt;/code&amp;gt; is present (so &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = solute atom count can be read).&lt;br /&gt;
* Tinker9 binaries are at &amp;lt;code&amp;gt;/home/yw24267/programs/tinker/Tinker9/latest/build&amp;lt;/code&amp;gt; (edit &amp;lt;code&amp;gt;TINKER_BIN&amp;lt;/code&amp;gt; if yours differ).&lt;br /&gt;
* The correct GPU is selected via &amp;lt;code&amp;gt;CUDA_VISIBLE_DEVICES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Typical launch on a GPU node:&lt;br /&gt;
&lt;br /&gt;
 ssh nodeXXX&lt;br /&gt;
 cd /path/to/project&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
 nohup bash masterscript.sh &amp;gt; masterscript.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What the script generates on the fly&#039;&#039;&#039; (overwriting each run):&lt;br /&gt;
* &amp;lt;code&amp;gt;heating.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minimize.key&amp;lt;/code&amp;gt; (FC = 50)&lt;br /&gt;
* &amp;lt;code&amp;gt;restraint_10.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_0.1.key&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;restraint_none.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;production.key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All derived from &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; — it reads the &amp;lt;code&amp;gt;a-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;b-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;c-axis&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;pme-grid&amp;lt;/code&amp;gt; lines from there and appends them, then adds or omits the &amp;lt;code&amp;gt;RESTRAIN-POSITION&amp;lt;/code&amp;gt; line and sets the appropriate &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Summary of wall-clock and file sizes =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Stage !! MD time !! Runtime (rough, single GPU) !! Output&lt;br /&gt;
|-&lt;br /&gt;
| Minimization                || —      || minutes      || minimize_final.xyz_2&lt;br /&gt;
|-&lt;br /&gt;
| Heating (5 × 400 ps)        || 2.0 ns || ~few hours    || pre_production.arc (appended)&lt;br /&gt;
|-&lt;br /&gt;
| Restraint phase-down        || 1.6 ns || ~few hours    || pre_production.arc (appended)&lt;br /&gt;
|-&lt;br /&gt;
| Production (20 M steps)     || 40 ns  || ~1–2 days     || production.arc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Runtime scales with system size and GPU generation; the numbers above are order-of-magnitude for a ~700-atom solute in a ~60 Å water box on a modern GPU.&lt;br /&gt;
&lt;br /&gt;
= Notes and common pitfalls =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Induced dipole not converging&#039;&#039;&#039; during heating almost always means the starting structure has a bad contact. Re-check minimization went to a reasonable gradient, and that the solvation step didn&#039;t place a water atop a solute atom. You can temporarily add &amp;lt;code&amp;gt;USOLVE-CUTOFF 0.0&amp;lt;/code&amp;gt; to the heating key if convergence is marginal; remove for production.&lt;br /&gt;
* &#039;&#039;&#039;Net charge non-zero after solvation&#039;&#039;&#039; means the &amp;lt;code&amp;gt;neutralizers&amp;lt;/code&amp;gt; list in config.yaml didn&#039;t cover the real net charge. Re-run with the right ion set.&lt;br /&gt;
* &#039;&#039;&#039;RESTRAIN-POSITION force constant is in kcal/mol/Å²&#039;&#039;&#039;, not kcal/mol. The masterscript embeds this unit convention; do not change the numbers without understanding the scale.&lt;br /&gt;
* &#039;&#039;&#039;Do not delete &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;&#039;&#039;&#039; until after the masterscript has read &amp;lt;code&amp;gt;temp/minimize.xyz&amp;lt;/code&amp;gt;. If you&#039;ve deleted it, re-running &amp;lt;code&amp;gt;Tinker-GUI/cli.py&amp;lt;/code&amp;gt; regenerates it.&lt;br /&gt;
* &#039;&#039;&#039;Restarting a crashed run:&#039;&#039;&#039; Tinker9 resumes from &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; if present. To restart from scratch, remove both &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt; (otherwise the new trajectory appends to the old one).&lt;br /&gt;
* &#039;&#039;&#039;Stopping a running MD cleanly:&#039;&#039;&#039; &amp;lt;code&amp;gt;touch pre_production.end&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;production.end&amp;lt;/code&amp;gt;). Tinker9 checks for this file each frame and stops gracefully, leaving a valid &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; to resume from.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [[Tutorial:tinkertut|Using Tinker and AMOEBA]] — general Tinker/AMOEBA reference&lt;br /&gt;
* [[Software:tinkergpu|Tinker GPU]] — compiling and running Tinker9&lt;br /&gt;
* [https://github.com/prenlab/Tinker-GUI Tinker-GUI on GitHub]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2179</id>
		<title>Tutorial:tinkertut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2179"/>
		<updated>2026-04-22T16:48:51Z</updated>

		<summary type="html">&lt;p&gt;Brendan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purposes =&lt;br /&gt;
This page provide tutorials on using AMOEBA force field via Tinker (CPU) and Tinker-OpenMM (GPU) programs.&lt;br /&gt;
&lt;br /&gt;
Tinker manual: https://dasher.wustl.edu/tinker/downloads/tinker-guide.pdf&lt;br /&gt;
&lt;br /&gt;
Tinker GPU manual: https://tinker9-manual.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
[[Tutorial:kturn tut|This RNA kink turn tutorial]] is a simpler, direct tutorial covering the basics of going from a PDB file to a general molecular dynamics (MD) simulation. &lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
Some simple tutorials about Tinker I used in my teaching below. Note you can directly download tinker source from https://github.com/TinkerTools/tinker&amp;lt;nowiki/&amp;gt;and executables from https://github.com/TinkerTools/tinker-ffe/releases/tag/v25.5 or  [https://dasher.wustl.edu/tinker/ https://dasher.wustl.edu/tinker/]&amp;amp;nbsp;(Windows, mac. Linux) for the following tutorials.&lt;br /&gt;
&lt;br /&gt;
You can either use command lines in Windows CMD window or Linux terminals, or use FFX interface for some exercises. &#039;&#039;&#039;Actually applications always use command lines to operate in Linux OS&#039;&#039;&#039;. If you are not familiar with Linux, this is the opportunity to practice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;[https://biomolmd.org/pren/tinker-tut/ &amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;https://biomolmd.org/pren/tinker-tut/&amp;lt;/span&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Below you will find more detailed instructions and discussions.&lt;br /&gt;
&lt;br /&gt;
= Input files =&lt;br /&gt;
&lt;br /&gt;
You can find examples of input files in tinker distribution under tinker/bench, tinker/example or tinker/test. Two files are required to run TINKER calculations: *.xyz and *.key For example, open butane.xyz and butane.key in tinker/example/ (available in all official distributions) to see what’s inside.&lt;br /&gt;
&lt;br /&gt;
== *.xyz file ==&lt;br /&gt;
&lt;br /&gt;
*The first number on the 1st line is how many atoms total. &lt;br /&gt;
*There may be a second line that specify the box dimensions if the system is periodic (newer format since tinker 6) &lt;br /&gt;
*The first column is the atomic index &lt;br /&gt;
*The second column is the atomic symbol &lt;br /&gt;
*The 3 -5th columns are x,y,z coordinates in Angstrom &lt;br /&gt;
*The 6th is the “atom type” defined in the *.key file. This is the index tinker uses to assign parameters from the key/parameter file. &lt;br /&gt;
*The 7th – last columns are lists of atoms that are connected to the current atom&lt;br /&gt;
&lt;br /&gt;
== *.key file ==&lt;br /&gt;
&lt;br /&gt;
The key file may have all the actual parameters or a link to the actual parameters file specified in the first line. The parameters specify the bond, angle, torsion, vdW and electrostatic interactions between atoms based on the “atom type”. If you see an error related to OMP, please set the OPENMP-THREADS in the key file to a number less than the # of CPU cores on your computer. This sets how many CPU cores are used in the parallel execution.&lt;br /&gt;
&lt;br /&gt;
For example, in protein.key below, borrowed from tinker/bench/bench7.key, the first line specific the actual parameters are contain in the amoebapro13.prm. More examples can be found in tinker/bench, tinker/example, or tinker/test.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 parameters           $TINKERDIR/params/amoebabio18.prm &lt;br /&gt;
                                      &#039;&#039;# use the latest prm from GitHub&#039;&#039;&lt;br /&gt;
 # verbose                            &#039;&#039;# printing info for every step, for debugging mostly&#039;&#039;&lt;br /&gt;
 integrator            respa          &#039;&#039;#this multi-time step integrator allows TINKER to use 2 fs time step&#039;&#039;&lt;br /&gt;
 a-axis                62.23          &#039;&#039;# add b and c-axis if not cubic&#039;&#039;&lt;br /&gt;
 vdw-cutoff            12.0&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 neighbor-list                &#039;&#039;# this below requires your box is twice the cutoff plus 2 or 3 Ang.&#039;&#039;&lt;br /&gt;
                              &#039;&#039;#&#039;&#039; &#039;&#039;If your box is too small for vdw but OK for Ewald, you can&#039;&#039; &#039;&#039;use &amp;quot;mpole-list&amp;quot;&#039;&#039;&lt;br /&gt;
 ewald&lt;br /&gt;
 ewald-cutoff          7.0    &#039;&#039;# small cutoff because dipole/quadrupole die off &amp;gt; charge.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 polar-eps             0.01    &#039;&#039;# the induced dipole convergence threshold, 0.001 is better but slower.&#039;&#039;&lt;br /&gt;
 polar-predict&lt;br /&gt;
 &lt;br /&gt;
 #polarization         OPT3    &#039;&#039;#For improving polarization. OPT4 is more accurate but OPT3 is faster&#039;&#039;&lt;br /&gt;
 #openmp-threads       16      &#039;&#039;# CPU only. how many core you want to use on the node.&#039;&#039;&lt;br /&gt;
 #HEAVY-HYDROGEN              #&#039;&#039;This will increase H atom mass automatically so 3 or 3.5 fs time step can be &#039;&#039;                                                                      &lt;br /&gt;
                              #&#039;&#039;Kinetics will  be affected            &#039;&#039;&lt;br /&gt;
                                                &lt;br /&gt;
 # pme-grid  64 64 64       &#039;&#039;#If speed is a concern, set this mannually to be slightly bigger than simulation box size. E.g. use 64 is box is 62.23 (1.2x is the best but slower). Must be even with factors of only 2, 3 and 5. see source/kewald.f for a list. Sometimes the default grid size is conservative&#039;&#039; &lt;br /&gt;
 #fft-package           FFTW&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Example of overwriting the parameters in the .prm file. The bond parameters between &lt;br /&gt;
 # atom classes 1 and 4 are redefined below, which&lt;br /&gt;
 # will overwrite those already in the amoebapro13.prm. &lt;br /&gt;
 #this is only for illustration purpose&lt;br /&gt;
 # bond          1    4          200.00     1.1&lt;br /&gt;
&lt;br /&gt;
= How to generate input files =&lt;br /&gt;
&lt;br /&gt;
== CHARMM-GUI ==&lt;br /&gt;
charmm-gui can now output simulation files in Tinker format, but only fixed-charge force fields for now.&lt;br /&gt;
&lt;br /&gt;
== Latest tool for system set up for Tinker and AMOEBA ==&lt;br /&gt;
https://github.com/prenlab/Tinker-GUI&lt;br /&gt;
&lt;br /&gt;
Tools developed by Dr. Chengwen Liu for complex systems such as protein-membrane system: https://github.com/leucinw/TIPTOP&lt;br /&gt;
&lt;br /&gt;
Once built, before running production, see below [[#Check your xyz/key files and common errors]]&lt;br /&gt;
&lt;br /&gt;
== Programs and Scripts for converting formats ==&lt;br /&gt;
Click to see: [[tinkersctipts]]&lt;br /&gt;
&lt;br /&gt;
== proteins, nucleic acids, common organics ==&lt;br /&gt;
&lt;br /&gt;
In tinker/params, you can find pre-existing parameters for certain molecular systems, both AMOEBA, amber, charmm, opls, mmff, and mm2/3.&lt;br /&gt;
&lt;br /&gt;
If you want to build a peptide from a sequence, you can use tinker &amp;quot;protein.x&amp;quot; command, for example, ACE-ALA-NME, while create/use a tinker.key to specify which force field (with one line as below).&lt;br /&gt;
 parameters /path/to/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
== Lipid Bilayer System ==&lt;br /&gt;
If you have complicated system; protein embedded in a lipid bilayer and solvated in water box and a ligand prepared by CHARMM-GUI or any other package. The best way to convert such system is to divide it into three parts:&lt;br /&gt;
&lt;br /&gt;
i- Protein + water + ions: can be converted by pdb2xyz in Tinker and will result in the best consistency&lt;br /&gt;
&lt;br /&gt;
ii- Lipid bilayer: This must be converted manually using a script, depending on the lipid type check the Github TIPTOP database leucinw/TIPTOP. Convert each lipid alone, depending on the connectivity from the reference (don’t use the connectivity from Openbabel as this will result in wrong connectivity and the system will blow up). After converting each lipid molecule alone, append all of them together&lt;br /&gt;
&lt;br /&gt;
iii- If your system has a ligand or a non-standard ion, Poltype should be used to generate the parameter file, then convert your extracted ligand or non-standard ion using pdb2xyz and double check that the atom type assigned is consistent with what you had in the parameter file&lt;br /&gt;
&lt;br /&gt;
iv- Use xyzedit option 23 to combine the three parts together (Protein + water +ion with Lipid Bilayer system + ligand or non-standard ion)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; You have to make sure that the assigned atom types are different and unique for each part of your system, for example the assigned atom type for the ligand has to be different from that of the lipid and from those in the amoebabio18.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; To run pdb2xyz or xyzedit, you need a parameter file and/or key file containing the parameters. you can’t upload several parameter files in the key file, for example you can’t have   parameters amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
parameters ligand.prm&lt;br /&gt;
&lt;br /&gt;
This will result in loading only the second one only. The solution is to combine all of them into a single parameter file or into the key file&lt;br /&gt;
&lt;br /&gt;
== PDB to xyz ==&lt;br /&gt;
&lt;br /&gt;
If you have a pdb file you can convert it tinker xyz file by specifying a prm file above. It will remove the heteroatoms such as ligand, which you can use POLTYPE to generate parameters for.&lt;br /&gt;
&lt;br /&gt;
First you need to determine the protonation state of charged residue. Tools like propka can do this quikly: [http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&lt;br /&gt;
&lt;br /&gt;
Once you decided the protonation state, make sure the residue name in PDB file match the protonation state (list below). For example, ASH is the neutral form of ASP. Then you can run &amp;quot;pdbxyz.x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;GLY&#039; &#039;ALA&#039; &#039;VAL&#039; &#039;LEU&#039; &#039;ILE&#039; &#039;SER&#039; &#039;THR&#039; &#039;CYS&#039; &#039;CYX&#039; &#039;CYD&#039; &#039;PRO&#039; &#039;PHE&#039; &#039;TYR&#039; &#039;TYD&#039; &#039;TRP&#039; &#039;HIS&#039; &#039;HID&#039; &#039;HIE&#039; &#039;ASP&#039; &#039;ASH&#039; &#039;ASN&#039; &#039;GLU&#039; &#039;GLH&#039; &#039;GLN&#039; &#039;MET&#039; &#039;LYS&#039; &#039;LYD&#039; &#039;ARG&#039; &#039;ORN&#039; &#039;AIB&#039; &#039;PCA&#039; &#039;UNK&#039;&lt;br /&gt;
&lt;br /&gt;
UNK means unownk; AIB, ORN and PCA&amp;amp;nbsp; are modified AA.&lt;br /&gt;
&lt;br /&gt;
[https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Terminal residue names:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
COH ACE NH2 NME&amp;amp;nbsp; FOR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HETATM&#039;&#039;&#039; (residue name) recoginzed by pdbxyz:&lt;br /&gt;
&lt;br /&gt;
HOH K CA MG NA CL&lt;br /&gt;
&lt;br /&gt;
== AMOEBA for a new ligand ==&lt;br /&gt;
&lt;br /&gt;
Note that pdbxyz recognize proteins, water (res name HOH and some ions). The ligand (benzamidine above) is stripped. For that you need to derive your own parameters. For AMOEBA this can be done using POLTYPE: [https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype]&lt;br /&gt;
&lt;br /&gt;
 Input: ligand.sdf or ligand.pdb (for example, you can truncate the ligand &amp;quot;BEN&amp;quot; out of the 1bty.pdb) &lt;br /&gt;
 Output: will produce the xyz and corresponding key files (ttt.xyz and ttt.key):&lt;br /&gt;
&lt;br /&gt;
If you will merge the ligand xyz file with another molecule, &#039;&#039;&#039;make sure you set the suitable range for atom types (an option for pOLTYPE) so that they won&#039;t overlap.&#039;&#039;&#039; See the &amp;quot;Check the results section&amp;quot; on POLTYPE website before using them. Use &amp;quot;analyze.x&amp;quot; to make sure the xyz and key files work correctly: &amp;quot;analyze.x ttt.xyz -k ttt.key ep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== build a solvent box ==&lt;br /&gt;
&lt;br /&gt;
=== arbirary solvent ===&lt;br /&gt;
&lt;br /&gt;
Use xyzedit.x to build a water (or any solvent) box starting from a water monomer (e.g. tinker/test/water.xyz). You can specify many monomers to add and how big the box is. Type xyzedit.x at the command line and you will be asked to enter relevant inputs (or you may type all the parameters in one line).&lt;br /&gt;
&lt;br /&gt;
Make sure edit the key file to add box size and Ewald related keywords (see [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file])&lt;br /&gt;
&lt;br /&gt;
=== prebuilt water box ===&lt;br /&gt;
&lt;br /&gt;
Some prebuilt waterboxs:&amp;amp;nbsp;[http://biomol.bme.utexas.edu/~pren/downloads/waterbox http://biomol.bme.utexas.edu/~pren/downloads/waterbox]&lt;br /&gt;
&lt;br /&gt;
Larger boxes can be created as supercells of smaller boxes, e.g. this following command will create a box 64x larger than the orignial box.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -e &amp;quot;5\n4\n\n&amp;quot; | crystal.x watersmall.xyz -k tinker.key&lt;br /&gt;
== Combining two xyz files ==&lt;br /&gt;
&lt;br /&gt;
Tinker &amp;quot;xyzedit.x&amp;quot; program (option 20) can be used to combine two xyz files into one (matching key file for each xyz is required). You can merge the key or parameter files by appending one to the other, but please make sure the atom types are not overlapping between the two.&lt;br /&gt;
&lt;br /&gt;
For the above 1BTY example, poltype will translate/rotate the ligand in standard orientation. You may need a script to copy the coordinates from ligand.pdb into ttt.xyz (hwich you get out of the POLTYPE run).&lt;br /&gt;
&lt;br /&gt;
Then you can use xyzedit.x to combine 1bty.xyz and lig.xyz into one xyz file with the two molecules orient/position as in PDB. Merge the key file by appending ttt.key (except the first line which contains header already in amoebapro13.prm of 1bty.key) to 1bty.key; again avoid overlapping atom types between the ligand and protein.&lt;br /&gt;
&lt;br /&gt;
== Soaking solute in solvent ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;Tinker &amp;quot;xyzedit.x&amp;quot; is an interactive program (option 20) that can be used for this as well. You just need a molecule.xyz and waterbox.xyz along with matching key files (actual names do not matter).&lt;br /&gt;
&lt;br /&gt;
Some water files (monomers, boxes) are in tinker/example or test folder. One can make a water box of different size using this program too (starting from one water or a cluster of water and use option 19). Option 21 can add ions to solvent box. To distiguish between AMOEBA or fixed charged FF simulation files, check the key file to see which prm file it is pointing to.&lt;br /&gt;
&lt;br /&gt;
Or you can use this utility: [http://www.ime.unicamp.br/~martinez/packmol/home.shtml http://www.ime.unicamp.br/~martinez/packmol/home.shtml]&lt;br /&gt;
&lt;br /&gt;
On renlab cluster, there is &amp;quot;packmol&amp;quot; installed at /home/liuchw/Softwares/packmol-20.14.4/packmol&lt;br /&gt;
&lt;br /&gt;
Two examples for generating a cubic box:&lt;br /&gt;
&lt;br /&gt;
example 1: generate a pure liquid box, using water as an example. In the real cases, one could calculate the number of molecules and the length of the cube according to desired density. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output water-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;example 2: soak a MeOH molecule into the above box. We first let MeOH be in the center of the box with coordinates (9,9,9), and then soak with water in 18.6 A cubic box. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output liquid-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure MeOH.xyz&lt;br /&gt;
number 1&lt;br /&gt;
center&lt;br /&gt;
fixed 9.0 9.0 9.0 0.0 0.0 0.0&lt;br /&gt;
end structure&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the above two examples, all one needs are the &amp;quot;Wat.xyz&amp;quot; and &amp;quot;MeOH.xyz&amp;quot; files. After the box is generated, it is straightforward to use Tinker to minimize the structure. &lt;br /&gt;
&lt;br /&gt;
After construct the simulations, relax the system using minimize and dynamics (restraint the solute first), with proper restraints and heating. See [[Tutorial:tinkertut#MD_setup-initial_equilibration|MD setup]] for details&lt;br /&gt;
&lt;br /&gt;
== Check your xyz/key files and common errors ==&lt;br /&gt;
&lt;br /&gt;
Once you have a pair of xyz and key (and prm file the key uses one), you can use &amp;quot;analyze&amp;quot; to do some basic check. The CPU version &amp;quot;analyze&amp;quot; has many more options.&lt;br /&gt;
&lt;br /&gt;
analyze xxx.xyz -k xxx.key e&amp;quot; will print energy and its components.&lt;br /&gt;
&lt;br /&gt;
 If there are any error related to missing parameters, you need to fix them. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key em&amp;quot; prints total charge and dipole moments etc.&lt;br /&gt;
&lt;br /&gt;
 The total charge should match your expectation (0, -1, +1) etc&lt;br /&gt;
 If this is a box of solute in water, you should add neutralizing ions (K+ or Cl-) and then &amp;quot;additional&amp;quot; 0.1 mM KCl. So the next charge should be 0!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key ep&amp;quot; prints all parameters&lt;br /&gt;
&lt;br /&gt;
 Check if every atom has a multipole (number of multipole matches no of atoms) &lt;br /&gt;
 check if every atom has vdw (if an atom has 0.000 0.000 for vdw R and eps, that means the vdw parameters are missing; need to add) &lt;br /&gt;
 check polarization groups are making sense. If you see every atom is its own group, this is likely wrong. Typically we keep each function group (e.g. benzyl) as one group. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key eL&amp;quot; &lt;br /&gt;
  will print out large interactions, for example large ele or vdw interactions of two atoms that are too close&lt;br /&gt;
analyze with &amp;quot;ED&amp;quot; option (debug) will print out all individual interactions and lot more information. The output&amp;amp;nbsp;is of course huge if you do this to a large bix, but you can use &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;vdwterm only, bondterm only, angleterm only. multipoleterm only, polarizeterm only, etc&amp;lt;/span&amp;gt;&#039;&#039;&#039; to check a specific energy component. Or use &#039;&#039;&#039;bondterm none, angleterm none&#039;&#039;&#039;....ect to turn off some interactions you don&#039;t want to check. A full list of xxxTERM can be found in &amp;lt;span style=&amp;quot;color:#2980b9;&amp;quot;&amp;gt;&#039;&#039;&#039;tinker/source/prmkey.f&#039;&#039;&#039;&amp;lt;/span&amp;gt;(grep TERM).&lt;br /&gt;
=== Induced dipole not converging error ===&lt;br /&gt;
&lt;br /&gt;
If analyze give you error related to induced dipole not converging, the structure is bad. If you see &amp;quot;induced dipole not converging&amp;quot; error in the beginning of your MD, it is also due to bad structures (atoms too close). The structure needs refinement, or missing parameters above. To refine the structure&lt;br /&gt;
&lt;br /&gt;
1. minimize the structure. you can turn off polarization (polarizeterm none) or even permanent ele completely (multipoleterm none &amp;amp; polarizeterm none) first to minimize using vdw to move close atoms apart. Then turn on multipole and then induce back&lt;br /&gt;
&lt;br /&gt;
2 For MD simulations of protein/RNA/DNA in water, run MD first at low T with pro/rna/dna &amp;quot;heavy atoms&amp;quot; restrained (e.g. restrain-position -1 1000 5.0 or restrain-position 2 , , , 1.0) to let water &amp;amp; counter ions to relax for few ns. Then gradually heat up and remove the restraints. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#d35400;&amp;quot;&amp;gt;Note &amp;quot;restrain-position -1 1000 0.0&amp;quot; or &amp;quot;restrain-position 2 , , , 0.0&amp;quot; DOESN&#039;T mean 0 restraint (k=0.0) on atoms 1 to 1000 or atom 2!!!&amp;amp;nbsp; &amp;quot;0.0&amp;quot; is replaced by 100.0 in tinker by default.&amp;lt;/span&amp;gt;&#039;&#039;&#039; If you don&#039;t want restraint, comment out/remove these lines.&lt;br /&gt;
&lt;br /&gt;
3. But if you see this error randomly over few hundreds of ps, which may happen for tough systems of large/many charges e.g DNA/RNA, you can add &amp;quot;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;&#039;&#039;&#039;USOLVE-CUTOFF 0.0&#039;&#039;&#039;&amp;lt;/span&amp;gt;&amp;quot; option to key. This will change the precondition behavior and make induced dipole solver more stable. It is not used by default because for &amp;quot;easy&amp;quot; systems like boxes of water, this makes MD little slower (more iterations to converge induced dipoles). If still have stability issue you may further add &amp;quot;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e67e22;&amp;quot;&amp;gt;USOLVE-DIAG xx&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;quot; where xx is 2.0 by default and a smaller number towards 1 (e.g. 1.5) will make more stable but slightly slower.&lt;br /&gt;
&lt;br /&gt;
4. If system is rather big,&amp;amp;nbsp;use &amp;quot;polar-eps 0.1&amp;quot; or 0.01 during system setup and 0.01 (0.001) for production.&lt;br /&gt;
&lt;br /&gt;
== Modified PRO &amp;amp; NA residues ==&lt;br /&gt;
&lt;br /&gt;
=== Build a structure with modified residues ===&lt;br /&gt;
&lt;br /&gt;
Modify residues in a PDB file.&lt;br /&gt;
&lt;br /&gt;
Input: PDB files of the biopolymer, an original residue and a modified residue. The original residue must be present in the biopolymer, and the modified residue must share at least 3 atoms with the original residue with identical coordinates. The modified residue is usually obtained by manually modifying the original residue.&lt;br /&gt;
&lt;br /&gt;
Output: A PDB file with specified residues modified to the new residue. [https://biomol.bme.utexas.edu/~zj2244/tutorial/modeling/modres/modified_pdb/ link]&lt;br /&gt;
&lt;br /&gt;
 # change residues 2 and 14 in dna15.pdb from res_A to res_pA&lt;br /&gt;
 morphling.py -i dna15.pdb -o pdna15.pdb -t0 res_A.pdb -t1 res_pA.pdb -n 2,14&lt;br /&gt;
&lt;br /&gt;
=== Convert pdb to xyz ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/zjing7/modified-na link]&lt;br /&gt;
&lt;br /&gt;
= More on running Tinker and tinker9 (GPU) =&lt;br /&gt;
==Manual==&lt;br /&gt;
https://tinkerdoc.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
== Compiling &amp;amp; running: ==&lt;br /&gt;
[[Software:tinkergpu]] &lt;br /&gt;
&lt;br /&gt;
== Command line ==&lt;br /&gt;
&lt;br /&gt;
Tinker programs can be run interactively, which is the best way to learn what are the required inputs. Tinker programs can also run in background with all parameters specified, for the purpose of automation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;analyze.x ttt.xyz -k ttt.key ep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;dynamic.x bench7 100000 3.0 6.0 2 298.0 N &amp;gt; ben7.log &amp;amp;&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;# the bench7.xyz above can be found in tinker official distribution inside tinker/bench/&#039;&#039;&lt;br /&gt;
 #2-fs time step for MD here is ok because of the &amp;quot;integrator respa&amp;quot; in the key file&lt;br /&gt;
&lt;br /&gt;
Or for tinker9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #source /home/liuchw/.bashrc.tinker9&lt;br /&gt;
 #export TINKER9=/home/pren/tinker9/tinker9_sugar/build/&lt;br /&gt;
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib/&lt;br /&gt;
 export CUDA_DEVICE_ORDER=PCI_BUS_ID&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0 # device number; can use 1 or 2 if there are multiple GPU cards&lt;br /&gt;
 $TINKER9/tinker9 dynamic bench7.xyz -k bench7.key 5000 2.0 1000.0 4 298.15 1.0 N &amp;gt; out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Pause and resume MD ==&lt;br /&gt;
&lt;br /&gt;
Tinker creates .dyn file that contains coordinates and velocities needed for restart MD. To stop MD, simply create a .end file (e.g. touch myrun.end) in the folder where MD is running. At the next time MD frame was written, the end file will signal Tinker to stop. To resume later simply rerun dynamics with the presence of the .dyn file. Note the output file of dynamics does not resume the count of MD steps/frames.&lt;br /&gt;
&lt;br /&gt;
== Additional notes for &amp;quot;tinker-openmm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
*It s recommended to use the respa inetgrator and 2-fs time step &lt;br /&gt;
*&amp;quot;heavy-hydrogen&amp;quot; in key file allows a 3-fs time step (not reommended) &lt;br /&gt;
*Bussi thermostat &lt;br /&gt;
*Only MC barostat is available for now. We are adding virial/Langevin piston pressure to openmm.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to specify different ensembles for MD simulation =&lt;br /&gt;
&lt;br /&gt;
== For TINKER-openmm ==&lt;br /&gt;
&#039;&#039;&#039;Tinker-Openmm is no longer supported since 2021. Use tinker9 for GPU MD (see [[Software:tinkergpu|Tinker GPU]])&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not many options available.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
For NVT, use Bussi for thermostat, RESPA integrator (2fs)&lt;br /&gt;
&lt;br /&gt;
For NPT, use Montecarlo for Barostat, Bussi thermostat. Verlet (1 fs) is safer than RESPA for use with MC barostat if very accurate density is needed.&lt;br /&gt;
&lt;br /&gt;
See below for keyword syntax.&lt;br /&gt;
&lt;br /&gt;
== Available thermostat and barostat in TINKER (2021) ==&lt;br /&gt;
&lt;br /&gt;
Thermostats:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD (lines you add to .key file)&lt;br /&gt;
 Bussi-Parrinello           thermostat bussi&lt;br /&gt;
 Berendsen                  thermostat berendsen&lt;br /&gt;
 Andersen Stochastic        thermostat andersen&lt;br /&gt;
 Nose-Hoover                thermostat nose-hoover&lt;br /&gt;
&lt;br /&gt;
There are 3 barostats available via the “barostat” keyword:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Berendsen                  barostat berendsen&lt;br /&gt;
 Monte-Carlo                barostat montecarlo&lt;br /&gt;
 Lagevin                    Barostat Langevin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above thermostat and barostats are available for the Verlet, Beeman and RESPA integrators, and can be used in combination with those integrators. These integrators are available via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Verlet                     integrator verlet&lt;br /&gt;
 Beeman                     integrator beeman (tinker 8 CPU only)&lt;br /&gt;
 RESPA                      integrator respa&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;&#039;defaults&#039;&#039;&#039; are Bussi for thermostat, Berendsen for barostat, and Beeman for integrator.&lt;br /&gt;
&lt;br /&gt;
Then there are two special integrators, a stochastic one, and a Nose-Hoover that does NPT. The stochastic integrator uses a kind of Langevin temperature bath for thermostating, and does listen to the barostat keyword. The Nose-Hoover integrator uses a separate code branch and does only NPT with Nose-Hoover methods following Martyna-Tuckerman-Klein. You can get these via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                      KEYWORD&lt;br /&gt;
 Stochastic                   integrator stochastic (no need for other T control)&lt;br /&gt;
 Nose-Hoover NPT             integrator nose-hoover (no need other keywords for T or P; starting structures need to reasonable)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Recommended NVT and NPT combinations ==&lt;br /&gt;
&lt;br /&gt;
NVT keywords combination in the key file (2fs time step)&lt;br /&gt;
&lt;br /&gt;
 thermostat bussi &lt;br /&gt;
 integrator RESPA&lt;br /&gt;
&lt;br /&gt;
Preferred/Recommended NPT (2fs, relative isotropic and homogenous systems)&lt;br /&gt;
&lt;br /&gt;
 archive (&#039;&#039;&#039;dcd-archive&#039;&#039;&#039; to produce compressed traj for large systems; need .xyz or .pdb to render in VMD)&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
 barostat MonteCarlo&lt;br /&gt;
 integrator RESPA&lt;br /&gt;
 vdw-cutoff 9 (12 for amoeba)&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 9.0 (7.0 for amoeba)&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001 (only for amoeba)&lt;br /&gt;
 polar-predict (only for amoeba)&lt;br /&gt;
&lt;br /&gt;
Recommended NPT for &#039;&#039;&#039;anisotropic systems&#039;&#039;&#039; such as membrane, or large local volume fluctuation in protein folding. Slower than above for virial calculations)&lt;br /&gt;
&lt;br /&gt;
Documentation: https://tinkerdoc.readthedocs.io/en/latest/text/feature/integrator-langevin-piston.html#implementation-2 &lt;br /&gt;
Semi-isotropic pressure control not finished yet&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;barostat langevin&#039;&#039;&#039; # for GPU&lt;br /&gt;
 &#039;&#039;&#039;semiiso-pressure&#039;&#039;&#039; (if using tinker-GPU from 2025)&lt;br /&gt;
 &#039;&#039;&#039;pressure  SEMIISO (or &amp;quot;PRESSURE SEMI&amp;quot; if using tinker-GPU from 2026&#039;&#039;&#039; #PRESSURE [ISOTROPIC / SEMI-ISOTROPIC / ANISOTROPIC ] &lt;br /&gt;
 #barostat Langevin&lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA   #or Verlet/1 fs; T control not needed&lt;br /&gt;
 a-axis 40 #change this to your actual box size; b or c can be different from a&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001&lt;br /&gt;
 polar-predict&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Alternative NPT (1fs, built in P and T control)&lt;br /&gt;
&lt;br /&gt;
 integrator nose-hoover&lt;br /&gt;
&lt;br /&gt;
== Recommended keywords (add somewhere in the .key file) for NVT ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 2 298  (100000 steps, 2.0 fs time step, dump structure every 1.0 ps, option 2 is NVT, 298 is the target T)&lt;br /&gt;
&lt;br /&gt;
It is also possible to combine &amp;quot;&#039;&#039;&#039;integrator Beeman&#039;&#039;&#039;&amp;quot; or &#039;&#039;&#039;&amp;quot;thermostat Berendsen”&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;thermostat Andersen&amp;quot;&#039;&#039;&#039;. But RESPA allows large time steps (2.0 or 2.5 fs) than Beeman. Berendsen thermostat does not provide canonical ensemble fluctuation.&lt;br /&gt;
&lt;br /&gt;
== NVE ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 1&lt;br /&gt;
&lt;br /&gt;
No need for thermostat or barostat of course. It is best to use smaller time step such as 1.0fs to conserve energy better. May even use smaller polar-eps (10^-6) than default (10^-5) in the key file.&lt;br /&gt;
&lt;br /&gt;
== Non periodic system, e.g. gas molecules not in a box ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;_&amp;quot; style=&amp;quot;background:#eee; border:1px solid #ccc; padding:5px 10px&amp;quot;&amp;gt;integrate stochastic&amp;lt;/div&amp;gt; &lt;br /&gt;
If there is no box (a-axis) in the key file, or no box dimensions in the den file, the system is non-periodic. This will set the stochastic temperature control along with the stochastic MD integration. &#039;&#039;&#039;For gas phase molecular cluster (very few atoms), the recommended time step is 0.1 fs&#039;&#039;&#039;.&lt;br /&gt;
= Free energy calculations =&lt;br /&gt;
&lt;br /&gt;
Theory about free energy calculation: http://alchemistry.org/wiki/Bennett_Acceptance_Ratio&lt;br /&gt;
&lt;br /&gt;
About AMOEBA softcore and BAR, read our book chapter: &lt;br /&gt;
&lt;br /&gt;
[[File:PL_BAR_softcore.pdf|page=3|300px]]&lt;br /&gt;
&lt;br /&gt;
== MD setup-initial equilibration ==&lt;br /&gt;
&lt;br /&gt;
Determine protonation state of ionizable groups (ASP, GLU, LYS, ARG, HIS). Use propka here&amp;amp;nbsp;[http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&amp;amp;nbsp;for proteins. For ligand, you may use pka predicction tool&amp;amp;nbsp;from Chemaxon. &lt;br /&gt;
*Add water and counter ions (neutralize system) so that the density is ~1.0 g/cc. The distance between protein and box wall should be&amp;amp;nbsp;10-15 A. Check/remove extra water in the binding pocket as necessary (keep the crystal water molecules in the pocket) &lt;br /&gt;
*In the key file, set&amp;amp;nbsp;PME-grid&amp;amp;nbsp;to be&amp;amp;nbsp;1.2x&amp;amp;nbsp;box size in Ang. For example, if box size is 55, “pme-grid&amp;amp;nbsp;64 64 64” is enough. The default of Tinker is usually more conservative. See kewald.f for allowed grid values. Add &#039;&#039;&#039;“neighbor-list”, “polar-eps 0.01”, “vdw-cutoff&amp;amp;nbsp;12”, &amp;quot;vdw-correction&amp;quot; “integrator respa”, “ewald”, “ewald-cutoff 7.0” &#039;&#039;&#039;&amp;amp;nbsp;to .key file. You can even turn off polarization initially (polarizeterm NONE) during EQ and add it back (&#039;&#039;&#039;polar-eps 0.001&#039;&#039;&#039; or tighter for production) &lt;br /&gt;
*Minimize the box before MD. If you see errors related to polarization (induced dipole not converge), do this in two steps: first minimize with electrostatic (multipoleterm NONE) and polarization turned off (polarizeterm NONE in .key file), to ~5.0 or lower; then minimize again with ele then ele+polarization back on to ~2.0 or lower. You may use position-restraints&amp;amp;nbsp;&#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; if you don&#039;t want your solute to undergo dramtic changes. (RESTRAIN-POSITION -1 200 50.0, means restrain atoms 1 to 200 using a force constant of K=50 kcal/mol).&amp;amp;nbsp; &lt;br /&gt;
*MD relaxation. You may use GPU for MD now (dynamic_omm.x).&amp;amp;nbsp;Use repsa integrator and 2fs time step.&amp;amp;nbsp;Add&amp;amp;nbsp;&#039;&#039;&#039;position-restraints&#039;&#039;&#039; to restrain protein &amp;amp; ligands &#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; in the key file&amp;amp;nbsp;initially; For metal ion-protein binding or weak binding ligand,&amp;amp;nbsp;we&amp;amp;nbsp;also suggest to use ~3 distance restraints between ion/ligand and first shell atoms. This is to prevent water disrupt the initial solute structure during the equilibration.&amp;amp;nbsp; &lt;br /&gt;
**Use 2 fs for all MD below.&amp;amp;nbsp;If you want to use 3fs (e.g. for large systems),&amp;amp;nbsp;you need to&amp;amp;nbsp;&amp;quot;heavy-hydrogen&amp;quot; in the key file.&amp;amp;nbsp;Another way to speed up is to use the OPTx: &amp;quot;polarization OPT4&amp;quot; or &amp;quot;polarization OPT3&amp;quot; OPT3 is faster but bigger error.&lt;br /&gt;
**Use &amp;quot;polar-eps 0.01&amp;quot; and &amp;quot;polar-predict&amp;quot; for equilibration for speed. For production use &amp;quot;polar-eps 0.001&amp;quot; or &amp;quot;0.0001&amp;quot;.&lt;br /&gt;
**use &amp;quot;neighbor-list&amp;quot;&lt;br /&gt;
**With the positional/distance restraints, run ~2ns&amp;amp;nbsp; NVT MD to gradually (e.g. exponentially) heat up the system from 10K&amp;amp;nbsp; to 298K or whatever expt T should be. Water/ions are relaxed after this step.&lt;br /&gt;
**Run NVT at 298K or expt T for ~2ns &#039;&#039;&#039;while gradually turning off all the position and distance restraints on protein-ligands.&#039;&#039;&#039; &lt;br /&gt;
**Run 1-2 ns NPT. Add/use &#039;&#039;&#039;&amp;quot;barostat MonteCarlo&amp;quot; in key.&#039;&#039;&#039;&lt;br /&gt;
**Check protein RMSD (esp. around binding pocket) from crystal structure after every step above. If any step gives large RMSD, redo that (and previous step) with longer/slower MD to correct the problems.   &lt;br /&gt;
*MD production run. For alchemical free energy, this involves setting the ligand group and various lambda values for ele and vdw to scale the interactions between ligand and surrounding (see below BAR section). &lt;br /&gt;
**use 2 fs with RESPA&lt;br /&gt;
**polar-eps 0.001 &lt;br /&gt;
**polar-predict&lt;br /&gt;
**neighbor-list&lt;br /&gt;
**&#039;&#039;&#039;barostat MonteCarlo&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Hydration or binding using BAR ==&lt;br /&gt;
&lt;br /&gt;
Alchemical free energy calculations are available in TINKER, Tinker9 GPU (TINKER-OpenMM no longer supported). One needs to specify the ligand or solute using the group keyword&amp;amp;nbsp;in the key file (example below). The lambda scaling schedule can be specified by user, automated by the &amp;quot;bar.x&amp;quot; in TINKER. For each set of lambda value (scaling the interaction betweem ligand and enviroemnt and inside ligand), one needs to perform one MD simulation. The bar.x is then used to analyze the dG between neighboring steps i and j, using the arc files from MD simulation i and j. The total free energy is then sum of 1-2, 2-3, ...N-1 and N.&amp;amp;nbsp;See this reference for examples: &#039;&#039;J Comput Chem. 2017 Sep 5;38(23):2047-2055&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note &#039;&#039;&#039;GPU MD and bar code&#039;&#039;&#039;&amp;amp;nbsp;is much faster than the CPU one&amp;amp;nbsp;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running BAR code in Tinker==&lt;br /&gt;
To compute free energy between two states (i and j), the bar.x (CPU or GPU) will need two trajectories (and two key files of course) of the same simulation length (frames). the two states can be neighboring lambda states in HFE or binding. &lt;br /&gt;
&lt;br /&gt;
See above (and PNAS 2008 paper) for BAR equations.&lt;br /&gt;
&lt;br /&gt;
Step 1 (bar option 1) is to generate two files, each contain the energy of its own state and perturbed energy (Eii, Eij). The second energy is using arc i and key of state j (bar will do this for you).&lt;br /&gt;
&lt;br /&gt;
 tinker9 bar 1 arc1 300 arc2 300 N &amp;gt; barfile &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;tinker 9 bar&amp;quot; is for GPU. You can replace with CPU version bar.x (slower). the arc1 and arc2 can be in different folders with their matching key files.&lt;br /&gt;
&lt;br /&gt;
Example barfile produced from this step: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.bar.&lt;br /&gt;
&lt;br /&gt;
The output below shows 500 frame used, 300K, for frame 1, energy of Eii, Eij and volume of the system (since we can do NPT where volume changes)&lt;br /&gt;
  500    300.00  comments&lt;br /&gt;
       1          -6396.8707        -6396.7580        27379.1152&lt;br /&gt;
&lt;br /&gt;
The second section of this same file will have Ejj, Eji, volume&lt;br /&gt;
&lt;br /&gt;
Step  2 (bar option 2) &lt;br /&gt;
Use the barfile produced from above to compute dG , dH and dS&lt;br /&gt;
 tinker9 bar 2 {barfile} {startsnapshot} {totalsnapshot} 1 {startsnapshot} {totalsnapshot} 1 &amp;gt; {enefile}&lt;br /&gt;
Note this step is much faster since it uses energy from above. You can also set to use a subset of the total frames, e.g. to exam how the dG converge with longer simulaitons.&lt;br /&gt;
Example out: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.ene&lt;br /&gt;
&lt;br /&gt;
== HFE ==&lt;br /&gt;
&lt;br /&gt;
Common keywords for hydration free energy calculation (suggest NPT with MC barostat or Langevin piston barostat)&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 a-axis 40&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 barostat Monte Carlo   #NPT. Use Langevin NPT if care e.g. membrane &lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA # 2-fs time step for solution; 1 for gas&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #openmp-threads    16 #this is for CPU&lt;br /&gt;
 Vdw-annihilation      #this is to help sampling conformation at low lambda by removing intrmol vdw interactions; not needed for rigid solute.&lt;br /&gt;
&lt;br /&gt;
The ele and vdw schedules are found in our previous paper. Also recommended as below. Note you can add or remove steps based dG results and error bars.&lt;br /&gt;
&lt;br /&gt;
Run NPT for each lambda below. 2-5 ns for each lambda typically depending how complex your system (eg, 2ns is sufficient for K+ in water but a large ligand mayneed 5ns). Use BAR-NPT to analyze free energy between neighboring lambda (ignore first 200 ps). The toal FE is the sum of each step. You can check cumulative free energy convergence as a function of simulation time. Add more MD if needed.&lt;br /&gt;
&lt;br /&gt;
Repeat the set of simulations for ligand in solution and ligand itself in gas phase (not necessary if gas energy is 0 like single ion). The gas phase part should use the matching keywords as above (but no a-axis, Ewald, and time step for constant T MD is 0.1fs).&lt;br /&gt;
&lt;br /&gt;
Typical lambda schedule:&lt;br /&gt;
&lt;br /&gt;
 Ele L	Vdw L&lt;br /&gt;
 0	0&lt;br /&gt;
 0	0.4&lt;br /&gt;
 0	0.5&lt;br /&gt;
 0	0.525&lt;br /&gt;
 0	0.55&lt;br /&gt;
 0	0.575&lt;br /&gt;
 0	0.6&lt;br /&gt;
 0	0.625&lt;br /&gt;
 0	0.65&lt;br /&gt;
 0	0.675&lt;br /&gt;
 0	0.7&lt;br /&gt;
 0	0.725&lt;br /&gt;
 0	0.75&lt;br /&gt;
 0	0.775&lt;br /&gt;
 0	0.8&lt;br /&gt;
 0	0.9&lt;br /&gt;
 0	1&lt;br /&gt;
 0.1	1&lt;br /&gt;
 0.2	1&lt;br /&gt;
 0.3	1&lt;br /&gt;
 0.4	1&lt;br /&gt;
 0.5	1&lt;br /&gt;
 0.6	1&lt;br /&gt;
 0.7	1&lt;br /&gt;
 0.8	1&lt;br /&gt;
 0.9	1&lt;br /&gt;
  1     1&lt;br /&gt;
&lt;br /&gt;
== binding free energy ==&lt;br /&gt;
&lt;br /&gt;
For host-guest binding, the simulation process similiar to above but involve two sets: one is host-guest-water, and the other guest-water. In both cases, guest is the ligand that is being scaled. For host-guest-water, one also applies&amp;amp;nbsp;a bond restraint between host and guest. This restraint can be turned off in one or two steps for lambda=1 but should be kept when L&amp;lt;1.&lt;br /&gt;
&lt;br /&gt;
 One way is to set the restraint K=0 when Lele, Lvdw=1, then K=90% when Lele=0.9/Lvdw=1, then K=100% when Lele=80%/Lvdw=1..... K=100% for all rest of L including L=0. &lt;br /&gt;
 The goal is for L=1 (host-guest full interaction), there is no restraint. when L=0, restraint is at 100%. The L=0 state seems &amp;quot;incorrect&amp;quot; due to the restraint but can be corrected (below).&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;bond&amp;quot; is between group of guest/ligand and group of host atoms. It is best to minimize the distance between the centers of the two groups (for sampling).  For example, if you are simulating an ion binding to a spherical cavity like CPP, you can pick 3 atoms on the host whose center is roughly the center of the ion; the restraint will be between the ion and this group. A correction is needed to &amp;quot;remove&amp;quot; the effect of this restraint and standard volume that goes into the final binding free energy.&#039;&#039;&#039;Tinker/utiity/freefix.f&#039;&#039;&#039; can be used to calculate the correction. Note this correction is typically positive (make binding energy less negative) since restraint leads to overestimation of binding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*The correction for lambda=0 from RTln(C0*V), where C0=1/1660 A^3 and V=integrate{4*pi*r^2*exp[-k*(r-r0)^2/RT]dr}. k=15 kcal/mol in the example below. If you are using a harmonic restraint (example below) and the equilibrium r0 is not 0, numerical integration is necessary. A good reference is JACS v126, NO. 24, 2004.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brandon setup script can also set up protein-lig distance restraint now. Basically select a central heavy atom on ligand (or a function group) and another group of nearby 3-4 Ca from protein.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Francis wrote a program to pick restraints based on Boresch paper. It can include additional angle and torsion restraints. However we found it is best to just use the simple distance restraints. The additional restraints may introduce bias towards ligand or host dynamics if not picked carefully.&amp;lt;/pre&amp;gt; [[Tinkergpu:get_rot_rest]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use distance restraint when lambda =1 for both ele and vdw, you can remove the effect of restraint from FEP or BAR; or you can avoid this correction if the restraint strength is set to 0 when the lambda =1 (gradually turned on when lambda-&amp;gt; 0 for both vdw and ele).&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 GROUP 1 -1 3 //ligand group&lt;br /&gt;
 GROUP 2 100, 102, 138 //protein group&lt;br /&gt;
 RESTRAIN-GROUPS  1  2  15.0  2.0 2.0&lt;br /&gt;
 Vdw-annihilation&lt;br /&gt;
 #lower bound &amp;amp; upper bound (2.0, 2.0) do not have to be the same. 15 is the force constant.&lt;br /&gt;
&lt;br /&gt;
Each set of lambda corresponds to one separate MD simulations of 5-10ns or longer. Save MD frames at every 3-5 ps. Use bar.x (bar_omm.x for GPU) to analyze the free energy dG between the neighboring lambda values.&lt;br /&gt;
&lt;br /&gt;
Unlike HFE, no need for gas-phase simulation since the end states of the ligand-water vs. ligand-protein cancels.&lt;br /&gt;
&lt;br /&gt;
Some scripts fron CW:&amp;amp;nbsp;[https://github.com/leucinw/ComputTools/tree/master/bardemo https://github.com/leucinw/ComputTools/tree/master/bardemo]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==ion HFE steps==&lt;br /&gt;
To compute ion hydration FE, &lt;br /&gt;
* prepare ion.xyz and waterbox.xyz. One key file containing all parameters (amoeba09.prm has ion and bunch of ions). If you have a new ion, add its parameters including multipoles, polarizability/damping, vdw &lt;br /&gt;
* water box should be ~50 A. A list of prebuilt water box (you many need to change atom types in xyz if you are using different key) https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#prebuilt_water_box &lt;br /&gt;
* use xyzedit to soak ion in water (see tutorial above about building and combining xyz)&lt;br /&gt;
* Run NPT for ~1ns to relax. See tutorial on this page about dynamics on GPU NPT keywords (using Langevin or MonteCarlo)&lt;br /&gt;
* Take the last relaxed structure to create inputs for HFE. Best to create a series of folders, one for each lambda with inputs and run scripts. See here for lambda schedule https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#HFE&lt;br /&gt;
* Get a list of nodes from Google spreadsheet of lab cluster. Ask for it if you can&#039;t find ~10 GPU nodes.&lt;br /&gt;
* each MD for ~2ns (add more if needed)&lt;br /&gt;
* Use a script to send jobs to each node. You can have 2 jobs concurrent on one GPU and rotate your jobs (~50 lambdas) through.&amp;lt;br /&amp;gt;&lt;br /&gt;
== hydration and binding free energy examples ==&lt;br /&gt;
&lt;br /&gt;
*Ethanol solvation free energy [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/01_solvation/Ethanol.zip download] &lt;br /&gt;
*PBP-phosphate binding [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/02_protein_ligand_binding/PBP_PO4.zip download] &lt;br /&gt;
&lt;br /&gt;
Please unzip the files and see README for instructions.&lt;br /&gt;
&lt;br /&gt;
== HFE and binding free energy calc using Brandon&#039;s script ==&lt;br /&gt;
&lt;br /&gt;
Set up from complex PDB and ligand xyz/key (POLTYE):&amp;amp;nbsp;[https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*create conda env according to instructions on the annihilator github page &lt;br /&gt;
*make&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;something like&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;/home/eew947/.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;with your username replacing mine everywhere in it &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;ssh&amp;lt;/code&amp;gt;&amp;amp;nbsp;to node you want to start from &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;source ~/.allpurpose.bashrc&amp;lt;/code&amp;gt; &lt;br /&gt;
*prepare&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;annihilator.ini&amp;lt;/code&amp;gt; &lt;br /&gt;
*if you want to use daemon, you have to add the keyword for it in annihilator *ini and have it already running before starting annihilator &lt;br /&gt;
*start annihilator by&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;nohup yourpathtoannihilatorhere/AMOEBAAnnihilatorModules/amoebaannihilator.py &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== OSRW ==&lt;br /&gt;
&lt;br /&gt;
Only implemented in tinker CPU. GPU version is under development.&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
&lt;br /&gt;
== Force Field Explorer ==&lt;br /&gt;
&lt;br /&gt;
By Mike Schneider and Jay Ponder, [http://dasher.wustl.edu http://dasher.wustl.edu] Can visualize the xyz and arc (MD trajectory) files; create and start TINKER calcualtions&lt;br /&gt;
&lt;br /&gt;
== VMD ==&lt;br /&gt;
&lt;br /&gt;
Choose TINKER format when open a xyz file. Trajectory file (.arc) also works.&lt;br /&gt;
&lt;br /&gt;
== Pymol ==&lt;br /&gt;
&lt;br /&gt;
Sometimes the xyz file can not be displayed correctly&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
[https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials]&lt;br /&gt;
&lt;br /&gt;
Please email me if you have tutorials related to AMOEBA or Tinker you would like to share.&lt;br /&gt;
&lt;br /&gt;
= AMOEBA Force Field Papers: =&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Fundamental theory of AMOEBA multipoles:&#039;&#039;&#039; ===&lt;br /&gt;
[[Tutorial:amm#Molecular Mechanics and Force Fields (AMOEBA, AMOEBA+)]]&lt;br /&gt;
&lt;br /&gt;
===AMEOBA FF:===&lt;br /&gt;
&lt;br /&gt;
#Water model: Ren, P. Y.; Ponder, J. W., Polarizable atomic multipole water model for molecular mechanics simulation. Journal of Physical Chemistry B &#039;&#039;&#039;2003&#039;&#039;&#039;, 107 (24), 5933-5947. &lt;br /&gt;
#Small molecules: Ren, P.; Wu, C.; Ponder, J. W., Polarizable Atomic Multipole-based Molecular Mechanics for Organic Molecules. J Chem Theory Comput &#039;&#039;&#039;2011&#039;&#039;&#039;, 7 (10), 3143-3161. &lt;br /&gt;
#Proteins: Shi, Y.; Xia, Z.; Zhang, J.; Best, R.; Wu, C.; Ponder, J. W.; Ren, P., The Polarizable Atomic Multipole-based AMOEBA Force Field for Proteins. J Chem Theory Comput &#039;&#039;&#039;2013&#039;&#039;&#039;, 9 (9), 4046-4063. &lt;br /&gt;
#DMP/TMP/Base &amp;amp; nucleic acids:&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
*Zhang, C.; Lu, C.; Wang, Q.; Ponder, J. W.; Ren, P., Polarizable Multipole-Based Force Field for Dimethyl and Trimethyl Phosphate. J Chem Theory Comput 2015, 11 (11), 5326-39. &lt;br /&gt;
*Zhang, C.; Bell, D.; Harger, M.; Ren, P., Polarizable Multipole-Based Force Field for Aromatic Molecules and Nucleobases. J Chem Theory Comput 2017, 13 (2), 666-678. &lt;br /&gt;
*Zhang, C.; Lu, C.; Jing, Z.; Wu, C.; Piquemal, J. P.; Ponder, J. W.; Ren, P., AMOEBA Polarizable Atomic Multipole Force Field for Nucleic Acids. J Chem Theory Comput 2018, 14 (4), 2084-2108. &lt;br /&gt;
&lt;br /&gt;
===AMOEBA+ model (water published, small and biomolecules in progress)===&lt;br /&gt;
&lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., AMOEBA+ Classical Potential for Modeling Molecular Interactions. J Chem Theory Comput 2019. &lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., Implementation of Geometry-Dependent Charge Flux into the Polarizable AMOEBA+ Potential. J Phys Chem Lett 2019, 11, 419-426.&lt;br /&gt;
&lt;br /&gt;
===AMOEBA+NN model: incorporating Neural Networks===&lt;br /&gt;
&lt;br /&gt;
Wang, Y., et al. (2024). &amp;quot;Incorporating Neural Networks into the AMOEBA Polarizable Force Field.&amp;quot; The Journal of Physical Chemistry B 128(10): 2381-2388.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Tinker Key File for AMOEBA+ Condensed Phase Simulations ===&lt;br /&gt;
 EWALD&lt;br /&gt;
 EWALD-CUTOFF      9.0 # for real space Ewald and charge penetration&lt;br /&gt;
 &lt;br /&gt;
 NEIGHBOR-LIST&lt;br /&gt;
 &lt;br /&gt;
 VDW-CUTOFF        12.0 # for vdw term&lt;br /&gt;
 CHGTRN-CUTOFF     12.0 # for charge transfer term&lt;br /&gt;
 VDW-CORRECTION&lt;br /&gt;
 &lt;br /&gt;
 INTEGRATOR  RESPA&lt;br /&gt;
 THERMOSTAT  BUSSI&lt;br /&gt;
 BAROSTAT    MONTECARLO&lt;br /&gt;
 &lt;br /&gt;
 POLAR-PREDICT&lt;br /&gt;
 POLAR-EPS 0.00001&lt;br /&gt;
&lt;br /&gt;
==Lectures on Force Field, AMOEBA, AMOEBA+==&lt;br /&gt;
Under &#039;&#039;&#039;Adv Mol Modeling&#039;&#039;&#039; menu:&lt;br /&gt;
 [[Tutorial:amm#Molecular_Mechanics_and_Force_Fields_(AMOEBA,_AMOEBA+) | Link]]&lt;br /&gt;
&lt;br /&gt;
= More Explicit Free Energy Calc Steps - Brandon Walker =&lt;br /&gt;
&lt;br /&gt;
Old/obsolete description here: [[Tinker-tut:free_eng_Bbdw|Obsolete description here]]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2178</id>
		<title>Tutorial:tinkertut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2178"/>
		<updated>2026-04-22T16:47:37Z</updated>

		<summary type="html">&lt;p&gt;Brendan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purposes =&lt;br /&gt;
This page provide tutorials on using AMOEBA force field via Tinker (CPU) and Tinker-OpenMM (GPU) programs.&lt;br /&gt;
&lt;br /&gt;
Tinker manual: https://dasher.wustl.edu/tinker/downloads/tinker-guide.pdf&lt;br /&gt;
&lt;br /&gt;
Tinker GPU manual: https://tinker9-manual.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[[Tutorial:kturn_tut|This tutorial for RNA kink turns]]&amp;lt;/nowiki&amp;gt; is a simpler, direct tutorial covering the basics of going from a PDB file to a general molecular dynamics (MD) simulation. &lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
Some simple tutorials about Tinker I used in my teaching below. Note you can directly download tinker source from https://github.com/TinkerTools/tinker&amp;lt;nowiki/&amp;gt;and executables from https://github.com/TinkerTools/tinker-ffe/releases/tag/v25.5 or  [https://dasher.wustl.edu/tinker/ https://dasher.wustl.edu/tinker/]&amp;amp;nbsp;(Windows, mac. Linux) for the following tutorials.&lt;br /&gt;
&lt;br /&gt;
You can either use command lines in Windows CMD window or Linux terminals, or use FFX interface for some exercises. &#039;&#039;&#039;Actually applications always use command lines to operate in Linux OS&#039;&#039;&#039;. If you are not familiar with Linux, this is the opportunity to practice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;[https://biomolmd.org/pren/tinker-tut/ &amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;https://biomolmd.org/pren/tinker-tut/&amp;lt;/span&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Below you will find more detailed instructions and discussions.&lt;br /&gt;
&lt;br /&gt;
= Input files =&lt;br /&gt;
&lt;br /&gt;
You can find examples of input files in tinker distribution under tinker/bench, tinker/example or tinker/test. Two files are required to run TINKER calculations: *.xyz and *.key For example, open butane.xyz and butane.key in tinker/example/ (available in all official distributions) to see what’s inside.&lt;br /&gt;
&lt;br /&gt;
== *.xyz file ==&lt;br /&gt;
&lt;br /&gt;
*The first number on the 1st line is how many atoms total. &lt;br /&gt;
*There may be a second line that specify the box dimensions if the system is periodic (newer format since tinker 6) &lt;br /&gt;
*The first column is the atomic index &lt;br /&gt;
*The second column is the atomic symbol &lt;br /&gt;
*The 3 -5th columns are x,y,z coordinates in Angstrom &lt;br /&gt;
*The 6th is the “atom type” defined in the *.key file. This is the index tinker uses to assign parameters from the key/parameter file. &lt;br /&gt;
*The 7th – last columns are lists of atoms that are connected to the current atom&lt;br /&gt;
&lt;br /&gt;
== *.key file ==&lt;br /&gt;
&lt;br /&gt;
The key file may have all the actual parameters or a link to the actual parameters file specified in the first line. The parameters specify the bond, angle, torsion, vdW and electrostatic interactions between atoms based on the “atom type”. If you see an error related to OMP, please set the OPENMP-THREADS in the key file to a number less than the # of CPU cores on your computer. This sets how many CPU cores are used in the parallel execution.&lt;br /&gt;
&lt;br /&gt;
For example, in protein.key below, borrowed from tinker/bench/bench7.key, the first line specific the actual parameters are contain in the amoebapro13.prm. More examples can be found in tinker/bench, tinker/example, or tinker/test.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 parameters           $TINKERDIR/params/amoebabio18.prm &lt;br /&gt;
                                      &#039;&#039;# use the latest prm from GitHub&#039;&#039;&lt;br /&gt;
 # verbose                            &#039;&#039;# printing info for every step, for debugging mostly&#039;&#039;&lt;br /&gt;
 integrator            respa          &#039;&#039;#this multi-time step integrator allows TINKER to use 2 fs time step&#039;&#039;&lt;br /&gt;
 a-axis                62.23          &#039;&#039;# add b and c-axis if not cubic&#039;&#039;&lt;br /&gt;
 vdw-cutoff            12.0&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 neighbor-list                &#039;&#039;# this below requires your box is twice the cutoff plus 2 or 3 Ang.&#039;&#039;&lt;br /&gt;
                              &#039;&#039;#&#039;&#039; &#039;&#039;If your box is too small for vdw but OK for Ewald, you can&#039;&#039; &#039;&#039;use &amp;quot;mpole-list&amp;quot;&#039;&#039;&lt;br /&gt;
 ewald&lt;br /&gt;
 ewald-cutoff          7.0    &#039;&#039;# small cutoff because dipole/quadrupole die off &amp;gt; charge.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 polar-eps             0.01    &#039;&#039;# the induced dipole convergence threshold, 0.001 is better but slower.&#039;&#039;&lt;br /&gt;
 polar-predict&lt;br /&gt;
 &lt;br /&gt;
 #polarization         OPT3    &#039;&#039;#For improving polarization. OPT4 is more accurate but OPT3 is faster&#039;&#039;&lt;br /&gt;
 #openmp-threads       16      &#039;&#039;# CPU only. how many core you want to use on the node.&#039;&#039;&lt;br /&gt;
 #HEAVY-HYDROGEN              #&#039;&#039;This will increase H atom mass automatically so 3 or 3.5 fs time step can be &#039;&#039;                                                                      &lt;br /&gt;
                              #&#039;&#039;Kinetics will  be affected            &#039;&#039;&lt;br /&gt;
                                                &lt;br /&gt;
 # pme-grid  64 64 64       &#039;&#039;#If speed is a concern, set this mannually to be slightly bigger than simulation box size. E.g. use 64 is box is 62.23 (1.2x is the best but slower). Must be even with factors of only 2, 3 and 5. see source/kewald.f for a list. Sometimes the default grid size is conservative&#039;&#039; &lt;br /&gt;
 #fft-package           FFTW&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Example of overwriting the parameters in the .prm file. The bond parameters between &lt;br /&gt;
 # atom classes 1 and 4 are redefined below, which&lt;br /&gt;
 # will overwrite those already in the amoebapro13.prm. &lt;br /&gt;
 #this is only for illustration purpose&lt;br /&gt;
 # bond          1    4          200.00     1.1&lt;br /&gt;
&lt;br /&gt;
= How to generate input files =&lt;br /&gt;
&lt;br /&gt;
== CHARMM-GUI ==&lt;br /&gt;
charmm-gui can now output simulation files in Tinker format, but only fixed-charge force fields for now.&lt;br /&gt;
&lt;br /&gt;
== Latest tool for system set up for Tinker and AMOEBA ==&lt;br /&gt;
https://github.com/prenlab/Tinker-GUI&lt;br /&gt;
&lt;br /&gt;
Tools developed by Dr. Chengwen Liu for complex systems such as protein-membrane system: https://github.com/leucinw/TIPTOP&lt;br /&gt;
&lt;br /&gt;
Once built, before running production, see below [[#Check your xyz/key files and common errors]]&lt;br /&gt;
&lt;br /&gt;
== Programs and Scripts for converting formats ==&lt;br /&gt;
Click to see: [[tinkersctipts]]&lt;br /&gt;
&lt;br /&gt;
== proteins, nucleic acids, common organics ==&lt;br /&gt;
&lt;br /&gt;
In tinker/params, you can find pre-existing parameters for certain molecular systems, both AMOEBA, amber, charmm, opls, mmff, and mm2/3.&lt;br /&gt;
&lt;br /&gt;
If you want to build a peptide from a sequence, you can use tinker &amp;quot;protein.x&amp;quot; command, for example, ACE-ALA-NME, while create/use a tinker.key to specify which force field (with one line as below).&lt;br /&gt;
 parameters /path/to/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
== Lipid Bilayer System ==&lt;br /&gt;
If you have complicated system; protein embedded in a lipid bilayer and solvated in water box and a ligand prepared by CHARMM-GUI or any other package. The best way to convert such system is to divide it into three parts:&lt;br /&gt;
&lt;br /&gt;
i- Protein + water + ions: can be converted by pdb2xyz in Tinker and will result in the best consistency&lt;br /&gt;
&lt;br /&gt;
ii- Lipid bilayer: This must be converted manually using a script, depending on the lipid type check the Github TIPTOP database leucinw/TIPTOP. Convert each lipid alone, depending on the connectivity from the reference (don’t use the connectivity from Openbabel as this will result in wrong connectivity and the system will blow up). After converting each lipid molecule alone, append all of them together&lt;br /&gt;
&lt;br /&gt;
iii- If your system has a ligand or a non-standard ion, Poltype should be used to generate the parameter file, then convert your extracted ligand or non-standard ion using pdb2xyz and double check that the atom type assigned is consistent with what you had in the parameter file&lt;br /&gt;
&lt;br /&gt;
iv- Use xyzedit option 23 to combine the three parts together (Protein + water +ion with Lipid Bilayer system + ligand or non-standard ion)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; You have to make sure that the assigned atom types are different and unique for each part of your system, for example the assigned atom type for the ligand has to be different from that of the lipid and from those in the amoebabio18.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; To run pdb2xyz or xyzedit, you need a parameter file and/or key file containing the parameters. you can’t upload several parameter files in the key file, for example you can’t have   parameters amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
parameters ligand.prm&lt;br /&gt;
&lt;br /&gt;
This will result in loading only the second one only. The solution is to combine all of them into a single parameter file or into the key file&lt;br /&gt;
&lt;br /&gt;
== PDB to xyz ==&lt;br /&gt;
&lt;br /&gt;
If you have a pdb file you can convert it tinker xyz file by specifying a prm file above. It will remove the heteroatoms such as ligand, which you can use POLTYPE to generate parameters for.&lt;br /&gt;
&lt;br /&gt;
First you need to determine the protonation state of charged residue. Tools like propka can do this quikly: [http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&lt;br /&gt;
&lt;br /&gt;
Once you decided the protonation state, make sure the residue name in PDB file match the protonation state (list below). For example, ASH is the neutral form of ASP. Then you can run &amp;quot;pdbxyz.x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;GLY&#039; &#039;ALA&#039; &#039;VAL&#039; &#039;LEU&#039; &#039;ILE&#039; &#039;SER&#039; &#039;THR&#039; &#039;CYS&#039; &#039;CYX&#039; &#039;CYD&#039; &#039;PRO&#039; &#039;PHE&#039; &#039;TYR&#039; &#039;TYD&#039; &#039;TRP&#039; &#039;HIS&#039; &#039;HID&#039; &#039;HIE&#039; &#039;ASP&#039; &#039;ASH&#039; &#039;ASN&#039; &#039;GLU&#039; &#039;GLH&#039; &#039;GLN&#039; &#039;MET&#039; &#039;LYS&#039; &#039;LYD&#039; &#039;ARG&#039; &#039;ORN&#039; &#039;AIB&#039; &#039;PCA&#039; &#039;UNK&#039;&lt;br /&gt;
&lt;br /&gt;
UNK means unownk; AIB, ORN and PCA&amp;amp;nbsp; are modified AA.&lt;br /&gt;
&lt;br /&gt;
[https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Terminal residue names:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
COH ACE NH2 NME&amp;amp;nbsp; FOR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HETATM&#039;&#039;&#039; (residue name) recoginzed by pdbxyz:&lt;br /&gt;
&lt;br /&gt;
HOH K CA MG NA CL&lt;br /&gt;
&lt;br /&gt;
== AMOEBA for a new ligand ==&lt;br /&gt;
&lt;br /&gt;
Note that pdbxyz recognize proteins, water (res name HOH and some ions). The ligand (benzamidine above) is stripped. For that you need to derive your own parameters. For AMOEBA this can be done using POLTYPE: [https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype]&lt;br /&gt;
&lt;br /&gt;
 Input: ligand.sdf or ligand.pdb (for example, you can truncate the ligand &amp;quot;BEN&amp;quot; out of the 1bty.pdb) &lt;br /&gt;
 Output: will produce the xyz and corresponding key files (ttt.xyz and ttt.key):&lt;br /&gt;
&lt;br /&gt;
If you will merge the ligand xyz file with another molecule, &#039;&#039;&#039;make sure you set the suitable range for atom types (an option for pOLTYPE) so that they won&#039;t overlap.&#039;&#039;&#039; See the &amp;quot;Check the results section&amp;quot; on POLTYPE website before using them. Use &amp;quot;analyze.x&amp;quot; to make sure the xyz and key files work correctly: &amp;quot;analyze.x ttt.xyz -k ttt.key ep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== build a solvent box ==&lt;br /&gt;
&lt;br /&gt;
=== arbirary solvent ===&lt;br /&gt;
&lt;br /&gt;
Use xyzedit.x to build a water (or any solvent) box starting from a water monomer (e.g. tinker/test/water.xyz). You can specify many monomers to add and how big the box is. Type xyzedit.x at the command line and you will be asked to enter relevant inputs (or you may type all the parameters in one line).&lt;br /&gt;
&lt;br /&gt;
Make sure edit the key file to add box size and Ewald related keywords (see [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file])&lt;br /&gt;
&lt;br /&gt;
=== prebuilt water box ===&lt;br /&gt;
&lt;br /&gt;
Some prebuilt waterboxs:&amp;amp;nbsp;[http://biomol.bme.utexas.edu/~pren/downloads/waterbox http://biomol.bme.utexas.edu/~pren/downloads/waterbox]&lt;br /&gt;
&lt;br /&gt;
Larger boxes can be created as supercells of smaller boxes, e.g. this following command will create a box 64x larger than the orignial box.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -e &amp;quot;5\n4\n\n&amp;quot; | crystal.x watersmall.xyz -k tinker.key&lt;br /&gt;
== Combining two xyz files ==&lt;br /&gt;
&lt;br /&gt;
Tinker &amp;quot;xyzedit.x&amp;quot; program (option 20) can be used to combine two xyz files into one (matching key file for each xyz is required). You can merge the key or parameter files by appending one to the other, but please make sure the atom types are not overlapping between the two.&lt;br /&gt;
&lt;br /&gt;
For the above 1BTY example, poltype will translate/rotate the ligand in standard orientation. You may need a script to copy the coordinates from ligand.pdb into ttt.xyz (hwich you get out of the POLTYPE run).&lt;br /&gt;
&lt;br /&gt;
Then you can use xyzedit.x to combine 1bty.xyz and lig.xyz into one xyz file with the two molecules orient/position as in PDB. Merge the key file by appending ttt.key (except the first line which contains header already in amoebapro13.prm of 1bty.key) to 1bty.key; again avoid overlapping atom types between the ligand and protein.&lt;br /&gt;
&lt;br /&gt;
== Soaking solute in solvent ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;Tinker &amp;quot;xyzedit.x&amp;quot; is an interactive program (option 20) that can be used for this as well. You just need a molecule.xyz and waterbox.xyz along with matching key files (actual names do not matter).&lt;br /&gt;
&lt;br /&gt;
Some water files (monomers, boxes) are in tinker/example or test folder. One can make a water box of different size using this program too (starting from one water or a cluster of water and use option 19). Option 21 can add ions to solvent box. To distiguish between AMOEBA or fixed charged FF simulation files, check the key file to see which prm file it is pointing to.&lt;br /&gt;
&lt;br /&gt;
Or you can use this utility: [http://www.ime.unicamp.br/~martinez/packmol/home.shtml http://www.ime.unicamp.br/~martinez/packmol/home.shtml]&lt;br /&gt;
&lt;br /&gt;
On renlab cluster, there is &amp;quot;packmol&amp;quot; installed at /home/liuchw/Softwares/packmol-20.14.4/packmol&lt;br /&gt;
&lt;br /&gt;
Two examples for generating a cubic box:&lt;br /&gt;
&lt;br /&gt;
example 1: generate a pure liquid box, using water as an example. In the real cases, one could calculate the number of molecules and the length of the cube according to desired density. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output water-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;example 2: soak a MeOH molecule into the above box. We first let MeOH be in the center of the box with coordinates (9,9,9), and then soak with water in 18.6 A cubic box. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output liquid-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure MeOH.xyz&lt;br /&gt;
number 1&lt;br /&gt;
center&lt;br /&gt;
fixed 9.0 9.0 9.0 0.0 0.0 0.0&lt;br /&gt;
end structure&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the above two examples, all one needs are the &amp;quot;Wat.xyz&amp;quot; and &amp;quot;MeOH.xyz&amp;quot; files. After the box is generated, it is straightforward to use Tinker to minimize the structure. &lt;br /&gt;
&lt;br /&gt;
After construct the simulations, relax the system using minimize and dynamics (restraint the solute first), with proper restraints and heating. See [[Tutorial:tinkertut#MD_setup-initial_equilibration|MD setup]] for details&lt;br /&gt;
&lt;br /&gt;
== Check your xyz/key files and common errors ==&lt;br /&gt;
&lt;br /&gt;
Once you have a pair of xyz and key (and prm file the key uses one), you can use &amp;quot;analyze&amp;quot; to do some basic check. The CPU version &amp;quot;analyze&amp;quot; has many more options.&lt;br /&gt;
&lt;br /&gt;
analyze xxx.xyz -k xxx.key e&amp;quot; will print energy and its components.&lt;br /&gt;
&lt;br /&gt;
 If there are any error related to missing parameters, you need to fix them. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key em&amp;quot; prints total charge and dipole moments etc.&lt;br /&gt;
&lt;br /&gt;
 The total charge should match your expectation (0, -1, +1) etc&lt;br /&gt;
 If this is a box of solute in water, you should add neutralizing ions (K+ or Cl-) and then &amp;quot;additional&amp;quot; 0.1 mM KCl. So the next charge should be 0!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key ep&amp;quot; prints all parameters&lt;br /&gt;
&lt;br /&gt;
 Check if every atom has a multipole (number of multipole matches no of atoms) &lt;br /&gt;
 check if every atom has vdw (if an atom has 0.000 0.000 for vdw R and eps, that means the vdw parameters are missing; need to add) &lt;br /&gt;
 check polarization groups are making sense. If you see every atom is its own group, this is likely wrong. Typically we keep each function group (e.g. benzyl) as one group. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key eL&amp;quot; &lt;br /&gt;
  will print out large interactions, for example large ele or vdw interactions of two atoms that are too close&lt;br /&gt;
analyze with &amp;quot;ED&amp;quot; option (debug) will print out all individual interactions and lot more information. The output&amp;amp;nbsp;is of course huge if you do this to a large bix, but you can use &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;vdwterm only, bondterm only, angleterm only. multipoleterm only, polarizeterm only, etc&amp;lt;/span&amp;gt;&#039;&#039;&#039; to check a specific energy component. Or use &#039;&#039;&#039;bondterm none, angleterm none&#039;&#039;&#039;....ect to turn off some interactions you don&#039;t want to check. A full list of xxxTERM can be found in &amp;lt;span style=&amp;quot;color:#2980b9;&amp;quot;&amp;gt;&#039;&#039;&#039;tinker/source/prmkey.f&#039;&#039;&#039;&amp;lt;/span&amp;gt;(grep TERM).&lt;br /&gt;
=== Induced dipole not converging error ===&lt;br /&gt;
&lt;br /&gt;
If analyze give you error related to induced dipole not converging, the structure is bad. If you see &amp;quot;induced dipole not converging&amp;quot; error in the beginning of your MD, it is also due to bad structures (atoms too close). The structure needs refinement, or missing parameters above. To refine the structure&lt;br /&gt;
&lt;br /&gt;
1. minimize the structure. you can turn off polarization (polarizeterm none) or even permanent ele completely (multipoleterm none &amp;amp; polarizeterm none) first to minimize using vdw to move close atoms apart. Then turn on multipole and then induce back&lt;br /&gt;
&lt;br /&gt;
2 For MD simulations of protein/RNA/DNA in water, run MD first at low T with pro/rna/dna &amp;quot;heavy atoms&amp;quot; restrained (e.g. restrain-position -1 1000 5.0 or restrain-position 2 , , , 1.0) to let water &amp;amp; counter ions to relax for few ns. Then gradually heat up and remove the restraints. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#d35400;&amp;quot;&amp;gt;Note &amp;quot;restrain-position -1 1000 0.0&amp;quot; or &amp;quot;restrain-position 2 , , , 0.0&amp;quot; DOESN&#039;T mean 0 restraint (k=0.0) on atoms 1 to 1000 or atom 2!!!&amp;amp;nbsp; &amp;quot;0.0&amp;quot; is replaced by 100.0 in tinker by default.&amp;lt;/span&amp;gt;&#039;&#039;&#039; If you don&#039;t want restraint, comment out/remove these lines.&lt;br /&gt;
&lt;br /&gt;
3. But if you see this error randomly over few hundreds of ps, which may happen for tough systems of large/many charges e.g DNA/RNA, you can add &amp;quot;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;&#039;&#039;&#039;USOLVE-CUTOFF 0.0&#039;&#039;&#039;&amp;lt;/span&amp;gt;&amp;quot; option to key. This will change the precondition behavior and make induced dipole solver more stable. It is not used by default because for &amp;quot;easy&amp;quot; systems like boxes of water, this makes MD little slower (more iterations to converge induced dipoles). If still have stability issue you may further add &amp;quot;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e67e22;&amp;quot;&amp;gt;USOLVE-DIAG xx&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;quot; where xx is 2.0 by default and a smaller number towards 1 (e.g. 1.5) will make more stable but slightly slower.&lt;br /&gt;
&lt;br /&gt;
4. If system is rather big,&amp;amp;nbsp;use &amp;quot;polar-eps 0.1&amp;quot; or 0.01 during system setup and 0.01 (0.001) for production.&lt;br /&gt;
&lt;br /&gt;
== Modified PRO &amp;amp; NA residues ==&lt;br /&gt;
&lt;br /&gt;
=== Build a structure with modified residues ===&lt;br /&gt;
&lt;br /&gt;
Modify residues in a PDB file.&lt;br /&gt;
&lt;br /&gt;
Input: PDB files of the biopolymer, an original residue and a modified residue. The original residue must be present in the biopolymer, and the modified residue must share at least 3 atoms with the original residue with identical coordinates. The modified residue is usually obtained by manually modifying the original residue.&lt;br /&gt;
&lt;br /&gt;
Output: A PDB file with specified residues modified to the new residue. [https://biomol.bme.utexas.edu/~zj2244/tutorial/modeling/modres/modified_pdb/ link]&lt;br /&gt;
&lt;br /&gt;
 # change residues 2 and 14 in dna15.pdb from res_A to res_pA&lt;br /&gt;
 morphling.py -i dna15.pdb -o pdna15.pdb -t0 res_A.pdb -t1 res_pA.pdb -n 2,14&lt;br /&gt;
&lt;br /&gt;
=== Convert pdb to xyz ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/zjing7/modified-na link]&lt;br /&gt;
&lt;br /&gt;
= More on running Tinker and tinker9 (GPU) =&lt;br /&gt;
==Manual==&lt;br /&gt;
https://tinkerdoc.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
== Compiling &amp;amp; running: ==&lt;br /&gt;
[[Software:tinkergpu]] &lt;br /&gt;
&lt;br /&gt;
== Command line ==&lt;br /&gt;
&lt;br /&gt;
Tinker programs can be run interactively, which is the best way to learn what are the required inputs. Tinker programs can also run in background with all parameters specified, for the purpose of automation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;analyze.x ttt.xyz -k ttt.key ep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;dynamic.x bench7 100000 3.0 6.0 2 298.0 N &amp;gt; ben7.log &amp;amp;&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;# the bench7.xyz above can be found in tinker official distribution inside tinker/bench/&#039;&#039;&lt;br /&gt;
 #2-fs time step for MD here is ok because of the &amp;quot;integrator respa&amp;quot; in the key file&lt;br /&gt;
&lt;br /&gt;
Or for tinker9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #source /home/liuchw/.bashrc.tinker9&lt;br /&gt;
 #export TINKER9=/home/pren/tinker9/tinker9_sugar/build/&lt;br /&gt;
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib/&lt;br /&gt;
 export CUDA_DEVICE_ORDER=PCI_BUS_ID&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0 # device number; can use 1 or 2 if there are multiple GPU cards&lt;br /&gt;
 $TINKER9/tinker9 dynamic bench7.xyz -k bench7.key 5000 2.0 1000.0 4 298.15 1.0 N &amp;gt; out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Pause and resume MD ==&lt;br /&gt;
&lt;br /&gt;
Tinker creates .dyn file that contains coordinates and velocities needed for restart MD. To stop MD, simply create a .end file (e.g. touch myrun.end) in the folder where MD is running. At the next time MD frame was written, the end file will signal Tinker to stop. To resume later simply rerun dynamics with the presence of the .dyn file. Note the output file of dynamics does not resume the count of MD steps/frames.&lt;br /&gt;
&lt;br /&gt;
== Additional notes for &amp;quot;tinker-openmm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
*It s recommended to use the respa inetgrator and 2-fs time step &lt;br /&gt;
*&amp;quot;heavy-hydrogen&amp;quot; in key file allows a 3-fs time step (not reommended) &lt;br /&gt;
*Bussi thermostat &lt;br /&gt;
*Only MC barostat is available for now. We are adding virial/Langevin piston pressure to openmm.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to specify different ensembles for MD simulation =&lt;br /&gt;
&lt;br /&gt;
== For TINKER-openmm ==&lt;br /&gt;
&#039;&#039;&#039;Tinker-Openmm is no longer supported since 2021. Use tinker9 for GPU MD (see [[Software:tinkergpu|Tinker GPU]])&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not many options available.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
For NVT, use Bussi for thermostat, RESPA integrator (2fs)&lt;br /&gt;
&lt;br /&gt;
For NPT, use Montecarlo for Barostat, Bussi thermostat. Verlet (1 fs) is safer than RESPA for use with MC barostat if very accurate density is needed.&lt;br /&gt;
&lt;br /&gt;
See below for keyword syntax.&lt;br /&gt;
&lt;br /&gt;
== Available thermostat and barostat in TINKER (2021) ==&lt;br /&gt;
&lt;br /&gt;
Thermostats:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD (lines you add to .key file)&lt;br /&gt;
 Bussi-Parrinello           thermostat bussi&lt;br /&gt;
 Berendsen                  thermostat berendsen&lt;br /&gt;
 Andersen Stochastic        thermostat andersen&lt;br /&gt;
 Nose-Hoover                thermostat nose-hoover&lt;br /&gt;
&lt;br /&gt;
There are 3 barostats available via the “barostat” keyword:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Berendsen                  barostat berendsen&lt;br /&gt;
 Monte-Carlo                barostat montecarlo&lt;br /&gt;
 Lagevin                    Barostat Langevin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above thermostat and barostats are available for the Verlet, Beeman and RESPA integrators, and can be used in combination with those integrators. These integrators are available via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Verlet                     integrator verlet&lt;br /&gt;
 Beeman                     integrator beeman (tinker 8 CPU only)&lt;br /&gt;
 RESPA                      integrator respa&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;&#039;defaults&#039;&#039;&#039; are Bussi for thermostat, Berendsen for barostat, and Beeman for integrator.&lt;br /&gt;
&lt;br /&gt;
Then there are two special integrators, a stochastic one, and a Nose-Hoover that does NPT. The stochastic integrator uses a kind of Langevin temperature bath for thermostating, and does listen to the barostat keyword. The Nose-Hoover integrator uses a separate code branch and does only NPT with Nose-Hoover methods following Martyna-Tuckerman-Klein. You can get these via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                      KEYWORD&lt;br /&gt;
 Stochastic                   integrator stochastic (no need for other T control)&lt;br /&gt;
 Nose-Hoover NPT             integrator nose-hoover (no need other keywords for T or P; starting structures need to reasonable)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Recommended NVT and NPT combinations ==&lt;br /&gt;
&lt;br /&gt;
NVT keywords combination in the key file (2fs time step)&lt;br /&gt;
&lt;br /&gt;
 thermostat bussi &lt;br /&gt;
 integrator RESPA&lt;br /&gt;
&lt;br /&gt;
Preferred/Recommended NPT (2fs, relative isotropic and homogenous systems)&lt;br /&gt;
&lt;br /&gt;
 archive (&#039;&#039;&#039;dcd-archive&#039;&#039;&#039; to produce compressed traj for large systems; need .xyz or .pdb to render in VMD)&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
 barostat MonteCarlo&lt;br /&gt;
 integrator RESPA&lt;br /&gt;
 vdw-cutoff 9 (12 for amoeba)&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 9.0 (7.0 for amoeba)&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001 (only for amoeba)&lt;br /&gt;
 polar-predict (only for amoeba)&lt;br /&gt;
&lt;br /&gt;
Recommended NPT for &#039;&#039;&#039;anisotropic systems&#039;&#039;&#039; such as membrane, or large local volume fluctuation in protein folding. Slower than above for virial calculations)&lt;br /&gt;
&lt;br /&gt;
Documentation: https://tinkerdoc.readthedocs.io/en/latest/text/feature/integrator-langevin-piston.html#implementation-2 &lt;br /&gt;
Semi-isotropic pressure control not finished yet&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;barostat langevin&#039;&#039;&#039; # for GPU&lt;br /&gt;
 &#039;&#039;&#039;semiiso-pressure&#039;&#039;&#039; (if using tinker-GPU from 2025)&lt;br /&gt;
 &#039;&#039;&#039;pressure  SEMIISO (or &amp;quot;PRESSURE SEMI&amp;quot; if using tinker-GPU from 2026&#039;&#039;&#039; #PRESSURE [ISOTROPIC / SEMI-ISOTROPIC / ANISOTROPIC ] &lt;br /&gt;
 #barostat Langevin&lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA   #or Verlet/1 fs; T control not needed&lt;br /&gt;
 a-axis 40 #change this to your actual box size; b or c can be different from a&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001&lt;br /&gt;
 polar-predict&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Alternative NPT (1fs, built in P and T control)&lt;br /&gt;
&lt;br /&gt;
 integrator nose-hoover&lt;br /&gt;
&lt;br /&gt;
== Recommended keywords (add somewhere in the .key file) for NVT ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 2 298  (100000 steps, 2.0 fs time step, dump structure every 1.0 ps, option 2 is NVT, 298 is the target T)&lt;br /&gt;
&lt;br /&gt;
It is also possible to combine &amp;quot;&#039;&#039;&#039;integrator Beeman&#039;&#039;&#039;&amp;quot; or &#039;&#039;&#039;&amp;quot;thermostat Berendsen”&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;thermostat Andersen&amp;quot;&#039;&#039;&#039;. But RESPA allows large time steps (2.0 or 2.5 fs) than Beeman. Berendsen thermostat does not provide canonical ensemble fluctuation.&lt;br /&gt;
&lt;br /&gt;
== NVE ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 1&lt;br /&gt;
&lt;br /&gt;
No need for thermostat or barostat of course. It is best to use smaller time step such as 1.0fs to conserve energy better. May even use smaller polar-eps (10^-6) than default (10^-5) in the key file.&lt;br /&gt;
&lt;br /&gt;
== Non periodic system, e.g. gas molecules not in a box ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;_&amp;quot; style=&amp;quot;background:#eee; border:1px solid #ccc; padding:5px 10px&amp;quot;&amp;gt;integrate stochastic&amp;lt;/div&amp;gt; &lt;br /&gt;
If there is no box (a-axis) in the key file, or no box dimensions in the den file, the system is non-periodic. This will set the stochastic temperature control along with the stochastic MD integration. &#039;&#039;&#039;For gas phase molecular cluster (very few atoms), the recommended time step is 0.1 fs&#039;&#039;&#039;.&lt;br /&gt;
= Free energy calculations =&lt;br /&gt;
&lt;br /&gt;
Theory about free energy calculation: http://alchemistry.org/wiki/Bennett_Acceptance_Ratio&lt;br /&gt;
&lt;br /&gt;
About AMOEBA softcore and BAR, read our book chapter: &lt;br /&gt;
&lt;br /&gt;
[[File:PL_BAR_softcore.pdf|page=3|300px]]&lt;br /&gt;
&lt;br /&gt;
== MD setup-initial equilibration ==&lt;br /&gt;
&lt;br /&gt;
Determine protonation state of ionizable groups (ASP, GLU, LYS, ARG, HIS). Use propka here&amp;amp;nbsp;[http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&amp;amp;nbsp;for proteins. For ligand, you may use pka predicction tool&amp;amp;nbsp;from Chemaxon. &lt;br /&gt;
*Add water and counter ions (neutralize system) so that the density is ~1.0 g/cc. The distance between protein and box wall should be&amp;amp;nbsp;10-15 A. Check/remove extra water in the binding pocket as necessary (keep the crystal water molecules in the pocket) &lt;br /&gt;
*In the key file, set&amp;amp;nbsp;PME-grid&amp;amp;nbsp;to be&amp;amp;nbsp;1.2x&amp;amp;nbsp;box size in Ang. For example, if box size is 55, “pme-grid&amp;amp;nbsp;64 64 64” is enough. The default of Tinker is usually more conservative. See kewald.f for allowed grid values. Add &#039;&#039;&#039;“neighbor-list”, “polar-eps 0.01”, “vdw-cutoff&amp;amp;nbsp;12”, &amp;quot;vdw-correction&amp;quot; “integrator respa”, “ewald”, “ewald-cutoff 7.0” &#039;&#039;&#039;&amp;amp;nbsp;to .key file. You can even turn off polarization initially (polarizeterm NONE) during EQ and add it back (&#039;&#039;&#039;polar-eps 0.001&#039;&#039;&#039; or tighter for production) &lt;br /&gt;
*Minimize the box before MD. If you see errors related to polarization (induced dipole not converge), do this in two steps: first minimize with electrostatic (multipoleterm NONE) and polarization turned off (polarizeterm NONE in .key file), to ~5.0 or lower; then minimize again with ele then ele+polarization back on to ~2.0 or lower. You may use position-restraints&amp;amp;nbsp;&#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; if you don&#039;t want your solute to undergo dramtic changes. (RESTRAIN-POSITION -1 200 50.0, means restrain atoms 1 to 200 using a force constant of K=50 kcal/mol).&amp;amp;nbsp; &lt;br /&gt;
*MD relaxation. You may use GPU for MD now (dynamic_omm.x).&amp;amp;nbsp;Use repsa integrator and 2fs time step.&amp;amp;nbsp;Add&amp;amp;nbsp;&#039;&#039;&#039;position-restraints&#039;&#039;&#039; to restrain protein &amp;amp; ligands &#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; in the key file&amp;amp;nbsp;initially; For metal ion-protein binding or weak binding ligand,&amp;amp;nbsp;we&amp;amp;nbsp;also suggest to use ~3 distance restraints between ion/ligand and first shell atoms. This is to prevent water disrupt the initial solute structure during the equilibration.&amp;amp;nbsp; &lt;br /&gt;
**Use 2 fs for all MD below.&amp;amp;nbsp;If you want to use 3fs (e.g. for large systems),&amp;amp;nbsp;you need to&amp;amp;nbsp;&amp;quot;heavy-hydrogen&amp;quot; in the key file.&amp;amp;nbsp;Another way to speed up is to use the OPTx: &amp;quot;polarization OPT4&amp;quot; or &amp;quot;polarization OPT3&amp;quot; OPT3 is faster but bigger error.&lt;br /&gt;
**Use &amp;quot;polar-eps 0.01&amp;quot; and &amp;quot;polar-predict&amp;quot; for equilibration for speed. For production use &amp;quot;polar-eps 0.001&amp;quot; or &amp;quot;0.0001&amp;quot;.&lt;br /&gt;
**use &amp;quot;neighbor-list&amp;quot;&lt;br /&gt;
**With the positional/distance restraints, run ~2ns&amp;amp;nbsp; NVT MD to gradually (e.g. exponentially) heat up the system from 10K&amp;amp;nbsp; to 298K or whatever expt T should be. Water/ions are relaxed after this step.&lt;br /&gt;
**Run NVT at 298K or expt T for ~2ns &#039;&#039;&#039;while gradually turning off all the position and distance restraints on protein-ligands.&#039;&#039;&#039; &lt;br /&gt;
**Run 1-2 ns NPT. Add/use &#039;&#039;&#039;&amp;quot;barostat MonteCarlo&amp;quot; in key.&#039;&#039;&#039;&lt;br /&gt;
**Check protein RMSD (esp. around binding pocket) from crystal structure after every step above. If any step gives large RMSD, redo that (and previous step) with longer/slower MD to correct the problems.   &lt;br /&gt;
*MD production run. For alchemical free energy, this involves setting the ligand group and various lambda values for ele and vdw to scale the interactions between ligand and surrounding (see below BAR section). &lt;br /&gt;
**use 2 fs with RESPA&lt;br /&gt;
**polar-eps 0.001 &lt;br /&gt;
**polar-predict&lt;br /&gt;
**neighbor-list&lt;br /&gt;
**&#039;&#039;&#039;barostat MonteCarlo&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Hydration or binding using BAR ==&lt;br /&gt;
&lt;br /&gt;
Alchemical free energy calculations are available in TINKER, Tinker9 GPU (TINKER-OpenMM no longer supported). One needs to specify the ligand or solute using the group keyword&amp;amp;nbsp;in the key file (example below). The lambda scaling schedule can be specified by user, automated by the &amp;quot;bar.x&amp;quot; in TINKER. For each set of lambda value (scaling the interaction betweem ligand and enviroemnt and inside ligand), one needs to perform one MD simulation. The bar.x is then used to analyze the dG between neighboring steps i and j, using the arc files from MD simulation i and j. The total free energy is then sum of 1-2, 2-3, ...N-1 and N.&amp;amp;nbsp;See this reference for examples: &#039;&#039;J Comput Chem. 2017 Sep 5;38(23):2047-2055&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note &#039;&#039;&#039;GPU MD and bar code&#039;&#039;&#039;&amp;amp;nbsp;is much faster than the CPU one&amp;amp;nbsp;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running BAR code in Tinker==&lt;br /&gt;
To compute free energy between two states (i and j), the bar.x (CPU or GPU) will need two trajectories (and two key files of course) of the same simulation length (frames). the two states can be neighboring lambda states in HFE or binding. &lt;br /&gt;
&lt;br /&gt;
See above (and PNAS 2008 paper) for BAR equations.&lt;br /&gt;
&lt;br /&gt;
Step 1 (bar option 1) is to generate two files, each contain the energy of its own state and perturbed energy (Eii, Eij). The second energy is using arc i and key of state j (bar will do this for you).&lt;br /&gt;
&lt;br /&gt;
 tinker9 bar 1 arc1 300 arc2 300 N &amp;gt; barfile &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;tinker 9 bar&amp;quot; is for GPU. You can replace with CPU version bar.x (slower). the arc1 and arc2 can be in different folders with their matching key files.&lt;br /&gt;
&lt;br /&gt;
Example barfile produced from this step: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.bar.&lt;br /&gt;
&lt;br /&gt;
The output below shows 500 frame used, 300K, for frame 1, energy of Eii, Eij and volume of the system (since we can do NPT where volume changes)&lt;br /&gt;
  500    300.00  comments&lt;br /&gt;
       1          -6396.8707        -6396.7580        27379.1152&lt;br /&gt;
&lt;br /&gt;
The second section of this same file will have Ejj, Eji, volume&lt;br /&gt;
&lt;br /&gt;
Step  2 (bar option 2) &lt;br /&gt;
Use the barfile produced from above to compute dG , dH and dS&lt;br /&gt;
 tinker9 bar 2 {barfile} {startsnapshot} {totalsnapshot} 1 {startsnapshot} {totalsnapshot} 1 &amp;gt; {enefile}&lt;br /&gt;
Note this step is much faster since it uses energy from above. You can also set to use a subset of the total frames, e.g. to exam how the dG converge with longer simulaitons.&lt;br /&gt;
Example out: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.ene&lt;br /&gt;
&lt;br /&gt;
== HFE ==&lt;br /&gt;
&lt;br /&gt;
Common keywords for hydration free energy calculation (suggest NPT with MC barostat or Langevin piston barostat)&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 a-axis 40&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 barostat Monte Carlo   #NPT. Use Langevin NPT if care e.g. membrane &lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA # 2-fs time step for solution; 1 for gas&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #openmp-threads    16 #this is for CPU&lt;br /&gt;
 Vdw-annihilation      #this is to help sampling conformation at low lambda by removing intrmol vdw interactions; not needed for rigid solute.&lt;br /&gt;
&lt;br /&gt;
The ele and vdw schedules are found in our previous paper. Also recommended as below. Note you can add or remove steps based dG results and error bars.&lt;br /&gt;
&lt;br /&gt;
Run NPT for each lambda below. 2-5 ns for each lambda typically depending how complex your system (eg, 2ns is sufficient for K+ in water but a large ligand mayneed 5ns). Use BAR-NPT to analyze free energy between neighboring lambda (ignore first 200 ps). The toal FE is the sum of each step. You can check cumulative free energy convergence as a function of simulation time. Add more MD if needed.&lt;br /&gt;
&lt;br /&gt;
Repeat the set of simulations for ligand in solution and ligand itself in gas phase (not necessary if gas energy is 0 like single ion). The gas phase part should use the matching keywords as above (but no a-axis, Ewald, and time step for constant T MD is 0.1fs).&lt;br /&gt;
&lt;br /&gt;
Typical lambda schedule:&lt;br /&gt;
&lt;br /&gt;
 Ele L	Vdw L&lt;br /&gt;
 0	0&lt;br /&gt;
 0	0.4&lt;br /&gt;
 0	0.5&lt;br /&gt;
 0	0.525&lt;br /&gt;
 0	0.55&lt;br /&gt;
 0	0.575&lt;br /&gt;
 0	0.6&lt;br /&gt;
 0	0.625&lt;br /&gt;
 0	0.65&lt;br /&gt;
 0	0.675&lt;br /&gt;
 0	0.7&lt;br /&gt;
 0	0.725&lt;br /&gt;
 0	0.75&lt;br /&gt;
 0	0.775&lt;br /&gt;
 0	0.8&lt;br /&gt;
 0	0.9&lt;br /&gt;
 0	1&lt;br /&gt;
 0.1	1&lt;br /&gt;
 0.2	1&lt;br /&gt;
 0.3	1&lt;br /&gt;
 0.4	1&lt;br /&gt;
 0.5	1&lt;br /&gt;
 0.6	1&lt;br /&gt;
 0.7	1&lt;br /&gt;
 0.8	1&lt;br /&gt;
 0.9	1&lt;br /&gt;
  1     1&lt;br /&gt;
&lt;br /&gt;
== binding free energy ==&lt;br /&gt;
&lt;br /&gt;
For host-guest binding, the simulation process similiar to above but involve two sets: one is host-guest-water, and the other guest-water. In both cases, guest is the ligand that is being scaled. For host-guest-water, one also applies&amp;amp;nbsp;a bond restraint between host and guest. This restraint can be turned off in one or two steps for lambda=1 but should be kept when L&amp;lt;1.&lt;br /&gt;
&lt;br /&gt;
 One way is to set the restraint K=0 when Lele, Lvdw=1, then K=90% when Lele=0.9/Lvdw=1, then K=100% when Lele=80%/Lvdw=1..... K=100% for all rest of L including L=0. &lt;br /&gt;
 The goal is for L=1 (host-guest full interaction), there is no restraint. when L=0, restraint is at 100%. The L=0 state seems &amp;quot;incorrect&amp;quot; due to the restraint but can be corrected (below).&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;bond&amp;quot; is between group of guest/ligand and group of host atoms. It is best to minimize the distance between the centers of the two groups (for sampling).  For example, if you are simulating an ion binding to a spherical cavity like CPP, you can pick 3 atoms on the host whose center is roughly the center of the ion; the restraint will be between the ion and this group. A correction is needed to &amp;quot;remove&amp;quot; the effect of this restraint and standard volume that goes into the final binding free energy.&#039;&#039;&#039;Tinker/utiity/freefix.f&#039;&#039;&#039; can be used to calculate the correction. Note this correction is typically positive (make binding energy less negative) since restraint leads to overestimation of binding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*The correction for lambda=0 from RTln(C0*V), where C0=1/1660 A^3 and V=integrate{4*pi*r^2*exp[-k*(r-r0)^2/RT]dr}. k=15 kcal/mol in the example below. If you are using a harmonic restraint (example below) and the equilibrium r0 is not 0, numerical integration is necessary. A good reference is JACS v126, NO. 24, 2004.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brandon setup script can also set up protein-lig distance restraint now. Basically select a central heavy atom on ligand (or a function group) and another group of nearby 3-4 Ca from protein.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Francis wrote a program to pick restraints based on Boresch paper. It can include additional angle and torsion restraints. However we found it is best to just use the simple distance restraints. The additional restraints may introduce bias towards ligand or host dynamics if not picked carefully.&amp;lt;/pre&amp;gt; [[Tinkergpu:get_rot_rest]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use distance restraint when lambda =1 for both ele and vdw, you can remove the effect of restraint from FEP or BAR; or you can avoid this correction if the restraint strength is set to 0 when the lambda =1 (gradually turned on when lambda-&amp;gt; 0 for both vdw and ele).&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 GROUP 1 -1 3 //ligand group&lt;br /&gt;
 GROUP 2 100, 102, 138 //protein group&lt;br /&gt;
 RESTRAIN-GROUPS  1  2  15.0  2.0 2.0&lt;br /&gt;
 Vdw-annihilation&lt;br /&gt;
 #lower bound &amp;amp; upper bound (2.0, 2.0) do not have to be the same. 15 is the force constant.&lt;br /&gt;
&lt;br /&gt;
Each set of lambda corresponds to one separate MD simulations of 5-10ns or longer. Save MD frames at every 3-5 ps. Use bar.x (bar_omm.x for GPU) to analyze the free energy dG between the neighboring lambda values.&lt;br /&gt;
&lt;br /&gt;
Unlike HFE, no need for gas-phase simulation since the end states of the ligand-water vs. ligand-protein cancels.&lt;br /&gt;
&lt;br /&gt;
Some scripts fron CW:&amp;amp;nbsp;[https://github.com/leucinw/ComputTools/tree/master/bardemo https://github.com/leucinw/ComputTools/tree/master/bardemo]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==ion HFE steps==&lt;br /&gt;
To compute ion hydration FE, &lt;br /&gt;
* prepare ion.xyz and waterbox.xyz. One key file containing all parameters (amoeba09.prm has ion and bunch of ions). If you have a new ion, add its parameters including multipoles, polarizability/damping, vdw &lt;br /&gt;
* water box should be ~50 A. A list of prebuilt water box (you many need to change atom types in xyz if you are using different key) https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#prebuilt_water_box &lt;br /&gt;
* use xyzedit to soak ion in water (see tutorial above about building and combining xyz)&lt;br /&gt;
* Run NPT for ~1ns to relax. See tutorial on this page about dynamics on GPU NPT keywords (using Langevin or MonteCarlo)&lt;br /&gt;
* Take the last relaxed structure to create inputs for HFE. Best to create a series of folders, one for each lambda with inputs and run scripts. See here for lambda schedule https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#HFE&lt;br /&gt;
* Get a list of nodes from Google spreadsheet of lab cluster. Ask for it if you can&#039;t find ~10 GPU nodes.&lt;br /&gt;
* each MD for ~2ns (add more if needed)&lt;br /&gt;
* Use a script to send jobs to each node. You can have 2 jobs concurrent on one GPU and rotate your jobs (~50 lambdas) through.&amp;lt;br /&amp;gt;&lt;br /&gt;
== hydration and binding free energy examples ==&lt;br /&gt;
&lt;br /&gt;
*Ethanol solvation free energy [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/01_solvation/Ethanol.zip download] &lt;br /&gt;
*PBP-phosphate binding [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/02_protein_ligand_binding/PBP_PO4.zip download] &lt;br /&gt;
&lt;br /&gt;
Please unzip the files and see README for instructions.&lt;br /&gt;
&lt;br /&gt;
== HFE and binding free energy calc using Brandon&#039;s script ==&lt;br /&gt;
&lt;br /&gt;
Set up from complex PDB and ligand xyz/key (POLTYE):&amp;amp;nbsp;[https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*create conda env according to instructions on the annihilator github page &lt;br /&gt;
*make&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;something like&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;/home/eew947/.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;with your username replacing mine everywhere in it &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;ssh&amp;lt;/code&amp;gt;&amp;amp;nbsp;to node you want to start from &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;source ~/.allpurpose.bashrc&amp;lt;/code&amp;gt; &lt;br /&gt;
*prepare&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;annihilator.ini&amp;lt;/code&amp;gt; &lt;br /&gt;
*if you want to use daemon, you have to add the keyword for it in annihilator *ini and have it already running before starting annihilator &lt;br /&gt;
*start annihilator by&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;nohup yourpathtoannihilatorhere/AMOEBAAnnihilatorModules/amoebaannihilator.py &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== OSRW ==&lt;br /&gt;
&lt;br /&gt;
Only implemented in tinker CPU. GPU version is under development.&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
&lt;br /&gt;
== Force Field Explorer ==&lt;br /&gt;
&lt;br /&gt;
By Mike Schneider and Jay Ponder, [http://dasher.wustl.edu http://dasher.wustl.edu] Can visualize the xyz and arc (MD trajectory) files; create and start TINKER calcualtions&lt;br /&gt;
&lt;br /&gt;
== VMD ==&lt;br /&gt;
&lt;br /&gt;
Choose TINKER format when open a xyz file. Trajectory file (.arc) also works.&lt;br /&gt;
&lt;br /&gt;
== Pymol ==&lt;br /&gt;
&lt;br /&gt;
Sometimes the xyz file can not be displayed correctly&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
[https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials]&lt;br /&gt;
&lt;br /&gt;
Please email me if you have tutorials related to AMOEBA or Tinker you would like to share.&lt;br /&gt;
&lt;br /&gt;
= AMOEBA Force Field Papers: =&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Fundamental theory of AMOEBA multipoles:&#039;&#039;&#039; ===&lt;br /&gt;
[[Tutorial:amm#Molecular Mechanics and Force Fields (AMOEBA, AMOEBA+)]]&lt;br /&gt;
&lt;br /&gt;
===AMEOBA FF:===&lt;br /&gt;
&lt;br /&gt;
#Water model: Ren, P. Y.; Ponder, J. W., Polarizable atomic multipole water model for molecular mechanics simulation. Journal of Physical Chemistry B &#039;&#039;&#039;2003&#039;&#039;&#039;, 107 (24), 5933-5947. &lt;br /&gt;
#Small molecules: Ren, P.; Wu, C.; Ponder, J. W., Polarizable Atomic Multipole-based Molecular Mechanics for Organic Molecules. J Chem Theory Comput &#039;&#039;&#039;2011&#039;&#039;&#039;, 7 (10), 3143-3161. &lt;br /&gt;
#Proteins: Shi, Y.; Xia, Z.; Zhang, J.; Best, R.; Wu, C.; Ponder, J. W.; Ren, P., The Polarizable Atomic Multipole-based AMOEBA Force Field for Proteins. J Chem Theory Comput &#039;&#039;&#039;2013&#039;&#039;&#039;, 9 (9), 4046-4063. &lt;br /&gt;
#DMP/TMP/Base &amp;amp; nucleic acids:&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
*Zhang, C.; Lu, C.; Wang, Q.; Ponder, J. W.; Ren, P., Polarizable Multipole-Based Force Field for Dimethyl and Trimethyl Phosphate. J Chem Theory Comput 2015, 11 (11), 5326-39. &lt;br /&gt;
*Zhang, C.; Bell, D.; Harger, M.; Ren, P., Polarizable Multipole-Based Force Field for Aromatic Molecules and Nucleobases. J Chem Theory Comput 2017, 13 (2), 666-678. &lt;br /&gt;
*Zhang, C.; Lu, C.; Jing, Z.; Wu, C.; Piquemal, J. P.; Ponder, J. W.; Ren, P., AMOEBA Polarizable Atomic Multipole Force Field for Nucleic Acids. J Chem Theory Comput 2018, 14 (4), 2084-2108. &lt;br /&gt;
&lt;br /&gt;
===AMOEBA+ model (water published, small and biomolecules in progress)===&lt;br /&gt;
&lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., AMOEBA+ Classical Potential for Modeling Molecular Interactions. J Chem Theory Comput 2019. &lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., Implementation of Geometry-Dependent Charge Flux into the Polarizable AMOEBA+ Potential. J Phys Chem Lett 2019, 11, 419-426.&lt;br /&gt;
&lt;br /&gt;
===AMOEBA+NN model: incorporating Neural Networks===&lt;br /&gt;
&lt;br /&gt;
Wang, Y., et al. (2024). &amp;quot;Incorporating Neural Networks into the AMOEBA Polarizable Force Field.&amp;quot; The Journal of Physical Chemistry B 128(10): 2381-2388.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Tinker Key File for AMOEBA+ Condensed Phase Simulations ===&lt;br /&gt;
 EWALD&lt;br /&gt;
 EWALD-CUTOFF      9.0 # for real space Ewald and charge penetration&lt;br /&gt;
 &lt;br /&gt;
 NEIGHBOR-LIST&lt;br /&gt;
 &lt;br /&gt;
 VDW-CUTOFF        12.0 # for vdw term&lt;br /&gt;
 CHGTRN-CUTOFF     12.0 # for charge transfer term&lt;br /&gt;
 VDW-CORRECTION&lt;br /&gt;
 &lt;br /&gt;
 INTEGRATOR  RESPA&lt;br /&gt;
 THERMOSTAT  BUSSI&lt;br /&gt;
 BAROSTAT    MONTECARLO&lt;br /&gt;
 &lt;br /&gt;
 POLAR-PREDICT&lt;br /&gt;
 POLAR-EPS 0.00001&lt;br /&gt;
&lt;br /&gt;
==Lectures on Force Field, AMOEBA, AMOEBA+==&lt;br /&gt;
Under &#039;&#039;&#039;Adv Mol Modeling&#039;&#039;&#039; menu:&lt;br /&gt;
 [[Tutorial:amm#Molecular_Mechanics_and_Force_Fields_(AMOEBA,_AMOEBA+) | Link]]&lt;br /&gt;
&lt;br /&gt;
= More Explicit Free Energy Calc Steps - Brandon Walker =&lt;br /&gt;
&lt;br /&gt;
Old/obsolete description here: [[Tinker-tut:free_eng_Bbdw|Obsolete description here]]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2177</id>
		<title>Tutorial:tinkertut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2177"/>
		<updated>2026-04-22T16:46:10Z</updated>

		<summary type="html">&lt;p&gt;Brendan: added line directing to kturn_tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purposes =&lt;br /&gt;
This page provide tutorials on using AMOEBA force field via Tinker (CPU) and Tinker-OpenMM (GPU) programs.&lt;br /&gt;
&lt;br /&gt;
Tinker manual: https://dasher.wustl.edu/tinker/downloads/tinker-guide.pdf&lt;br /&gt;
&lt;br /&gt;
Tinker GPU manual: https://tinker9-manual.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
For a simpler, direct tutorial covering the basics of going from a PDB file to a general molecular dynamics (MD) simulation, you can follow [[Tutorial:kturn_tut]]. &lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
Some simple tutorials about Tinker I used in my teaching below. Note you can directly download tinker source from https://github.com/TinkerTools/tinker&amp;lt;nowiki/&amp;gt;and executables from https://github.com/TinkerTools/tinker-ffe/releases/tag/v25.5 or  [https://dasher.wustl.edu/tinker/ https://dasher.wustl.edu/tinker/]&amp;amp;nbsp;(Windows, mac. Linux) for the following tutorials.&lt;br /&gt;
&lt;br /&gt;
You can either use command lines in Windows CMD window or Linux terminals, or use FFX interface for some exercises. &#039;&#039;&#039;Actually applications always use command lines to operate in Linux OS&#039;&#039;&#039;. If you are not familiar with Linux, this is the opportunity to practice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;[https://biomolmd.org/pren/tinker-tut/ &amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;https://biomolmd.org/pren/tinker-tut/&amp;lt;/span&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Below you will find more detailed instructions and discussions.&lt;br /&gt;
&lt;br /&gt;
= Input files =&lt;br /&gt;
&lt;br /&gt;
You can find examples of input files in tinker distribution under tinker/bench, tinker/example or tinker/test. Two files are required to run TINKER calculations: *.xyz and *.key For example, open butane.xyz and butane.key in tinker/example/ (available in all official distributions) to see what’s inside.&lt;br /&gt;
&lt;br /&gt;
== *.xyz file ==&lt;br /&gt;
&lt;br /&gt;
*The first number on the 1st line is how many atoms total. &lt;br /&gt;
*There may be a second line that specify the box dimensions if the system is periodic (newer format since tinker 6) &lt;br /&gt;
*The first column is the atomic index &lt;br /&gt;
*The second column is the atomic symbol &lt;br /&gt;
*The 3 -5th columns are x,y,z coordinates in Angstrom &lt;br /&gt;
*The 6th is the “atom type” defined in the *.key file. This is the index tinker uses to assign parameters from the key/parameter file. &lt;br /&gt;
*The 7th – last columns are lists of atoms that are connected to the current atom&lt;br /&gt;
&lt;br /&gt;
== *.key file ==&lt;br /&gt;
&lt;br /&gt;
The key file may have all the actual parameters or a link to the actual parameters file specified in the first line. The parameters specify the bond, angle, torsion, vdW and electrostatic interactions between atoms based on the “atom type”. If you see an error related to OMP, please set the OPENMP-THREADS in the key file to a number less than the # of CPU cores on your computer. This sets how many CPU cores are used in the parallel execution.&lt;br /&gt;
&lt;br /&gt;
For example, in protein.key below, borrowed from tinker/bench/bench7.key, the first line specific the actual parameters are contain in the amoebapro13.prm. More examples can be found in tinker/bench, tinker/example, or tinker/test.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 parameters           $TINKERDIR/params/amoebabio18.prm &lt;br /&gt;
                                      &#039;&#039;# use the latest prm from GitHub&#039;&#039;&lt;br /&gt;
 # verbose                            &#039;&#039;# printing info for every step, for debugging mostly&#039;&#039;&lt;br /&gt;
 integrator            respa          &#039;&#039;#this multi-time step integrator allows TINKER to use 2 fs time step&#039;&#039;&lt;br /&gt;
 a-axis                62.23          &#039;&#039;# add b and c-axis if not cubic&#039;&#039;&lt;br /&gt;
 vdw-cutoff            12.0&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 neighbor-list                &#039;&#039;# this below requires your box is twice the cutoff plus 2 or 3 Ang.&#039;&#039;&lt;br /&gt;
                              &#039;&#039;#&#039;&#039; &#039;&#039;If your box is too small for vdw but OK for Ewald, you can&#039;&#039; &#039;&#039;use &amp;quot;mpole-list&amp;quot;&#039;&#039;&lt;br /&gt;
 ewald&lt;br /&gt;
 ewald-cutoff          7.0    &#039;&#039;# small cutoff because dipole/quadrupole die off &amp;gt; charge.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 polar-eps             0.01    &#039;&#039;# the induced dipole convergence threshold, 0.001 is better but slower.&#039;&#039;&lt;br /&gt;
 polar-predict&lt;br /&gt;
 &lt;br /&gt;
 #polarization         OPT3    &#039;&#039;#For improving polarization. OPT4 is more accurate but OPT3 is faster&#039;&#039;&lt;br /&gt;
 #openmp-threads       16      &#039;&#039;# CPU only. how many core you want to use on the node.&#039;&#039;&lt;br /&gt;
 #HEAVY-HYDROGEN              #&#039;&#039;This will increase H atom mass automatically so 3 or 3.5 fs time step can be &#039;&#039;                                                                      &lt;br /&gt;
                              #&#039;&#039;Kinetics will  be affected            &#039;&#039;&lt;br /&gt;
                                                &lt;br /&gt;
 # pme-grid  64 64 64       &#039;&#039;#If speed is a concern, set this mannually to be slightly bigger than simulation box size. E.g. use 64 is box is 62.23 (1.2x is the best but slower). Must be even with factors of only 2, 3 and 5. see source/kewald.f for a list. Sometimes the default grid size is conservative&#039;&#039; &lt;br /&gt;
 #fft-package           FFTW&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Example of overwriting the parameters in the .prm file. The bond parameters between &lt;br /&gt;
 # atom classes 1 and 4 are redefined below, which&lt;br /&gt;
 # will overwrite those already in the amoebapro13.prm. &lt;br /&gt;
 #this is only for illustration purpose&lt;br /&gt;
 # bond          1    4          200.00     1.1&lt;br /&gt;
&lt;br /&gt;
= How to generate input files =&lt;br /&gt;
&lt;br /&gt;
== CHARMM-GUI ==&lt;br /&gt;
charmm-gui can now output simulation files in Tinker format, but only fixed-charge force fields for now.&lt;br /&gt;
&lt;br /&gt;
== Latest tool for system set up for Tinker and AMOEBA ==&lt;br /&gt;
https://github.com/prenlab/Tinker-GUI&lt;br /&gt;
&lt;br /&gt;
Tools developed by Dr. Chengwen Liu for complex systems such as protein-membrane system: https://github.com/leucinw/TIPTOP&lt;br /&gt;
&lt;br /&gt;
Once built, before running production, see below [[#Check your xyz/key files and common errors]]&lt;br /&gt;
&lt;br /&gt;
== Programs and Scripts for converting formats ==&lt;br /&gt;
Click to see: [[tinkersctipts]]&lt;br /&gt;
&lt;br /&gt;
== proteins, nucleic acids, common organics ==&lt;br /&gt;
&lt;br /&gt;
In tinker/params, you can find pre-existing parameters for certain molecular systems, both AMOEBA, amber, charmm, opls, mmff, and mm2/3.&lt;br /&gt;
&lt;br /&gt;
If you want to build a peptide from a sequence, you can use tinker &amp;quot;protein.x&amp;quot; command, for example, ACE-ALA-NME, while create/use a tinker.key to specify which force field (with one line as below).&lt;br /&gt;
 parameters /path/to/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
== Lipid Bilayer System ==&lt;br /&gt;
If you have complicated system; protein embedded in a lipid bilayer and solvated in water box and a ligand prepared by CHARMM-GUI or any other package. The best way to convert such system is to divide it into three parts:&lt;br /&gt;
&lt;br /&gt;
i- Protein + water + ions: can be converted by pdb2xyz in Tinker and will result in the best consistency&lt;br /&gt;
&lt;br /&gt;
ii- Lipid bilayer: This must be converted manually using a script, depending on the lipid type check the Github TIPTOP database leucinw/TIPTOP. Convert each lipid alone, depending on the connectivity from the reference (don’t use the connectivity from Openbabel as this will result in wrong connectivity and the system will blow up). After converting each lipid molecule alone, append all of them together&lt;br /&gt;
&lt;br /&gt;
iii- If your system has a ligand or a non-standard ion, Poltype should be used to generate the parameter file, then convert your extracted ligand or non-standard ion using pdb2xyz and double check that the atom type assigned is consistent with what you had in the parameter file&lt;br /&gt;
&lt;br /&gt;
iv- Use xyzedit option 23 to combine the three parts together (Protein + water +ion with Lipid Bilayer system + ligand or non-standard ion)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; You have to make sure that the assigned atom types are different and unique for each part of your system, for example the assigned atom type for the ligand has to be different from that of the lipid and from those in the amoebabio18.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; To run pdb2xyz or xyzedit, you need a parameter file and/or key file containing the parameters. you can’t upload several parameter files in the key file, for example you can’t have   parameters amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
parameters ligand.prm&lt;br /&gt;
&lt;br /&gt;
This will result in loading only the second one only. The solution is to combine all of them into a single parameter file or into the key file&lt;br /&gt;
&lt;br /&gt;
== PDB to xyz ==&lt;br /&gt;
&lt;br /&gt;
If you have a pdb file you can convert it tinker xyz file by specifying a prm file above. It will remove the heteroatoms such as ligand, which you can use POLTYPE to generate parameters for.&lt;br /&gt;
&lt;br /&gt;
First you need to determine the protonation state of charged residue. Tools like propka can do this quikly: [http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&lt;br /&gt;
&lt;br /&gt;
Once you decided the protonation state, make sure the residue name in PDB file match the protonation state (list below). For example, ASH is the neutral form of ASP. Then you can run &amp;quot;pdbxyz.x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;GLY&#039; &#039;ALA&#039; &#039;VAL&#039; &#039;LEU&#039; &#039;ILE&#039; &#039;SER&#039; &#039;THR&#039; &#039;CYS&#039; &#039;CYX&#039; &#039;CYD&#039; &#039;PRO&#039; &#039;PHE&#039; &#039;TYR&#039; &#039;TYD&#039; &#039;TRP&#039; &#039;HIS&#039; &#039;HID&#039; &#039;HIE&#039; &#039;ASP&#039; &#039;ASH&#039; &#039;ASN&#039; &#039;GLU&#039; &#039;GLH&#039; &#039;GLN&#039; &#039;MET&#039; &#039;LYS&#039; &#039;LYD&#039; &#039;ARG&#039; &#039;ORN&#039; &#039;AIB&#039; &#039;PCA&#039; &#039;UNK&#039;&lt;br /&gt;
&lt;br /&gt;
UNK means unownk; AIB, ORN and PCA&amp;amp;nbsp; are modified AA.&lt;br /&gt;
&lt;br /&gt;
[https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Terminal residue names:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
COH ACE NH2 NME&amp;amp;nbsp; FOR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HETATM&#039;&#039;&#039; (residue name) recoginzed by pdbxyz:&lt;br /&gt;
&lt;br /&gt;
HOH K CA MG NA CL&lt;br /&gt;
&lt;br /&gt;
== AMOEBA for a new ligand ==&lt;br /&gt;
&lt;br /&gt;
Note that pdbxyz recognize proteins, water (res name HOH and some ions). The ligand (benzamidine above) is stripped. For that you need to derive your own parameters. For AMOEBA this can be done using POLTYPE: [https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype]&lt;br /&gt;
&lt;br /&gt;
 Input: ligand.sdf or ligand.pdb (for example, you can truncate the ligand &amp;quot;BEN&amp;quot; out of the 1bty.pdb) &lt;br /&gt;
 Output: will produce the xyz and corresponding key files (ttt.xyz and ttt.key):&lt;br /&gt;
&lt;br /&gt;
If you will merge the ligand xyz file with another molecule, &#039;&#039;&#039;make sure you set the suitable range for atom types (an option for pOLTYPE) so that they won&#039;t overlap.&#039;&#039;&#039; See the &amp;quot;Check the results section&amp;quot; on POLTYPE website before using them. Use &amp;quot;analyze.x&amp;quot; to make sure the xyz and key files work correctly: &amp;quot;analyze.x ttt.xyz -k ttt.key ep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== build a solvent box ==&lt;br /&gt;
&lt;br /&gt;
=== arbirary solvent ===&lt;br /&gt;
&lt;br /&gt;
Use xyzedit.x to build a water (or any solvent) box starting from a water monomer (e.g. tinker/test/water.xyz). You can specify many monomers to add and how big the box is. Type xyzedit.x at the command line and you will be asked to enter relevant inputs (or you may type all the parameters in one line).&lt;br /&gt;
&lt;br /&gt;
Make sure edit the key file to add box size and Ewald related keywords (see [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file])&lt;br /&gt;
&lt;br /&gt;
=== prebuilt water box ===&lt;br /&gt;
&lt;br /&gt;
Some prebuilt waterboxs:&amp;amp;nbsp;[http://biomol.bme.utexas.edu/~pren/downloads/waterbox http://biomol.bme.utexas.edu/~pren/downloads/waterbox]&lt;br /&gt;
&lt;br /&gt;
Larger boxes can be created as supercells of smaller boxes, e.g. this following command will create a box 64x larger than the orignial box.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -e &amp;quot;5\n4\n\n&amp;quot; | crystal.x watersmall.xyz -k tinker.key&lt;br /&gt;
== Combining two xyz files ==&lt;br /&gt;
&lt;br /&gt;
Tinker &amp;quot;xyzedit.x&amp;quot; program (option 20) can be used to combine two xyz files into one (matching key file for each xyz is required). You can merge the key or parameter files by appending one to the other, but please make sure the atom types are not overlapping between the two.&lt;br /&gt;
&lt;br /&gt;
For the above 1BTY example, poltype will translate/rotate the ligand in standard orientation. You may need a script to copy the coordinates from ligand.pdb into ttt.xyz (hwich you get out of the POLTYPE run).&lt;br /&gt;
&lt;br /&gt;
Then you can use xyzedit.x to combine 1bty.xyz and lig.xyz into one xyz file with the two molecules orient/position as in PDB. Merge the key file by appending ttt.key (except the first line which contains header already in amoebapro13.prm of 1bty.key) to 1bty.key; again avoid overlapping atom types between the ligand and protein.&lt;br /&gt;
&lt;br /&gt;
== Soaking solute in solvent ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;Tinker &amp;quot;xyzedit.x&amp;quot; is an interactive program (option 20) that can be used for this as well. You just need a molecule.xyz and waterbox.xyz along with matching key files (actual names do not matter).&lt;br /&gt;
&lt;br /&gt;
Some water files (monomers, boxes) are in tinker/example or test folder. One can make a water box of different size using this program too (starting from one water or a cluster of water and use option 19). Option 21 can add ions to solvent box. To distiguish between AMOEBA or fixed charged FF simulation files, check the key file to see which prm file it is pointing to.&lt;br /&gt;
&lt;br /&gt;
Or you can use this utility: [http://www.ime.unicamp.br/~martinez/packmol/home.shtml http://www.ime.unicamp.br/~martinez/packmol/home.shtml]&lt;br /&gt;
&lt;br /&gt;
On renlab cluster, there is &amp;quot;packmol&amp;quot; installed at /home/liuchw/Softwares/packmol-20.14.4/packmol&lt;br /&gt;
&lt;br /&gt;
Two examples for generating a cubic box:&lt;br /&gt;
&lt;br /&gt;
example 1: generate a pure liquid box, using water as an example. In the real cases, one could calculate the number of molecules and the length of the cube according to desired density. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output water-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;example 2: soak a MeOH molecule into the above box. We first let MeOH be in the center of the box with coordinates (9,9,9), and then soak with water in 18.6 A cubic box. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output liquid-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure MeOH.xyz&lt;br /&gt;
number 1&lt;br /&gt;
center&lt;br /&gt;
fixed 9.0 9.0 9.0 0.0 0.0 0.0&lt;br /&gt;
end structure&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the above two examples, all one needs are the &amp;quot;Wat.xyz&amp;quot; and &amp;quot;MeOH.xyz&amp;quot; files. After the box is generated, it is straightforward to use Tinker to minimize the structure. &lt;br /&gt;
&lt;br /&gt;
After construct the simulations, relax the system using minimize and dynamics (restraint the solute first), with proper restraints and heating. See [[Tutorial:tinkertut#MD_setup-initial_equilibration|MD setup]] for details&lt;br /&gt;
&lt;br /&gt;
== Check your xyz/key files and common errors ==&lt;br /&gt;
&lt;br /&gt;
Once you have a pair of xyz and key (and prm file the key uses one), you can use &amp;quot;analyze&amp;quot; to do some basic check. The CPU version &amp;quot;analyze&amp;quot; has many more options.&lt;br /&gt;
&lt;br /&gt;
analyze xxx.xyz -k xxx.key e&amp;quot; will print energy and its components.&lt;br /&gt;
&lt;br /&gt;
 If there are any error related to missing parameters, you need to fix them. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key em&amp;quot; prints total charge and dipole moments etc.&lt;br /&gt;
&lt;br /&gt;
 The total charge should match your expectation (0, -1, +1) etc&lt;br /&gt;
 If this is a box of solute in water, you should add neutralizing ions (K+ or Cl-) and then &amp;quot;additional&amp;quot; 0.1 mM KCl. So the next charge should be 0!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key ep&amp;quot; prints all parameters&lt;br /&gt;
&lt;br /&gt;
 Check if every atom has a multipole (number of multipole matches no of atoms) &lt;br /&gt;
 check if every atom has vdw (if an atom has 0.000 0.000 for vdw R and eps, that means the vdw parameters are missing; need to add) &lt;br /&gt;
 check polarization groups are making sense. If you see every atom is its own group, this is likely wrong. Typically we keep each function group (e.g. benzyl) as one group. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key eL&amp;quot; &lt;br /&gt;
  will print out large interactions, for example large ele or vdw interactions of two atoms that are too close&lt;br /&gt;
analyze with &amp;quot;ED&amp;quot; option (debug) will print out all individual interactions and lot more information. The output&amp;amp;nbsp;is of course huge if you do this to a large bix, but you can use &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;vdwterm only, bondterm only, angleterm only. multipoleterm only, polarizeterm only, etc&amp;lt;/span&amp;gt;&#039;&#039;&#039; to check a specific energy component. Or use &#039;&#039;&#039;bondterm none, angleterm none&#039;&#039;&#039;....ect to turn off some interactions you don&#039;t want to check. A full list of xxxTERM can be found in &amp;lt;span style=&amp;quot;color:#2980b9;&amp;quot;&amp;gt;&#039;&#039;&#039;tinker/source/prmkey.f&#039;&#039;&#039;&amp;lt;/span&amp;gt;(grep TERM).&lt;br /&gt;
=== Induced dipole not converging error ===&lt;br /&gt;
&lt;br /&gt;
If analyze give you error related to induced dipole not converging, the structure is bad. If you see &amp;quot;induced dipole not converging&amp;quot; error in the beginning of your MD, it is also due to bad structures (atoms too close). The structure needs refinement, or missing parameters above. To refine the structure&lt;br /&gt;
&lt;br /&gt;
1. minimize the structure. you can turn off polarization (polarizeterm none) or even permanent ele completely (multipoleterm none &amp;amp; polarizeterm none) first to minimize using vdw to move close atoms apart. Then turn on multipole and then induce back&lt;br /&gt;
&lt;br /&gt;
2 For MD simulations of protein/RNA/DNA in water, run MD first at low T with pro/rna/dna &amp;quot;heavy atoms&amp;quot; restrained (e.g. restrain-position -1 1000 5.0 or restrain-position 2 , , , 1.0) to let water &amp;amp; counter ions to relax for few ns. Then gradually heat up and remove the restraints. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#d35400;&amp;quot;&amp;gt;Note &amp;quot;restrain-position -1 1000 0.0&amp;quot; or &amp;quot;restrain-position 2 , , , 0.0&amp;quot; DOESN&#039;T mean 0 restraint (k=0.0) on atoms 1 to 1000 or atom 2!!!&amp;amp;nbsp; &amp;quot;0.0&amp;quot; is replaced by 100.0 in tinker by default.&amp;lt;/span&amp;gt;&#039;&#039;&#039; If you don&#039;t want restraint, comment out/remove these lines.&lt;br /&gt;
&lt;br /&gt;
3. But if you see this error randomly over few hundreds of ps, which may happen for tough systems of large/many charges e.g DNA/RNA, you can add &amp;quot;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;&#039;&#039;&#039;USOLVE-CUTOFF 0.0&#039;&#039;&#039;&amp;lt;/span&amp;gt;&amp;quot; option to key. This will change the precondition behavior and make induced dipole solver more stable. It is not used by default because for &amp;quot;easy&amp;quot; systems like boxes of water, this makes MD little slower (more iterations to converge induced dipoles). If still have stability issue you may further add &amp;quot;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e67e22;&amp;quot;&amp;gt;USOLVE-DIAG xx&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;quot; where xx is 2.0 by default and a smaller number towards 1 (e.g. 1.5) will make more stable but slightly slower.&lt;br /&gt;
&lt;br /&gt;
4. If system is rather big,&amp;amp;nbsp;use &amp;quot;polar-eps 0.1&amp;quot; or 0.01 during system setup and 0.01 (0.001) for production.&lt;br /&gt;
&lt;br /&gt;
== Modified PRO &amp;amp; NA residues ==&lt;br /&gt;
&lt;br /&gt;
=== Build a structure with modified residues ===&lt;br /&gt;
&lt;br /&gt;
Modify residues in a PDB file.&lt;br /&gt;
&lt;br /&gt;
Input: PDB files of the biopolymer, an original residue and a modified residue. The original residue must be present in the biopolymer, and the modified residue must share at least 3 atoms with the original residue with identical coordinates. The modified residue is usually obtained by manually modifying the original residue.&lt;br /&gt;
&lt;br /&gt;
Output: A PDB file with specified residues modified to the new residue. [https://biomol.bme.utexas.edu/~zj2244/tutorial/modeling/modres/modified_pdb/ link]&lt;br /&gt;
&lt;br /&gt;
 # change residues 2 and 14 in dna15.pdb from res_A to res_pA&lt;br /&gt;
 morphling.py -i dna15.pdb -o pdna15.pdb -t0 res_A.pdb -t1 res_pA.pdb -n 2,14&lt;br /&gt;
&lt;br /&gt;
=== Convert pdb to xyz ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/zjing7/modified-na link]&lt;br /&gt;
&lt;br /&gt;
= More on running Tinker and tinker9 (GPU) =&lt;br /&gt;
==Manual==&lt;br /&gt;
https://tinkerdoc.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
== Compiling &amp;amp; running: ==&lt;br /&gt;
[[Software:tinkergpu]] &lt;br /&gt;
&lt;br /&gt;
== Command line ==&lt;br /&gt;
&lt;br /&gt;
Tinker programs can be run interactively, which is the best way to learn what are the required inputs. Tinker programs can also run in background with all parameters specified, for the purpose of automation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;analyze.x ttt.xyz -k ttt.key ep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;dynamic.x bench7 100000 3.0 6.0 2 298.0 N &amp;gt; ben7.log &amp;amp;&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;# the bench7.xyz above can be found in tinker official distribution inside tinker/bench/&#039;&#039;&lt;br /&gt;
 #2-fs time step for MD here is ok because of the &amp;quot;integrator respa&amp;quot; in the key file&lt;br /&gt;
&lt;br /&gt;
Or for tinker9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #source /home/liuchw/.bashrc.tinker9&lt;br /&gt;
 #export TINKER9=/home/pren/tinker9/tinker9_sugar/build/&lt;br /&gt;
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib/&lt;br /&gt;
 export CUDA_DEVICE_ORDER=PCI_BUS_ID&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0 # device number; can use 1 or 2 if there are multiple GPU cards&lt;br /&gt;
 $TINKER9/tinker9 dynamic bench7.xyz -k bench7.key 5000 2.0 1000.0 4 298.15 1.0 N &amp;gt; out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Pause and resume MD ==&lt;br /&gt;
&lt;br /&gt;
Tinker creates .dyn file that contains coordinates and velocities needed for restart MD. To stop MD, simply create a .end file (e.g. touch myrun.end) in the folder where MD is running. At the next time MD frame was written, the end file will signal Tinker to stop. To resume later simply rerun dynamics with the presence of the .dyn file. Note the output file of dynamics does not resume the count of MD steps/frames.&lt;br /&gt;
&lt;br /&gt;
== Additional notes for &amp;quot;tinker-openmm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
*It s recommended to use the respa inetgrator and 2-fs time step &lt;br /&gt;
*&amp;quot;heavy-hydrogen&amp;quot; in key file allows a 3-fs time step (not reommended) &lt;br /&gt;
*Bussi thermostat &lt;br /&gt;
*Only MC barostat is available for now. We are adding virial/Langevin piston pressure to openmm.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to specify different ensembles for MD simulation =&lt;br /&gt;
&lt;br /&gt;
== For TINKER-openmm ==&lt;br /&gt;
&#039;&#039;&#039;Tinker-Openmm is no longer supported since 2021. Use tinker9 for GPU MD (see [[Software:tinkergpu|Tinker GPU]])&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not many options available.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
For NVT, use Bussi for thermostat, RESPA integrator (2fs)&lt;br /&gt;
&lt;br /&gt;
For NPT, use Montecarlo for Barostat, Bussi thermostat. Verlet (1 fs) is safer than RESPA for use with MC barostat if very accurate density is needed.&lt;br /&gt;
&lt;br /&gt;
See below for keyword syntax.&lt;br /&gt;
&lt;br /&gt;
== Available thermostat and barostat in TINKER (2021) ==&lt;br /&gt;
&lt;br /&gt;
Thermostats:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD (lines you add to .key file)&lt;br /&gt;
 Bussi-Parrinello           thermostat bussi&lt;br /&gt;
 Berendsen                  thermostat berendsen&lt;br /&gt;
 Andersen Stochastic        thermostat andersen&lt;br /&gt;
 Nose-Hoover                thermostat nose-hoover&lt;br /&gt;
&lt;br /&gt;
There are 3 barostats available via the “barostat” keyword:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Berendsen                  barostat berendsen&lt;br /&gt;
 Monte-Carlo                barostat montecarlo&lt;br /&gt;
 Lagevin                    Barostat Langevin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above thermostat and barostats are available for the Verlet, Beeman and RESPA integrators, and can be used in combination with those integrators. These integrators are available via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Verlet                     integrator verlet&lt;br /&gt;
 Beeman                     integrator beeman (tinker 8 CPU only)&lt;br /&gt;
 RESPA                      integrator respa&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;&#039;defaults&#039;&#039;&#039; are Bussi for thermostat, Berendsen for barostat, and Beeman for integrator.&lt;br /&gt;
&lt;br /&gt;
Then there are two special integrators, a stochastic one, and a Nose-Hoover that does NPT. The stochastic integrator uses a kind of Langevin temperature bath for thermostating, and does listen to the barostat keyword. The Nose-Hoover integrator uses a separate code branch and does only NPT with Nose-Hoover methods following Martyna-Tuckerman-Klein. You can get these via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                      KEYWORD&lt;br /&gt;
 Stochastic                   integrator stochastic (no need for other T control)&lt;br /&gt;
 Nose-Hoover NPT             integrator nose-hoover (no need other keywords for T or P; starting structures need to reasonable)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Recommended NVT and NPT combinations ==&lt;br /&gt;
&lt;br /&gt;
NVT keywords combination in the key file (2fs time step)&lt;br /&gt;
&lt;br /&gt;
 thermostat bussi &lt;br /&gt;
 integrator RESPA&lt;br /&gt;
&lt;br /&gt;
Preferred/Recommended NPT (2fs, relative isotropic and homogenous systems)&lt;br /&gt;
&lt;br /&gt;
 archive (&#039;&#039;&#039;dcd-archive&#039;&#039;&#039; to produce compressed traj for large systems; need .xyz or .pdb to render in VMD)&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
 barostat MonteCarlo&lt;br /&gt;
 integrator RESPA&lt;br /&gt;
 vdw-cutoff 9 (12 for amoeba)&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 9.0 (7.0 for amoeba)&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001 (only for amoeba)&lt;br /&gt;
 polar-predict (only for amoeba)&lt;br /&gt;
&lt;br /&gt;
Recommended NPT for &#039;&#039;&#039;anisotropic systems&#039;&#039;&#039; such as membrane, or large local volume fluctuation in protein folding. Slower than above for virial calculations)&lt;br /&gt;
&lt;br /&gt;
Documentation: https://tinkerdoc.readthedocs.io/en/latest/text/feature/integrator-langevin-piston.html#implementation-2 &lt;br /&gt;
Semi-isotropic pressure control not finished yet&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;barostat langevin&#039;&#039;&#039; # for GPU&lt;br /&gt;
 &#039;&#039;&#039;semiiso-pressure&#039;&#039;&#039; (if using tinker-GPU from 2025)&lt;br /&gt;
 &#039;&#039;&#039;pressure  SEMIISO (or &amp;quot;PRESSURE SEMI&amp;quot; if using tinker-GPU from 2026&#039;&#039;&#039; #PRESSURE [ISOTROPIC / SEMI-ISOTROPIC / ANISOTROPIC ] &lt;br /&gt;
 #barostat Langevin&lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA   #or Verlet/1 fs; T control not needed&lt;br /&gt;
 a-axis 40 #change this to your actual box size; b or c can be different from a&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001&lt;br /&gt;
 polar-predict&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Alternative NPT (1fs, built in P and T control)&lt;br /&gt;
&lt;br /&gt;
 integrator nose-hoover&lt;br /&gt;
&lt;br /&gt;
== Recommended keywords (add somewhere in the .key file) for NVT ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 2 298  (100000 steps, 2.0 fs time step, dump structure every 1.0 ps, option 2 is NVT, 298 is the target T)&lt;br /&gt;
&lt;br /&gt;
It is also possible to combine &amp;quot;&#039;&#039;&#039;integrator Beeman&#039;&#039;&#039;&amp;quot; or &#039;&#039;&#039;&amp;quot;thermostat Berendsen”&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;thermostat Andersen&amp;quot;&#039;&#039;&#039;. But RESPA allows large time steps (2.0 or 2.5 fs) than Beeman. Berendsen thermostat does not provide canonical ensemble fluctuation.&lt;br /&gt;
&lt;br /&gt;
== NVE ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 1&lt;br /&gt;
&lt;br /&gt;
No need for thermostat or barostat of course. It is best to use smaller time step such as 1.0fs to conserve energy better. May even use smaller polar-eps (10^-6) than default (10^-5) in the key file.&lt;br /&gt;
&lt;br /&gt;
== Non periodic system, e.g. gas molecules not in a box ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;_&amp;quot; style=&amp;quot;background:#eee; border:1px solid #ccc; padding:5px 10px&amp;quot;&amp;gt;integrate stochastic&amp;lt;/div&amp;gt; &lt;br /&gt;
If there is no box (a-axis) in the key file, or no box dimensions in the den file, the system is non-periodic. This will set the stochastic temperature control along with the stochastic MD integration. &#039;&#039;&#039;For gas phase molecular cluster (very few atoms), the recommended time step is 0.1 fs&#039;&#039;&#039;.&lt;br /&gt;
= Free energy calculations =&lt;br /&gt;
&lt;br /&gt;
Theory about free energy calculation: http://alchemistry.org/wiki/Bennett_Acceptance_Ratio&lt;br /&gt;
&lt;br /&gt;
About AMOEBA softcore and BAR, read our book chapter: &lt;br /&gt;
&lt;br /&gt;
[[File:PL_BAR_softcore.pdf|page=3|300px]]&lt;br /&gt;
&lt;br /&gt;
== MD setup-initial equilibration ==&lt;br /&gt;
&lt;br /&gt;
Determine protonation state of ionizable groups (ASP, GLU, LYS, ARG, HIS). Use propka here&amp;amp;nbsp;[http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&amp;amp;nbsp;for proteins. For ligand, you may use pka predicction tool&amp;amp;nbsp;from Chemaxon. &lt;br /&gt;
*Add water and counter ions (neutralize system) so that the density is ~1.0 g/cc. The distance between protein and box wall should be&amp;amp;nbsp;10-15 A. Check/remove extra water in the binding pocket as necessary (keep the crystal water molecules in the pocket) &lt;br /&gt;
*In the key file, set&amp;amp;nbsp;PME-grid&amp;amp;nbsp;to be&amp;amp;nbsp;1.2x&amp;amp;nbsp;box size in Ang. For example, if box size is 55, “pme-grid&amp;amp;nbsp;64 64 64” is enough. The default of Tinker is usually more conservative. See kewald.f for allowed grid values. Add &#039;&#039;&#039;“neighbor-list”, “polar-eps 0.01”, “vdw-cutoff&amp;amp;nbsp;12”, &amp;quot;vdw-correction&amp;quot; “integrator respa”, “ewald”, “ewald-cutoff 7.0” &#039;&#039;&#039;&amp;amp;nbsp;to .key file. You can even turn off polarization initially (polarizeterm NONE) during EQ and add it back (&#039;&#039;&#039;polar-eps 0.001&#039;&#039;&#039; or tighter for production) &lt;br /&gt;
*Minimize the box before MD. If you see errors related to polarization (induced dipole not converge), do this in two steps: first minimize with electrostatic (multipoleterm NONE) and polarization turned off (polarizeterm NONE in .key file), to ~5.0 or lower; then minimize again with ele then ele+polarization back on to ~2.0 or lower. You may use position-restraints&amp;amp;nbsp;&#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; if you don&#039;t want your solute to undergo dramtic changes. (RESTRAIN-POSITION -1 200 50.0, means restrain atoms 1 to 200 using a force constant of K=50 kcal/mol).&amp;amp;nbsp; &lt;br /&gt;
*MD relaxation. You may use GPU for MD now (dynamic_omm.x).&amp;amp;nbsp;Use repsa integrator and 2fs time step.&amp;amp;nbsp;Add&amp;amp;nbsp;&#039;&#039;&#039;position-restraints&#039;&#039;&#039; to restrain protein &amp;amp; ligands &#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; in the key file&amp;amp;nbsp;initially; For metal ion-protein binding or weak binding ligand,&amp;amp;nbsp;we&amp;amp;nbsp;also suggest to use ~3 distance restraints between ion/ligand and first shell atoms. This is to prevent water disrupt the initial solute structure during the equilibration.&amp;amp;nbsp; &lt;br /&gt;
**Use 2 fs for all MD below.&amp;amp;nbsp;If you want to use 3fs (e.g. for large systems),&amp;amp;nbsp;you need to&amp;amp;nbsp;&amp;quot;heavy-hydrogen&amp;quot; in the key file.&amp;amp;nbsp;Another way to speed up is to use the OPTx: &amp;quot;polarization OPT4&amp;quot; or &amp;quot;polarization OPT3&amp;quot; OPT3 is faster but bigger error.&lt;br /&gt;
**Use &amp;quot;polar-eps 0.01&amp;quot; and &amp;quot;polar-predict&amp;quot; for equilibration for speed. For production use &amp;quot;polar-eps 0.001&amp;quot; or &amp;quot;0.0001&amp;quot;.&lt;br /&gt;
**use &amp;quot;neighbor-list&amp;quot;&lt;br /&gt;
**With the positional/distance restraints, run ~2ns&amp;amp;nbsp; NVT MD to gradually (e.g. exponentially) heat up the system from 10K&amp;amp;nbsp; to 298K or whatever expt T should be. Water/ions are relaxed after this step.&lt;br /&gt;
**Run NVT at 298K or expt T for ~2ns &#039;&#039;&#039;while gradually turning off all the position and distance restraints on protein-ligands.&#039;&#039;&#039; &lt;br /&gt;
**Run 1-2 ns NPT. Add/use &#039;&#039;&#039;&amp;quot;barostat MonteCarlo&amp;quot; in key.&#039;&#039;&#039;&lt;br /&gt;
**Check protein RMSD (esp. around binding pocket) from crystal structure after every step above. If any step gives large RMSD, redo that (and previous step) with longer/slower MD to correct the problems.   &lt;br /&gt;
*MD production run. For alchemical free energy, this involves setting the ligand group and various lambda values for ele and vdw to scale the interactions between ligand and surrounding (see below BAR section). &lt;br /&gt;
**use 2 fs with RESPA&lt;br /&gt;
**polar-eps 0.001 &lt;br /&gt;
**polar-predict&lt;br /&gt;
**neighbor-list&lt;br /&gt;
**&#039;&#039;&#039;barostat MonteCarlo&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Hydration or binding using BAR ==&lt;br /&gt;
&lt;br /&gt;
Alchemical free energy calculations are available in TINKER, Tinker9 GPU (TINKER-OpenMM no longer supported). One needs to specify the ligand or solute using the group keyword&amp;amp;nbsp;in the key file (example below). The lambda scaling schedule can be specified by user, automated by the &amp;quot;bar.x&amp;quot; in TINKER. For each set of lambda value (scaling the interaction betweem ligand and enviroemnt and inside ligand), one needs to perform one MD simulation. The bar.x is then used to analyze the dG between neighboring steps i and j, using the arc files from MD simulation i and j. The total free energy is then sum of 1-2, 2-3, ...N-1 and N.&amp;amp;nbsp;See this reference for examples: &#039;&#039;J Comput Chem. 2017 Sep 5;38(23):2047-2055&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note &#039;&#039;&#039;GPU MD and bar code&#039;&#039;&#039;&amp;amp;nbsp;is much faster than the CPU one&amp;amp;nbsp;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running BAR code in Tinker==&lt;br /&gt;
To compute free energy between two states (i and j), the bar.x (CPU or GPU) will need two trajectories (and two key files of course) of the same simulation length (frames). the two states can be neighboring lambda states in HFE or binding. &lt;br /&gt;
&lt;br /&gt;
See above (and PNAS 2008 paper) for BAR equations.&lt;br /&gt;
&lt;br /&gt;
Step 1 (bar option 1) is to generate two files, each contain the energy of its own state and perturbed energy (Eii, Eij). The second energy is using arc i and key of state j (bar will do this for you).&lt;br /&gt;
&lt;br /&gt;
 tinker9 bar 1 arc1 300 arc2 300 N &amp;gt; barfile &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;tinker 9 bar&amp;quot; is for GPU. You can replace with CPU version bar.x (slower). the arc1 and arc2 can be in different folders with their matching key files.&lt;br /&gt;
&lt;br /&gt;
Example barfile produced from this step: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.bar.&lt;br /&gt;
&lt;br /&gt;
The output below shows 500 frame used, 300K, for frame 1, energy of Eii, Eij and volume of the system (since we can do NPT where volume changes)&lt;br /&gt;
  500    300.00  comments&lt;br /&gt;
       1          -6396.8707        -6396.7580        27379.1152&lt;br /&gt;
&lt;br /&gt;
The second section of this same file will have Ejj, Eji, volume&lt;br /&gt;
&lt;br /&gt;
Step  2 (bar option 2) &lt;br /&gt;
Use the barfile produced from above to compute dG , dH and dS&lt;br /&gt;
 tinker9 bar 2 {barfile} {startsnapshot} {totalsnapshot} 1 {startsnapshot} {totalsnapshot} 1 &amp;gt; {enefile}&lt;br /&gt;
Note this step is much faster since it uses energy from above. You can also set to use a subset of the total frames, e.g. to exam how the dG converge with longer simulaitons.&lt;br /&gt;
Example out: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.ene&lt;br /&gt;
&lt;br /&gt;
== HFE ==&lt;br /&gt;
&lt;br /&gt;
Common keywords for hydration free energy calculation (suggest NPT with MC barostat or Langevin piston barostat)&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 a-axis 40&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 barostat Monte Carlo   #NPT. Use Langevin NPT if care e.g. membrane &lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA # 2-fs time step for solution; 1 for gas&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #openmp-threads    16 #this is for CPU&lt;br /&gt;
 Vdw-annihilation      #this is to help sampling conformation at low lambda by removing intrmol vdw interactions; not needed for rigid solute.&lt;br /&gt;
&lt;br /&gt;
The ele and vdw schedules are found in our previous paper. Also recommended as below. Note you can add or remove steps based dG results and error bars.&lt;br /&gt;
&lt;br /&gt;
Run NPT for each lambda below. 2-5 ns for each lambda typically depending how complex your system (eg, 2ns is sufficient for K+ in water but a large ligand mayneed 5ns). Use BAR-NPT to analyze free energy between neighboring lambda (ignore first 200 ps). The toal FE is the sum of each step. You can check cumulative free energy convergence as a function of simulation time. Add more MD if needed.&lt;br /&gt;
&lt;br /&gt;
Repeat the set of simulations for ligand in solution and ligand itself in gas phase (not necessary if gas energy is 0 like single ion). The gas phase part should use the matching keywords as above (but no a-axis, Ewald, and time step for constant T MD is 0.1fs).&lt;br /&gt;
&lt;br /&gt;
Typical lambda schedule:&lt;br /&gt;
&lt;br /&gt;
 Ele L	Vdw L&lt;br /&gt;
 0	0&lt;br /&gt;
 0	0.4&lt;br /&gt;
 0	0.5&lt;br /&gt;
 0	0.525&lt;br /&gt;
 0	0.55&lt;br /&gt;
 0	0.575&lt;br /&gt;
 0	0.6&lt;br /&gt;
 0	0.625&lt;br /&gt;
 0	0.65&lt;br /&gt;
 0	0.675&lt;br /&gt;
 0	0.7&lt;br /&gt;
 0	0.725&lt;br /&gt;
 0	0.75&lt;br /&gt;
 0	0.775&lt;br /&gt;
 0	0.8&lt;br /&gt;
 0	0.9&lt;br /&gt;
 0	1&lt;br /&gt;
 0.1	1&lt;br /&gt;
 0.2	1&lt;br /&gt;
 0.3	1&lt;br /&gt;
 0.4	1&lt;br /&gt;
 0.5	1&lt;br /&gt;
 0.6	1&lt;br /&gt;
 0.7	1&lt;br /&gt;
 0.8	1&lt;br /&gt;
 0.9	1&lt;br /&gt;
  1     1&lt;br /&gt;
&lt;br /&gt;
== binding free energy ==&lt;br /&gt;
&lt;br /&gt;
For host-guest binding, the simulation process similiar to above but involve two sets: one is host-guest-water, and the other guest-water. In both cases, guest is the ligand that is being scaled. For host-guest-water, one also applies&amp;amp;nbsp;a bond restraint between host and guest. This restraint can be turned off in one or two steps for lambda=1 but should be kept when L&amp;lt;1.&lt;br /&gt;
&lt;br /&gt;
 One way is to set the restraint K=0 when Lele, Lvdw=1, then K=90% when Lele=0.9/Lvdw=1, then K=100% when Lele=80%/Lvdw=1..... K=100% for all rest of L including L=0. &lt;br /&gt;
 The goal is for L=1 (host-guest full interaction), there is no restraint. when L=0, restraint is at 100%. The L=0 state seems &amp;quot;incorrect&amp;quot; due to the restraint but can be corrected (below).&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;bond&amp;quot; is between group of guest/ligand and group of host atoms. It is best to minimize the distance between the centers of the two groups (for sampling).  For example, if you are simulating an ion binding to a spherical cavity like CPP, you can pick 3 atoms on the host whose center is roughly the center of the ion; the restraint will be between the ion and this group. A correction is needed to &amp;quot;remove&amp;quot; the effect of this restraint and standard volume that goes into the final binding free energy.&#039;&#039;&#039;Tinker/utiity/freefix.f&#039;&#039;&#039; can be used to calculate the correction. Note this correction is typically positive (make binding energy less negative) since restraint leads to overestimation of binding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*The correction for lambda=0 from RTln(C0*V), where C0=1/1660 A^3 and V=integrate{4*pi*r^2*exp[-k*(r-r0)^2/RT]dr}. k=15 kcal/mol in the example below. If you are using a harmonic restraint (example below) and the equilibrium r0 is not 0, numerical integration is necessary. A good reference is JACS v126, NO. 24, 2004.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brandon setup script can also set up protein-lig distance restraint now. Basically select a central heavy atom on ligand (or a function group) and another group of nearby 3-4 Ca from protein.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Francis wrote a program to pick restraints based on Boresch paper. It can include additional angle and torsion restraints. However we found it is best to just use the simple distance restraints. The additional restraints may introduce bias towards ligand or host dynamics if not picked carefully.&amp;lt;/pre&amp;gt; [[Tinkergpu:get_rot_rest]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use distance restraint when lambda =1 for both ele and vdw, you can remove the effect of restraint from FEP or BAR; or you can avoid this correction if the restraint strength is set to 0 when the lambda =1 (gradually turned on when lambda-&amp;gt; 0 for both vdw and ele).&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 GROUP 1 -1 3 //ligand group&lt;br /&gt;
 GROUP 2 100, 102, 138 //protein group&lt;br /&gt;
 RESTRAIN-GROUPS  1  2  15.0  2.0 2.0&lt;br /&gt;
 Vdw-annihilation&lt;br /&gt;
 #lower bound &amp;amp; upper bound (2.0, 2.0) do not have to be the same. 15 is the force constant.&lt;br /&gt;
&lt;br /&gt;
Each set of lambda corresponds to one separate MD simulations of 5-10ns or longer. Save MD frames at every 3-5 ps. Use bar.x (bar_omm.x for GPU) to analyze the free energy dG between the neighboring lambda values.&lt;br /&gt;
&lt;br /&gt;
Unlike HFE, no need for gas-phase simulation since the end states of the ligand-water vs. ligand-protein cancels.&lt;br /&gt;
&lt;br /&gt;
Some scripts fron CW:&amp;amp;nbsp;[https://github.com/leucinw/ComputTools/tree/master/bardemo https://github.com/leucinw/ComputTools/tree/master/bardemo]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==ion HFE steps==&lt;br /&gt;
To compute ion hydration FE, &lt;br /&gt;
* prepare ion.xyz and waterbox.xyz. One key file containing all parameters (amoeba09.prm has ion and bunch of ions). If you have a new ion, add its parameters including multipoles, polarizability/damping, vdw &lt;br /&gt;
* water box should be ~50 A. A list of prebuilt water box (you many need to change atom types in xyz if you are using different key) https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#prebuilt_water_box &lt;br /&gt;
* use xyzedit to soak ion in water (see tutorial above about building and combining xyz)&lt;br /&gt;
* Run NPT for ~1ns to relax. See tutorial on this page about dynamics on GPU NPT keywords (using Langevin or MonteCarlo)&lt;br /&gt;
* Take the last relaxed structure to create inputs for HFE. Best to create a series of folders, one for each lambda with inputs and run scripts. See here for lambda schedule https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#HFE&lt;br /&gt;
* Get a list of nodes from Google spreadsheet of lab cluster. Ask for it if you can&#039;t find ~10 GPU nodes.&lt;br /&gt;
* each MD for ~2ns (add more if needed)&lt;br /&gt;
* Use a script to send jobs to each node. You can have 2 jobs concurrent on one GPU and rotate your jobs (~50 lambdas) through.&amp;lt;br /&amp;gt;&lt;br /&gt;
== hydration and binding free energy examples ==&lt;br /&gt;
&lt;br /&gt;
*Ethanol solvation free energy [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/01_solvation/Ethanol.zip download] &lt;br /&gt;
*PBP-phosphate binding [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/02_protein_ligand_binding/PBP_PO4.zip download] &lt;br /&gt;
&lt;br /&gt;
Please unzip the files and see README for instructions.&lt;br /&gt;
&lt;br /&gt;
== HFE and binding free energy calc using Brandon&#039;s script ==&lt;br /&gt;
&lt;br /&gt;
Set up from complex PDB and ligand xyz/key (POLTYE):&amp;amp;nbsp;[https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*create conda env according to instructions on the annihilator github page &lt;br /&gt;
*make&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;something like&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;/home/eew947/.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;with your username replacing mine everywhere in it &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;ssh&amp;lt;/code&amp;gt;&amp;amp;nbsp;to node you want to start from &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;source ~/.allpurpose.bashrc&amp;lt;/code&amp;gt; &lt;br /&gt;
*prepare&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;annihilator.ini&amp;lt;/code&amp;gt; &lt;br /&gt;
*if you want to use daemon, you have to add the keyword for it in annihilator *ini and have it already running before starting annihilator &lt;br /&gt;
*start annihilator by&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;nohup yourpathtoannihilatorhere/AMOEBAAnnihilatorModules/amoebaannihilator.py &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== OSRW ==&lt;br /&gt;
&lt;br /&gt;
Only implemented in tinker CPU. GPU version is under development.&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
&lt;br /&gt;
== Force Field Explorer ==&lt;br /&gt;
&lt;br /&gt;
By Mike Schneider and Jay Ponder, [http://dasher.wustl.edu http://dasher.wustl.edu] Can visualize the xyz and arc (MD trajectory) files; create and start TINKER calcualtions&lt;br /&gt;
&lt;br /&gt;
== VMD ==&lt;br /&gt;
&lt;br /&gt;
Choose TINKER format when open a xyz file. Trajectory file (.arc) also works.&lt;br /&gt;
&lt;br /&gt;
== Pymol ==&lt;br /&gt;
&lt;br /&gt;
Sometimes the xyz file can not be displayed correctly&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
[https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials]&lt;br /&gt;
&lt;br /&gt;
Please email me if you have tutorials related to AMOEBA or Tinker you would like to share.&lt;br /&gt;
&lt;br /&gt;
= AMOEBA Force Field Papers: =&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Fundamental theory of AMOEBA multipoles:&#039;&#039;&#039; ===&lt;br /&gt;
[[Tutorial:amm#Molecular Mechanics and Force Fields (AMOEBA, AMOEBA+)]]&lt;br /&gt;
&lt;br /&gt;
===AMEOBA FF:===&lt;br /&gt;
&lt;br /&gt;
#Water model: Ren, P. Y.; Ponder, J. W., Polarizable atomic multipole water model for molecular mechanics simulation. Journal of Physical Chemistry B &#039;&#039;&#039;2003&#039;&#039;&#039;, 107 (24), 5933-5947. &lt;br /&gt;
#Small molecules: Ren, P.; Wu, C.; Ponder, J. W., Polarizable Atomic Multipole-based Molecular Mechanics for Organic Molecules. J Chem Theory Comput &#039;&#039;&#039;2011&#039;&#039;&#039;, 7 (10), 3143-3161. &lt;br /&gt;
#Proteins: Shi, Y.; Xia, Z.; Zhang, J.; Best, R.; Wu, C.; Ponder, J. W.; Ren, P., The Polarizable Atomic Multipole-based AMOEBA Force Field for Proteins. J Chem Theory Comput &#039;&#039;&#039;2013&#039;&#039;&#039;, 9 (9), 4046-4063. &lt;br /&gt;
#DMP/TMP/Base &amp;amp; nucleic acids:&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
*Zhang, C.; Lu, C.; Wang, Q.; Ponder, J. W.; Ren, P., Polarizable Multipole-Based Force Field for Dimethyl and Trimethyl Phosphate. J Chem Theory Comput 2015, 11 (11), 5326-39. &lt;br /&gt;
*Zhang, C.; Bell, D.; Harger, M.; Ren, P., Polarizable Multipole-Based Force Field for Aromatic Molecules and Nucleobases. J Chem Theory Comput 2017, 13 (2), 666-678. &lt;br /&gt;
*Zhang, C.; Lu, C.; Jing, Z.; Wu, C.; Piquemal, J. P.; Ponder, J. W.; Ren, P., AMOEBA Polarizable Atomic Multipole Force Field for Nucleic Acids. J Chem Theory Comput 2018, 14 (4), 2084-2108. &lt;br /&gt;
&lt;br /&gt;
===AMOEBA+ model (water published, small and biomolecules in progress)===&lt;br /&gt;
&lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., AMOEBA+ Classical Potential for Modeling Molecular Interactions. J Chem Theory Comput 2019. &lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., Implementation of Geometry-Dependent Charge Flux into the Polarizable AMOEBA+ Potential. J Phys Chem Lett 2019, 11, 419-426.&lt;br /&gt;
&lt;br /&gt;
===AMOEBA+NN model: incorporating Neural Networks===&lt;br /&gt;
&lt;br /&gt;
Wang, Y., et al. (2024). &amp;quot;Incorporating Neural Networks into the AMOEBA Polarizable Force Field.&amp;quot; The Journal of Physical Chemistry B 128(10): 2381-2388.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Tinker Key File for AMOEBA+ Condensed Phase Simulations ===&lt;br /&gt;
 EWALD&lt;br /&gt;
 EWALD-CUTOFF      9.0 # for real space Ewald and charge penetration&lt;br /&gt;
 &lt;br /&gt;
 NEIGHBOR-LIST&lt;br /&gt;
 &lt;br /&gt;
 VDW-CUTOFF        12.0 # for vdw term&lt;br /&gt;
 CHGTRN-CUTOFF     12.0 # for charge transfer term&lt;br /&gt;
 VDW-CORRECTION&lt;br /&gt;
 &lt;br /&gt;
 INTEGRATOR  RESPA&lt;br /&gt;
 THERMOSTAT  BUSSI&lt;br /&gt;
 BAROSTAT    MONTECARLO&lt;br /&gt;
 &lt;br /&gt;
 POLAR-PREDICT&lt;br /&gt;
 POLAR-EPS 0.00001&lt;br /&gt;
&lt;br /&gt;
==Lectures on Force Field, AMOEBA, AMOEBA+==&lt;br /&gt;
Under &#039;&#039;&#039;Adv Mol Modeling&#039;&#039;&#039; menu:&lt;br /&gt;
 [[Tutorial:amm#Molecular_Mechanics_and_Force_Fields_(AMOEBA,_AMOEBA+) | Link]]&lt;br /&gt;
&lt;br /&gt;
= More Explicit Free Energy Calc Steps - Brandon Walker =&lt;br /&gt;
&lt;br /&gt;
Old/obsolete description here: [[Tinker-tut:free_eng_Bbdw|Obsolete description here]]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2176</id>
		<title>Tutorial:kturn tut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:kturn_tut&amp;diff=2176"/>
		<updated>2026-04-22T16:35:44Z</updated>

		<summary type="html">&lt;p&gt;Brendan: Page created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Purpose =&lt;br /&gt;
This page documents the standard protocol for preparing and running molecular dynamics (MD) simulations of RNA k-turn systems (and other similar small biomolecular solutes) using AMOEBA in Tinker9. It takes a starting PDB structure through system preparation, equilibration, and production MD. Umbrella sampling / pulling is &#039;&#039;&#039;not&#039;&#039;&#039; covered here.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
# Obtain a clean starting PDB&lt;br /&gt;
# Standardize the PDB via a &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; round-trip, which also generates the &amp;lt;code&amp;gt;.seq&amp;lt;/code&amp;gt; file&lt;br /&gt;
# Solvate + neutralize + build a key file with Tinker-GUI&lt;br /&gt;
# Energy minimization (&amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Heating: 5 temperatures with strong position restraints on the solute (NVT)&lt;br /&gt;
# Restraint phase-down: gradually relax position restraints at 298 K (NVT)&lt;br /&gt;
# Production: unrestrained NPT MD&lt;br /&gt;
&lt;br /&gt;
Force field: AMOEBA (&amp;lt;code&amp;gt;amoebabio18.prm&amp;lt;/code&amp;gt;). Engine: [https://github.com/TinkerTools/tinker Tinker8] and [https://github.com/TinkerTools/tinker9 Tinker9] (&amp;lt;code&amp;gt;dynamic9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= 1. PDB preparation =&lt;br /&gt;
&lt;br /&gt;
== Source PDB ==&lt;br /&gt;
&lt;br /&gt;
Start from a crystal / cryo-EM structure in PDB format. A good test / example system for this protocol is &#039;&#039;&#039;[https://www.rcsb.org/structure/5FJ0 PDB 5FJ0]&#039;&#039;&#039; — a 27-nt RNA k-turn. Download the file in &#039;&#039;&#039;PDB format&#039;&#039;&#039; (on RCSB: &#039;&#039;Download Files → PDB Format&#039;&#039;); the direct link is [https://files.rcsb.org/download/5FJ0.pdb files.rcsb.org/download/5FJ0.pdb]. The mmCIF format will not work with &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before running anything:&lt;br /&gt;
&lt;br /&gt;
* Decide the protonation states of ionizable residues (for RNA/DNA the standard assumption is deprotonated phosphates; for proteins use PROPKA or similar).&lt;br /&gt;
* Remove or keep heteroatoms intentionally (crystallographic waters, buffer ions, ligands). &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; will silently drop anything it doesn&#039;t recognize.&lt;br /&gt;
* Decide what to do with missing atoms/residues. If the structure is incomplete, fix it externally first (e.g. with PDBFixer) &#039;&#039;&#039;before&#039;&#039;&#039; the steps below.&lt;br /&gt;
&lt;br /&gt;
== pdbxyz → xyzpdb round-trip ==&lt;br /&gt;
&lt;br /&gt;
The goal of this step is to produce a PDB in the exact format that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; will emit from then on, so that any future PDB written from an MD trajectory (for visualization, diffing, or restart) is line-for-line comparable to the starting reference.&lt;br /&gt;
&lt;br /&gt;
 pdbxyz  myfile.pdb  -k tinker.key&lt;br /&gt;
 xyzpdb  myfile.xyz  -k tinker.key&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;tinker.key&amp;lt;/code&amp;gt; points at the AMOEBA parameter file:&lt;br /&gt;
&lt;br /&gt;
 parameters /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pdbxyz outputs two files:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.xyz&amp;lt;/code&amp;gt; — the Tinker-format coordinate file&lt;br /&gt;
* &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; — a sequence / base-pair map of the solute. This file is required whenever &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; is run.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xyzpdb requires the .seq file to share the same prefix as the .xyz&#039;&#039;&#039; — there is no command-line option to point at a specific .seq. If you call &amp;lt;code&amp;gt;xyzpdb myfile.xyz&amp;lt;/code&amp;gt;, Tinker looks for &amp;lt;code&amp;gt;myfile.seq&amp;lt;/code&amp;gt; in the same directory. If you rename or move the .xyz, rename / copy the .seq to match.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output files are not overwritten.&#039;&#039;&#039; Tinker writes to the next available numeric suffix:&lt;br /&gt;
&lt;br /&gt;
 myfile.pdb      (original)&lt;br /&gt;
 myfile.pdb_2    (first xyzpdb output)&lt;br /&gt;
 myfile.pdb_3    (next xyzpdb output)&lt;br /&gt;
 …&lt;br /&gt;
&lt;br /&gt;
Same convention for &amp;lt;code&amp;gt;.xyz_2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.xyz_3&amp;lt;/code&amp;gt;, etc. The &#039;&#039;&#039;canonical&#039;&#039;&#039; PDB for this system is the first xyzpdb output (&amp;lt;code&amp;gt;myfile.pdb_2&amp;lt;/code&amp;gt;). Use that — not the raw crystal PDB — as your reference structure from this point on when comparing to simulation frames.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why do the round-trip:&#039;&#039;&#039;&lt;br /&gt;
* The crystal PDB contains headers (&amp;lt;code&amp;gt;HEADER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SOURCE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMPND&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;REMARK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MASTER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CONECT&amp;lt;/code&amp;gt;…) and metadata that &amp;lt;code&amp;gt;xyzpdb&amp;lt;/code&amp;gt; does not emit.&lt;br /&gt;
* Hydrogens added by &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; get standardized names/ordering.&lt;br /&gt;
* Atom numbering, chain ID handling, and record termination all match the Tinker convention after the round-trip.&lt;br /&gt;
&lt;br /&gt;
Without this step, a diff between the input PDB and a later xyzpdb output is dominated by format noise rather than real coordinate differences.&lt;br /&gt;
&lt;br /&gt;
= 2. Solvation and neutralization (Tinker-GUI) =&lt;br /&gt;
&lt;br /&gt;
System building is handled by &amp;lt;code&amp;gt;cli.py&amp;lt;/code&amp;gt; in [https://github.com/prenlab/Tinker-GUI Tinker-GUI] at &amp;lt;code&amp;gt;/path/to/Tinker-GUI&amp;lt;/code&amp;gt;. The program takes a YAML file and produces a minimization-ready &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;.key&amp;lt;/code&amp;gt; pair, plus intermediate files in &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== config.yaml ==&lt;br /&gt;
&lt;br /&gt;
Example for an RNA k-turn system with neutralizing Mg²⁺/Na⁺/Cl⁻, no added bulk salt, 12 Å buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
tinker_path: /path/to/Tinker8/latest/bin&lt;br /&gt;
amoeba_prm:  /path/to/Tinker8/latest/params/amoebabio18.prm&lt;br /&gt;
output_prefix: minimize&lt;br /&gt;
solutes:&lt;br /&gt;
  nucleic_acid:&lt;br /&gt;
    - myfile.pdb            # use the round-tripped PDB from step 1&lt;br /&gt;
solvent:&lt;br /&gt;
  name: water&lt;br /&gt;
ions:&lt;br /&gt;
  neutralizers:&lt;br /&gt;
    - Mg2+&lt;br /&gt;
    - Na+&lt;br /&gt;
    - Cl-&lt;br /&gt;
  salts:&lt;br /&gt;
    names:&lt;br /&gt;
      - Mg2+&lt;br /&gt;
      - Na+&lt;br /&gt;
      - Cl-&lt;br /&gt;
    concentrations:&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
      - 0.0&lt;br /&gt;
box:&lt;br /&gt;
  type: rectangular          # cubic or rectangular&lt;br /&gt;
  buffer: 12.0               # Å between solute and box wall&lt;br /&gt;
  # size: [60, 60, 60]       # if set, overrides buffer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Key fields:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;output_prefix&amp;lt;/code&amp;gt; — the prefix for the final output files. If set to &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;, Tinker-GUI writes &amp;lt;code&amp;gt;X_final.xyz&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;X_final.key&amp;lt;/code&amp;gt;. In the rest of this page we use &amp;lt;code&amp;gt;minimize&amp;lt;/code&amp;gt;, giving &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;neutralizers&amp;lt;/code&amp;gt; — Tinker-GUI adds whichever of these are needed to zero out the net charge. For RNA (negative backbone) you&#039;ll typically need Mg²⁺ and/or Na⁺.&lt;br /&gt;
* &amp;lt;code&amp;gt;salts.concentrations&amp;lt;/code&amp;gt; — set to 0.0 for pure counter-ion neutralization. Use non-zero values (mol/L) to add bulk salt on top of neutralization.&lt;br /&gt;
* &amp;lt;code&amp;gt;buffer: 12.0&amp;lt;/code&amp;gt; — distance from solute to the nearest box face. 12–15 Å is standard; 15 Å is safer for larger conformational changes.&lt;br /&gt;
&lt;br /&gt;
== Running Tinker-GUI ==&lt;br /&gt;
&lt;br /&gt;
 python /path/to/Tinker-GUI/cli.py -c config.yaml&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outputs:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.xyz&amp;lt;/code&amp;gt; — solvated, neutralized starting structure&lt;br /&gt;
* &amp;lt;code&amp;gt;minimize_final.key&amp;lt;/code&amp;gt; — matching key file with box dimensions and parameter path&lt;br /&gt;
* &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt; — intermediate files (solute-only xyz, water box, per-ion-addition snapshots, logs)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rerunning:&#039;&#039;&#039; if Tinker-GUI errors or you need to change config and re-run, always clear the intermediate directory first:&lt;br /&gt;
&lt;br /&gt;
 rm -rf temp&lt;br /&gt;
&lt;br /&gt;
Otherwise Tinker-GUI may pick up stale intermediates and silently produce a mismatched output. The same applies if you need to rebuild from scratch for any reason — delete &amp;lt;code&amp;gt;temp/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sanity check ==&lt;br /&gt;
&lt;br /&gt;
Before proceeding, verify the system is sensible:&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  em&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Net charge should be 0&#039;&#039;&#039; (within rounding). If it isn&#039;t, see below.&lt;br /&gt;
* Total dipole should be finite (no NaNs).&lt;br /&gt;
&lt;br /&gt;
 analyze  minimize_final.xyz  -k minimize_final.key  ep&lt;br /&gt;
&lt;br /&gt;
* Every atom should have multipole and vdW parameters. Missing parameters on any atom means an unrecognized residue / atom name that &amp;lt;code&amp;gt;pdbxyz&amp;lt;/code&amp;gt; couldn&#039;t map.&lt;br /&gt;
&lt;br /&gt;
=== Fixing a non-zero net charge ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; reports a non-zero net charge, either the neutralizer list in &amp;lt;code&amp;gt;config.yaml&amp;lt;/code&amp;gt; was wrong, or the counts Tinker-GUI added don&#039;t quite cancel the solute charge. Don&#039;t re-run the full pipeline — edit the &amp;lt;code&amp;gt;.xyz&amp;lt;/code&amp;gt; directly. Two operations cover every case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Converting a water to an ion&#039;&#039;&#039; (when net charge is negative and you need another cation):&lt;br /&gt;
# Find a water molecule whose oxygen is far from the solute (e.g. ≥ 5 Å away).&lt;br /&gt;
# Delete both hydrogen lines of that water.&lt;br /&gt;
# Change the oxygen&#039;s atom type (last integer before the connectivity columns) to the desired ion&#039;s AMOEBA type — e.g. for Na⁺ in amoebabio18 the oxygen type (&amp;lt;code&amp;gt;349&amp;lt;/code&amp;gt;) becomes Na⁺ type (&amp;lt;code&amp;gt;352&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Clear the oxygen line&#039;s connectivity entries (an ion has no bonds).&lt;br /&gt;
# Update the atom count on line 1 of the file to match the new total (decrease by 2 for every water → ion conversion).&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber the remaining atom indices&#039;&#039;&#039; — Tinker is tolerant of gaps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deleting an ion&#039;&#039;&#039; (when net charge is positive and you have one more cation than needed):&lt;br /&gt;
# Delete the ion&#039;s atom line.&lt;br /&gt;
# Decrease the atom count on line 1 by 1.&lt;br /&gt;
# &#039;&#039;&#039;Do not renumber&#039;&#039;&#039; — leave the gap in the indices.&lt;br /&gt;
&lt;br /&gt;
After either operation, re-run &amp;lt;code&amp;gt;analyze ... em&amp;lt;/code&amp;gt; to confirm the net charge is now 0. (There&#039;s also a script in &amp;lt;code&amp;gt;~/scripts/&amp;lt;/code&amp;gt; that does the water → Na⁺ replacement in bulk while respecting distance filters — useful when many waters need replacing to reach a target salt concentration.)&lt;br /&gt;
&lt;br /&gt;
= 3. Minimization =&lt;br /&gt;
&lt;br /&gt;
Performed by &amp;lt;code&amp;gt;minimize9&amp;lt;/code&amp;gt; with a gradient tolerance of 0.5 kcal/mol/Å, using a key file that includes a position restraint on the solute:&lt;br /&gt;
&lt;br /&gt;
 RESTRAIN-POSITION  -1  N  50.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = number of atoms in the original PDB&#039;&#039;&#039; (the solute only — the RNA). &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; restrains atoms 1 through N, leaving everything after atom N (added water, neutralizing ions, bulk salt) free to move. The force constant 50.0 is in kcal/mol/Å².&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If the source PDB already contained waters or ions that you kept through pdbxyz&#039;&#039;&#039;, set &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; to just the RNA atom count, not the RNA + original-waters count — otherwise those waters / ions are held in place too (a 1000-atom RNA plus 15 crystal waters gives a pdbxyz .xyz with 1045 atoms, but you should still set &amp;lt;code&amp;gt;N = 1000&amp;lt;/code&amp;gt; so the crystal waters can move).&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 minimize9  minimize_final.xyz  -k minimize.key  0.5&lt;br /&gt;
&lt;br /&gt;
The trailing &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt; is the gradient tolerance (RMS gradient at which minimization stops, kcal/mol/Å). &#039;&#039;&#039;0.5 is a good default&#039;&#039;&#039;; if minimization is unusually slow or grinds without converging, loosen it to e.g. &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt; — larger value = looser convergence = fewer iterations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why a restraint during minimization:&#039;&#039;&#039; without it, small clashes between water/ion placement and the solute can pull the solute geometry off the reference structure before dynamics even starts. The restraint also suppresses any collapse of the experimentally-determined conformation during the initial energy drop.&lt;br /&gt;
&lt;br /&gt;
= 4. Heating (restrained, NVT) =&lt;br /&gt;
&lt;br /&gt;
Five sequential NVT runs at increasing temperatures. All use the same key file (&amp;lt;code&amp;gt;heating.key&amp;lt;/code&amp;gt;) with &amp;lt;code&amp;gt;RESTRAIN-POSITION -1 N 50.0&amp;lt;/code&amp;gt; on the solute and &amp;lt;code&amp;gt;polar-eps 0.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! Temperature (K) !! Steps !! dt (fs) !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_10K   || 10  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_75K   || 75  || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_150K  || 150 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_225K  || 225 || 200 000 || 2.0 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Heating_to_298K  || 298 || 200 000 || 2.0 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Command used for each temperature:&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k heating.key  200000  2.0  10.0  2  &amp;lt;T&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Argument order: &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(2=NVT)  T_K&amp;lt;/code&amp;gt;. NVT does not take a pressure argument — do &#039;&#039;&#039;not&#039;&#039;&#039; append &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; at the end.&lt;br /&gt;
&lt;br /&gt;
The output trajectory &amp;lt;code&amp;gt;pre_production.arc&amp;lt;/code&amp;gt; accumulates across all five heating steps (Tinker9 appends to an existing &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt;). Total heating time: 2 ns across 5 temperature rungs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why this schedule:&#039;&#039;&#039;&lt;br /&gt;
* Starting at 10 K avoids the initial velocity kick that would shake apart a minimized-but-cold system.&lt;br /&gt;
* Going straight to 298 K routinely produces &amp;quot;induced dipole not converging&amp;quot; errors in AMOEBA because of transient bad contacts. Gradual heating in 5 rungs drains that risk.&lt;br /&gt;
* The strong restraint (FC = 50) keeps the solute essentially frozen while solvent and ions thermalize.&lt;br /&gt;
&lt;br /&gt;
= 5. Restraint phase-down (NVT, 298 K) =&lt;br /&gt;
&lt;br /&gt;
Four sequential NVT runs at 298 K, stepping the solute position-restraint force constant down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Step !! FC (kcal/mol/Å²) !! Steps !! Total (ps)&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_10    || 10.0 || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_1     || 1.0  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_0.1   || 0.1  || 200 000 || 400&lt;br /&gt;
|-&lt;br /&gt;
| Restraint_None  || — (no restraint line) || 200 000 || 400&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each step uses a separate key file (&amp;lt;code&amp;gt;restraint_10.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_0.1.key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;restraint_none.key&amp;lt;/code&amp;gt;) that differs only in the RESTRAIN-POSITION line (absent in the last one).&lt;br /&gt;
&lt;br /&gt;
Command (NVT, no pressure argument):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  pre_production.xyz  -k restraint_&amp;lt;FC&amp;gt;.key  200000  2.0  10.0  2  298&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why step down rather than release at once:&#039;&#039;&#039; an abrupt release at FC = 50 → 0 can cause a sudden &amp;quot;spring release&amp;quot; where the solute snaps to a lower-energy conformation that is different from the experimental reference. A 50 → 10 → 1 → 0.1 → 0 sequence lets the solute relax gradually while solvent / ion distribution tracks it.&lt;br /&gt;
&lt;br /&gt;
After this stage the system is fully equilibrated at 298 K, unrestrained, at the constant-volume box from solvation. 1.6 ns total across the 4 steps.&lt;br /&gt;
&lt;br /&gt;
= 6. Production (NPT) =&lt;br /&gt;
&lt;br /&gt;
The production run is NPT at 298 K, 1 atm, unrestrained:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;barostat MonteCarlo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;thermostat bussi&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;integrator respa&amp;lt;/code&amp;gt;, 2 fs timestep&lt;br /&gt;
* &amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; — tunable, see below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Starting frame:&#039;&#039;&#039; extract the final frame of the pre-production trajectory into &amp;lt;code&amp;gt;production.xyz&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
 tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
Then launch production (NPT, so a pressure argument is required):&lt;br /&gt;
&lt;br /&gt;
 dynamic9  production.xyz  -k production.key  5000000  2.0  10.0  4  298  1.0&lt;br /&gt;
&lt;br /&gt;
Argument order (NPT): &amp;lt;code&amp;gt;nsteps  dt_fs  write_interval_ps  ensemble(4=NPT)  T_K  P_atm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Production length is case-dependent.&#039;&#039;&#039; 5 000 000 steps × 2 fs = &#039;&#039;&#039;10 ns&#039;&#039;&#039; is an arbitrary default that&#039;s fine for a first pass; adjust &amp;lt;code&amp;gt;nsteps&amp;lt;/code&amp;gt; based on the system and the scientific question. Short equilibration-like checks can be 5 ns; publication-quality sampling for slow degrees of freedom may need 50–100 ns or more.&lt;br /&gt;
&lt;br /&gt;
== polar-eps tradeoff ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;polar-eps&amp;lt;/code&amp;gt; sets the convergence threshold for the induced-dipole solver each step. &#039;&#039;&#039;It directly trades simulation speed against energy / force accuracy.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! polar-eps !! Relative speed !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0.01     || fastest  || Often sufficient for structural observables and general equilibration&lt;br /&gt;
|-&lt;br /&gt;
| 0.001    || medium   || Reasonable middle ground for routine production&lt;br /&gt;
|-&lt;br /&gt;
| 0.0001   || slow     || High accuracy; use when energetics / forces matter (e.g. free energy work)&lt;br /&gt;
|-&lt;br /&gt;
| 0.00001  || slowest  || Very precise; rarely needed for structural work&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
More zeros = tighter convergence = more solver iterations per step = slower. Pick based on the tradeoff: 0.01 is often good enough, 0.0001 is very precise. Default to something around 0.001 unless you know you need tighter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why NPT for production:&#039;&#039;&#039; the box dimensions from the solvation step correspond to a density that is close to but not exactly 1.0 g/cc at 298 K under the AMOEBA potential. NPT lets the box settle to the correct density. Skipping this and running NVT with the as-built box can leave the system slightly compressed or stretched, which biases structural observables.&lt;br /&gt;
&lt;br /&gt;
= 7. Running on a GPU =&lt;br /&gt;
&lt;br /&gt;
All Tinker9 MD above runs on a single GPU. Select which GPU before launching:&lt;br /&gt;
&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
&lt;br /&gt;
The integer is the GPU index on that node. Change it (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, …) to select a different GPU on multi-GPU nodes.&lt;br /&gt;
&lt;br /&gt;
Typical launch on a GPU node:&lt;br /&gt;
&lt;br /&gt;
 ssh nodeXXX&lt;br /&gt;
 cd /path/to/project&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0&lt;br /&gt;
 nohup bash masterscript.sh &amp;gt; masterscript.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
= Notes and common pitfalls =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Induced dipole not converging&#039;&#039;&#039; during heating almost always means the starting structure has a bad contact. Re-check minimization went to a reasonable gradient, and that the solvation step didn&#039;t place a water atop a solute atom. You can temporarily add &amp;lt;code&amp;gt;USOLVE-CUTOFF 0.0&amp;lt;/code&amp;gt; to the heating key if convergence is marginal; remove for production.&lt;br /&gt;
* &#039;&#039;&#039;RESTRAIN-POSITION force constant is in kcal/mol/Å²&#039;&#039;&#039;, not kcal/mol. Don&#039;t change the numbers without understanding the scale.&lt;br /&gt;
* &#039;&#039;&#039;Restarting a crashed run:&#039;&#039;&#039; Tinker9 resumes from &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; if present. To restart from scratch, remove both &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.arc&amp;lt;/code&amp;gt; (otherwise the new trajectory appends to the old one).&lt;br /&gt;
* &#039;&#039;&#039;Stopping a running MD cleanly:&#039;&#039;&#039; &amp;lt;code&amp;gt;touch pre_production.end&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;production.end&amp;lt;/code&amp;gt;). Tinker9 checks for this file each frame and stops gracefully, leaving a valid &amp;lt;code&amp;gt;.dyn&amp;lt;/code&amp;gt; to resume from.&lt;br /&gt;
* &#039;&#039;&#039;Always &amp;lt;code&amp;gt;rm -rf temp&amp;lt;/code&amp;gt;&#039;&#039;&#039; before re-running Tinker-GUI.&lt;br /&gt;
&lt;br /&gt;
= Example masterscript =&lt;br /&gt;
&lt;br /&gt;
A reference Bash script that runs minimization → heating → restraint phase-down → production using the key-file and convention described above. Edit &amp;lt;code&amp;gt;TINKER_BIN&amp;lt;/code&amp;gt; and the parameter path at the top to match your installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env bash&lt;br /&gt;
set -euo pipefail&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Configuration&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
TINKER_BIN=&amp;quot;/path/to/Tinker9/latest/build&amp;quot;&lt;br /&gt;
AMOEBA_PRM=&amp;quot;/path/to/Tinker8/latest/params/amoebabio18.prm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COUNT_FILE=&amp;quot;./minimize_final.xyz&amp;quot;&lt;br /&gt;
INIT_KEY=&amp;quot;./minimize_final.key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [[ ! -f &amp;quot;$COUNT_FILE&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $COUNT_FILE not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
if [[ ! -f &amp;quot;$INIT_KEY&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: $INIT_KEY not found.&amp;quot; &amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# N = number of solute atoms in the original PDB (from the solute-only xyz&lt;br /&gt;
# produced by Tinker-GUI in temp/). Adjust manually if you want to restrain&lt;br /&gt;
# a different range.&lt;br /&gt;
first_line=&amp;quot;$(head -n 1 ./temp/minimize.xyz)&amp;quot;&lt;br /&gt;
N=&amp;quot;$(echo &amp;quot;$first_line&amp;quot; | grep -oE &#039;[0-9]+&#039; | head -n 1)&amp;quot;&lt;br /&gt;
if [[ -z &amp;quot;$N&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;Error: could not read atom count from ./temp/minimize.xyz&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Pull a-axis / b-axis / c-axis lines from the starting key file&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
get_line_or_empty() {&lt;br /&gt;
    local key=&amp;quot;${1}&amp;quot;&lt;br /&gt;
    grep -i -E &amp;quot;^[[:space:]]*$key\b&amp;quot; &amp;quot;$INIT_KEY&amp;quot; | head -n1 || true&lt;br /&gt;
}&lt;br /&gt;
A_AXIS=&amp;quot;$(get_line_or_empty &#039;a-axis&#039;)&amp;quot;&lt;br /&gt;
B_AXIS=&amp;quot;$(get_line_or_empty &#039;b-axis&#039;)&amp;quot;&lt;br /&gt;
C_AXIS=&amp;quot;$(get_line_or_empty &#039;c-axis&#039;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
append_axes() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$A_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$A_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$B_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$B_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  [[ -n &amp;quot;$C_AXIS&amp;quot; ]] &amp;amp;&amp;amp; echo &amp;quot;$C_AXIS&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Key file generator&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
write_key_file() {&lt;br /&gt;
  local outfile=&amp;quot;$1&amp;quot;&lt;br /&gt;
  local restraint_val=&amp;quot;$2&amp;quot;&lt;br /&gt;
  local polar_eps=&amp;quot;$3&amp;quot;&lt;br /&gt;
  local add_restrain=&amp;quot;$4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  cat &amp;gt; &amp;quot;$outfile&amp;quot; &amp;lt;&amp;lt;EOF&lt;br /&gt;
parameters $AMOEBA_PRM&lt;br /&gt;
integrator respa&lt;br /&gt;
archive&lt;br /&gt;
&lt;br /&gt;
ewald&lt;br /&gt;
ewald-cutoff 7.0&lt;br /&gt;
&lt;br /&gt;
vdw-cutoff 12.0&lt;br /&gt;
vdw-correction&lt;br /&gt;
&lt;br /&gt;
neighbor-list&lt;br /&gt;
polar-predict&lt;br /&gt;
&lt;br /&gt;
polar-eps $polar_eps&lt;br /&gt;
&lt;br /&gt;
thermostat bussi&lt;br /&gt;
barostat MonteCarlo&lt;br /&gt;
&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
  if [[ &amp;quot;$add_restrain&amp;quot; == &amp;quot;yes&amp;quot; &amp;amp;&amp;amp; -n &amp;quot;$restraint_val&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;RESTRAIN-POSITION -1 $N $restraint_val&amp;quot; &amp;gt;&amp;gt; &amp;quot;$outfile&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
  append_axes &amp;quot;$outfile&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# filename              FC     polar-eps  restraint?&lt;br /&gt;
write_key_file &amp;quot;heating.key&amp;quot;         &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;minimize.key&amp;quot;        &amp;quot;50.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_10.key&amp;quot;    &amp;quot;10.0&amp;quot;  &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_1.key&amp;quot;     &amp;quot;1.0&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_0.1.key&amp;quot;   &amp;quot;0.1&amp;quot;   &amp;quot;0.01&amp;quot;    &amp;quot;yes&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;restraint_none.key&amp;quot;  &amp;quot;&amp;quot;      &amp;quot;0.01&amp;quot;    &amp;quot;no&amp;quot;&lt;br /&gt;
write_key_file &amp;quot;production.key&amp;quot;      &amp;quot;&amp;quot;      &amp;quot;0.001&amp;quot;   &amp;quot;no&amp;quot;    # tune polar-eps to taste&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Minimization&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Energy minimization ---&amp;quot;&lt;br /&gt;
&amp;quot;$TINKER_BIN/minimize9&amp;quot; minimize_final.xyz -k minimize.key 0.5&lt;br /&gt;
&lt;br /&gt;
cp minimize_final.xyz pre_production.xyz&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Heating (NVT, no pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Heating (5 rungs) ---&amp;quot;&lt;br /&gt;
for T in 10 75 150 225 298; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k heating.key \&lt;br /&gt;
        200000 2.0 10.0 2 &amp;quot;$T&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Restraint phase-down (NVT, 298 K)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Restraint phase-down ---&amp;quot;&lt;br /&gt;
for FC in 10 1 0.1 none; do&lt;br /&gt;
    &amp;quot;$TINKER_BIN/dynamic9&amp;quot; pre_production.xyz -k &amp;quot;restraint_${FC}.key&amp;quot; \&lt;br /&gt;
        200000 2.0 10.0 2 298&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
# Production (NPT, with pressure arg)&lt;br /&gt;
# -------------------------------------------------------------------&lt;br /&gt;
echo &amp;quot;--- Production ---&amp;quot;&lt;br /&gt;
xyz_linecount=$(wc -l &amp;lt; pre_production.xyz)&lt;br /&gt;
tail -n &amp;quot;$xyz_linecount&amp;quot; pre_production.arc &amp;gt; production.xyz&lt;br /&gt;
&lt;br /&gt;
&amp;quot;$TINKER_BIN/dynamic9&amp;quot; production.xyz -k production.key \&lt;br /&gt;
    5000000 2.0 10.0 4 298 1.0&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;--- Done ---&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2175</id>
		<title>Tutorial:tinkertut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2175"/>
		<updated>2026-04-22T15:12:30Z</updated>

		<summary type="html">&lt;p&gt;Brendan: /* Recommended NVT and NPT combinations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purposes =&lt;br /&gt;
This page provide tutorials on using AMOEBA force field via Tinker (CPU) and Tinker-OpenMM (GPU) programs.&lt;br /&gt;
&lt;br /&gt;
Tinker manual: https://dasher.wustl.edu/tinker/downloads/tinker-guide.pdf&lt;br /&gt;
&lt;br /&gt;
Tinker GPU manual: https://tinker9-manual.readthedocs.io/en/latest/ &lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
Some simple tutorials about Tinker I used in my teaching below. Note you can directly download tinker source from https://github.com/TinkerTools/tinker&amp;lt;nowiki/&amp;gt;and executables from https://github.com/TinkerTools/tinker-ffe/releases/tag/v25.5 or  [https://dasher.wustl.edu/tinker/ https://dasher.wustl.edu/tinker/]&amp;amp;nbsp;(Windows, mac. Linux) for the following tutorials.&lt;br /&gt;
&lt;br /&gt;
You can either use command lines in Windows CMD window or Linux terminals, or use FFX interface for some exercises. &#039;&#039;&#039;Actually applications always use command lines to operate in Linux OS&#039;&#039;&#039;. If you are not familiar with Linux, this is the opportunity to practice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;[https://biomolmd.org/pren/tinker-tut/ &amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;https://biomolmd.org/pren/tinker-tut/&amp;lt;/span&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Below you will find more detailed instructions and discussions.&lt;br /&gt;
&lt;br /&gt;
= Input files =&lt;br /&gt;
&lt;br /&gt;
You can find examples of input files in tinker distribution under tinker/bench, tinker/example or tinker/test. Two files are required to run TINKER calculations: *.xyz and *.key For example, open butane.xyz and butane.key in tinker/example/ (available in all official distributions) to see what’s inside.&lt;br /&gt;
&lt;br /&gt;
== *.xyz file ==&lt;br /&gt;
&lt;br /&gt;
*The first number on the 1st line is how many atoms total. &lt;br /&gt;
*There may be a second line that specify the box dimensions if the system is periodic (newer format since tinker 6) &lt;br /&gt;
*The first column is the atomic index &lt;br /&gt;
*The second column is the atomic symbol &lt;br /&gt;
*The 3 -5th columns are x,y,z coordinates in Angstrom &lt;br /&gt;
*The 6th is the “atom type” defined in the *.key file. This is the index tinker uses to assign parameters from the key/parameter file. &lt;br /&gt;
*The 7th – last columns are lists of atoms that are connected to the current atom&lt;br /&gt;
&lt;br /&gt;
== *.key file ==&lt;br /&gt;
&lt;br /&gt;
The key file may have all the actual parameters or a link to the actual parameters file specified in the first line. The parameters specify the bond, angle, torsion, vdW and electrostatic interactions between atoms based on the “atom type”. If you see an error related to OMP, please set the OPENMP-THREADS in the key file to a number less than the # of CPU cores on your computer. This sets how many CPU cores are used in the parallel execution.&lt;br /&gt;
&lt;br /&gt;
For example, in protein.key below, borrowed from tinker/bench/bench7.key, the first line specific the actual parameters are contain in the amoebapro13.prm. More examples can be found in tinker/bench, tinker/example, or tinker/test.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 parameters           $TINKERDIR/params/amoebabio18.prm &lt;br /&gt;
                                      &#039;&#039;# use the latest prm from GitHub&#039;&#039;&lt;br /&gt;
 # verbose                            &#039;&#039;# printing info for every step, for debugging mostly&#039;&#039;&lt;br /&gt;
 integrator            respa          &#039;&#039;#this multi-time step integrator allows TINKER to use 2 fs time step&#039;&#039;&lt;br /&gt;
 a-axis                62.23          &#039;&#039;# add b and c-axis if not cubic&#039;&#039;&lt;br /&gt;
 vdw-cutoff            12.0&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 neighbor-list                &#039;&#039;# this below requires your box is twice the cutoff plus 2 or 3 Ang.&#039;&#039;&lt;br /&gt;
                              &#039;&#039;#&#039;&#039; &#039;&#039;If your box is too small for vdw but OK for Ewald, you can&#039;&#039; &#039;&#039;use &amp;quot;mpole-list&amp;quot;&#039;&#039;&lt;br /&gt;
 ewald&lt;br /&gt;
 ewald-cutoff          7.0    &#039;&#039;# small cutoff because dipole/quadrupole die off &amp;gt; charge.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 polar-eps             0.01    &#039;&#039;# the induced dipole convergence threshold, 0.001 is better but slower.&#039;&#039;&lt;br /&gt;
 polar-predict&lt;br /&gt;
 &lt;br /&gt;
 #polarization         OPT3    &#039;&#039;#For improving polarization. OPT4 is more accurate but OPT3 is faster&#039;&#039;&lt;br /&gt;
 #openmp-threads       16      &#039;&#039;# CPU only. how many core you want to use on the node.&#039;&#039;&lt;br /&gt;
 #HEAVY-HYDROGEN              #&#039;&#039;This will increase H atom mass automatically so 3 or 3.5 fs time step can be &#039;&#039;                                                                      &lt;br /&gt;
                              #&#039;&#039;Kinetics will  be affected            &#039;&#039;&lt;br /&gt;
                                                &lt;br /&gt;
 # pme-grid  64 64 64       &#039;&#039;#If speed is a concern, set this mannually to be slightly bigger than simulation box size. E.g. use 64 is box is 62.23 (1.2x is the best but slower). Must be even with factors of only 2, 3 and 5. see source/kewald.f for a list. Sometimes the default grid size is conservative&#039;&#039; &lt;br /&gt;
 #fft-package           FFTW&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 # Example of overwriting the parameters in the .prm file. The bond parameters between &lt;br /&gt;
 # atom classes 1 and 4 are redefined below, which&lt;br /&gt;
 # will overwrite those already in the amoebapro13.prm. &lt;br /&gt;
 #this is only for illustration purpose&lt;br /&gt;
 # bond          1    4          200.00     1.1&lt;br /&gt;
&lt;br /&gt;
= How to generate input files =&lt;br /&gt;
&lt;br /&gt;
== CHARMM-GUI ==&lt;br /&gt;
charmm-gui can now output simulation files in Tinker format, but only fixed-charge force fields for now.&lt;br /&gt;
&lt;br /&gt;
== Latest tool for system set up for Tinker and AMOEBA ==&lt;br /&gt;
https://github.com/prenlab/Tinker-GUI&lt;br /&gt;
&lt;br /&gt;
Tools developed by Dr. Chengwen Liu for complex systems such as protein-membrane system: https://github.com/leucinw/TIPTOP&lt;br /&gt;
&lt;br /&gt;
Once built, before running production, see below [[#Check your xyz/key files and common errors]]&lt;br /&gt;
&lt;br /&gt;
== Programs and Scripts for converting formats ==&lt;br /&gt;
Click to see: [[tinkersctipts]]&lt;br /&gt;
&lt;br /&gt;
== proteins, nucleic acids, common organics ==&lt;br /&gt;
&lt;br /&gt;
In tinker/params, you can find pre-existing parameters for certain molecular systems, both AMOEBA, amber, charmm, opls, mmff, and mm2/3.&lt;br /&gt;
&lt;br /&gt;
If you want to build a peptide from a sequence, you can use tinker &amp;quot;protein.x&amp;quot; command, for example, ACE-ALA-NME, while create/use a tinker.key to specify which force field (with one line as below).&lt;br /&gt;
 parameters /path/to/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
== Lipid Bilayer System ==&lt;br /&gt;
If you have complicated system; protein embedded in a lipid bilayer and solvated in water box and a ligand prepared by CHARMM-GUI or any other package. The best way to convert such system is to divide it into three parts:&lt;br /&gt;
&lt;br /&gt;
i- Protein + water + ions: can be converted by pdb2xyz in Tinker and will result in the best consistency&lt;br /&gt;
&lt;br /&gt;
ii- Lipid bilayer: This must be converted manually using a script, depending on the lipid type check the Github TIPTOP database leucinw/TIPTOP. Convert each lipid alone, depending on the connectivity from the reference (don’t use the connectivity from Openbabel as this will result in wrong connectivity and the system will blow up). After converting each lipid molecule alone, append all of them together&lt;br /&gt;
&lt;br /&gt;
iii- If your system has a ligand or a non-standard ion, Poltype should be used to generate the parameter file, then convert your extracted ligand or non-standard ion using pdb2xyz and double check that the atom type assigned is consistent with what you had in the parameter file&lt;br /&gt;
&lt;br /&gt;
iv- Use xyzedit option 23 to combine the three parts together (Protein + water +ion with Lipid Bilayer system + ligand or non-standard ion)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; You have to make sure that the assigned atom types are different and unique for each part of your system, for example the assigned atom type for the ligand has to be different from that of the lipid and from those in the amoebabio18.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; To run pdb2xyz or xyzedit, you need a parameter file and/or key file containing the parameters. you can’t upload several parameter files in the key file, for example you can’t have   parameters amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
parameters ligand.prm&lt;br /&gt;
&lt;br /&gt;
This will result in loading only the second one only. The solution is to combine all of them into a single parameter file or into the key file&lt;br /&gt;
&lt;br /&gt;
== PDB to xyz ==&lt;br /&gt;
&lt;br /&gt;
If you have a pdb file you can convert it tinker xyz file by specifying a prm file above. It will remove the heteroatoms such as ligand, which you can use POLTYPE to generate parameters for.&lt;br /&gt;
&lt;br /&gt;
First you need to determine the protonation state of charged residue. Tools like propka can do this quikly: [http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&lt;br /&gt;
&lt;br /&gt;
Once you decided the protonation state, make sure the residue name in PDB file match the protonation state (list below). For example, ASH is the neutral form of ASP. Then you can run &amp;quot;pdbxyz.x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;GLY&#039; &#039;ALA&#039; &#039;VAL&#039; &#039;LEU&#039; &#039;ILE&#039; &#039;SER&#039; &#039;THR&#039; &#039;CYS&#039; &#039;CYX&#039; &#039;CYD&#039; &#039;PRO&#039; &#039;PHE&#039; &#039;TYR&#039; &#039;TYD&#039; &#039;TRP&#039; &#039;HIS&#039; &#039;HID&#039; &#039;HIE&#039; &#039;ASP&#039; &#039;ASH&#039; &#039;ASN&#039; &#039;GLU&#039; &#039;GLH&#039; &#039;GLN&#039; &#039;MET&#039; &#039;LYS&#039; &#039;LYD&#039; &#039;ARG&#039; &#039;ORN&#039; &#039;AIB&#039; &#039;PCA&#039; &#039;UNK&#039;&lt;br /&gt;
&lt;br /&gt;
UNK means unownk; AIB, ORN and PCA&amp;amp;nbsp; are modified AA.&lt;br /&gt;
&lt;br /&gt;
[https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Terminal residue names:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
COH ACE NH2 NME&amp;amp;nbsp; FOR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HETATM&#039;&#039;&#039; (residue name) recoginzed by pdbxyz:&lt;br /&gt;
&lt;br /&gt;
HOH K CA MG NA CL&lt;br /&gt;
&lt;br /&gt;
== AMOEBA for a new ligand ==&lt;br /&gt;
&lt;br /&gt;
Note that pdbxyz recognize proteins, water (res name HOH and some ions). The ligand (benzamidine above) is stripped. For that you need to derive your own parameters. For AMOEBA this can be done using POLTYPE: [https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype]&lt;br /&gt;
&lt;br /&gt;
 Input: ligand.sdf or ligand.pdb (for example, you can truncate the ligand &amp;quot;BEN&amp;quot; out of the 1bty.pdb) &lt;br /&gt;
 Output: will produce the xyz and corresponding key files (ttt.xyz and ttt.key):&lt;br /&gt;
&lt;br /&gt;
If you will merge the ligand xyz file with another molecule, &#039;&#039;&#039;make sure you set the suitable range for atom types (an option for pOLTYPE) so that they won&#039;t overlap.&#039;&#039;&#039; See the &amp;quot;Check the results section&amp;quot; on POLTYPE website before using them. Use &amp;quot;analyze.x&amp;quot; to make sure the xyz and key files work correctly: &amp;quot;analyze.x ttt.xyz -k ttt.key ep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== build a solvent box ==&lt;br /&gt;
&lt;br /&gt;
=== arbirary solvent ===&lt;br /&gt;
&lt;br /&gt;
Use xyzedit.x to build a water (or any solvent) box starting from a water monomer (e.g. tinker/test/water.xyz). You can specify many monomers to add and how big the box is. Type xyzedit.x at the command line and you will be asked to enter relevant inputs (or you may type all the parameters in one line).&lt;br /&gt;
&lt;br /&gt;
Make sure edit the key file to add box size and Ewald related keywords (see [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file])&lt;br /&gt;
&lt;br /&gt;
=== prebuilt water box ===&lt;br /&gt;
&lt;br /&gt;
Some prebuilt waterboxs:&amp;amp;nbsp;[http://biomol.bme.utexas.edu/~pren/downloads/waterbox http://biomol.bme.utexas.edu/~pren/downloads/waterbox]&lt;br /&gt;
&lt;br /&gt;
Larger boxes can be created as supercells of smaller boxes, e.g. this following command will create a box 64x larger than the orignial box.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -e &amp;quot;5\n4\n\n&amp;quot; | crystal.x watersmall.xyz -k tinker.key&lt;br /&gt;
== Combining two xyz files ==&lt;br /&gt;
&lt;br /&gt;
Tinker &amp;quot;xyzedit.x&amp;quot; program (option 20) can be used to combine two xyz files into one (matching key file for each xyz is required). You can merge the key or parameter files by appending one to the other, but please make sure the atom types are not overlapping between the two.&lt;br /&gt;
&lt;br /&gt;
For the above 1BTY example, poltype will translate/rotate the ligand in standard orientation. You may need a script to copy the coordinates from ligand.pdb into ttt.xyz (hwich you get out of the POLTYPE run).&lt;br /&gt;
&lt;br /&gt;
Then you can use xyzedit.x to combine 1bty.xyz and lig.xyz into one xyz file with the two molecules orient/position as in PDB. Merge the key file by appending ttt.key (except the first line which contains header already in amoebapro13.prm of 1bty.key) to 1bty.key; again avoid overlapping atom types between the ligand and protein.&lt;br /&gt;
&lt;br /&gt;
== Soaking solute in solvent ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;Tinker &amp;quot;xyzedit.x&amp;quot; is an interactive program (option 20) that can be used for this as well. You just need a molecule.xyz and waterbox.xyz along with matching key files (actual names do not matter).&lt;br /&gt;
&lt;br /&gt;
Some water files (monomers, boxes) are in tinker/example or test folder. One can make a water box of different size using this program too (starting from one water or a cluster of water and use option 19). Option 21 can add ions to solvent box. To distiguish between AMOEBA or fixed charged FF simulation files, check the key file to see which prm file it is pointing to.&lt;br /&gt;
&lt;br /&gt;
Or you can use this utility: [http://www.ime.unicamp.br/~martinez/packmol/home.shtml http://www.ime.unicamp.br/~martinez/packmol/home.shtml]&lt;br /&gt;
&lt;br /&gt;
On renlab cluster, there is &amp;quot;packmol&amp;quot; installed at /home/liuchw/Softwares/packmol-20.14.4/packmol&lt;br /&gt;
&lt;br /&gt;
Two examples for generating a cubic box:&lt;br /&gt;
&lt;br /&gt;
example 1: generate a pure liquid box, using water as an example. In the real cases, one could calculate the number of molecules and the length of the cube according to desired density. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output water-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;example 2: soak a MeOH molecule into the above box. We first let MeOH be in the center of the box with coordinates (9,9,9), and then soak with water in 18.6 A cubic box. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output liquid-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure MeOH.xyz&lt;br /&gt;
number 1&lt;br /&gt;
center&lt;br /&gt;
fixed 9.0 9.0 9.0 0.0 0.0 0.0&lt;br /&gt;
end structure&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the above two examples, all one needs are the &amp;quot;Wat.xyz&amp;quot; and &amp;quot;MeOH.xyz&amp;quot; files. After the box is generated, it is straightforward to use Tinker to minimize the structure. &lt;br /&gt;
&lt;br /&gt;
After construct the simulations, relax the system using minimize and dynamics (restraint the solute first), with proper restraints and heating. See [[Tutorial:tinkertut#MD_setup-initial_equilibration|MD setup]] for details&lt;br /&gt;
&lt;br /&gt;
== Check your xyz/key files and common errors ==&lt;br /&gt;
&lt;br /&gt;
Once you have a pair of xyz and key (and prm file the key uses one), you can use &amp;quot;analyze&amp;quot; to do some basic check. The CPU version &amp;quot;analyze&amp;quot; has many more options.&lt;br /&gt;
&lt;br /&gt;
analyze xxx.xyz -k xxx.key e&amp;quot; will print energy and its components.&lt;br /&gt;
&lt;br /&gt;
 If there are any error related to missing parameters, you need to fix them. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key em&amp;quot; prints total charge and dipole moments etc.&lt;br /&gt;
&lt;br /&gt;
 The total charge should match your expectation (0, -1, +1) etc&lt;br /&gt;
 If this is a box of solute in water, you should add neutralizing ions (K+ or Cl-) and then &amp;quot;additional&amp;quot; 0.1 mM KCl. So the next charge should be 0!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key ep&amp;quot; prints all parameters&lt;br /&gt;
&lt;br /&gt;
 Check if every atom has a multipole (number of multipole matches no of atoms) &lt;br /&gt;
 check if every atom has vdw (if an atom has 0.000 0.000 for vdw R and eps, that means the vdw parameters are missing; need to add) &lt;br /&gt;
 check polarization groups are making sense. If you see every atom is its own group, this is likely wrong. Typically we keep each function group (e.g. benzyl) as one group. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key eL&amp;quot; &lt;br /&gt;
  will print out large interactions, for example large ele or vdw interactions of two atoms that are too close&lt;br /&gt;
analyze with &amp;quot;ED&amp;quot; option (debug) will print out all individual interactions and lot more information. The output&amp;amp;nbsp;is of course huge if you do this to a large bix, but you can use &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;vdwterm only, bondterm only, angleterm only. multipoleterm only, polarizeterm only, etc&amp;lt;/span&amp;gt;&#039;&#039;&#039; to check a specific energy component. Or use &#039;&#039;&#039;bondterm none, angleterm none&#039;&#039;&#039;....ect to turn off some interactions you don&#039;t want to check. A full list of xxxTERM can be found in &amp;lt;span style=&amp;quot;color:#2980b9;&amp;quot;&amp;gt;&#039;&#039;&#039;tinker/source/prmkey.f&#039;&#039;&#039;&amp;lt;/span&amp;gt;(grep TERM).&lt;br /&gt;
=== Induced dipole not converging error ===&lt;br /&gt;
&lt;br /&gt;
If analyze give you error related to induced dipole not converging, the structure is bad. If you see &amp;quot;induced dipole not converging&amp;quot; error in the beginning of your MD, it is also due to bad structures (atoms too close). The structure needs refinement, or missing parameters above. To refine the structure&lt;br /&gt;
&lt;br /&gt;
1. minimize the structure. you can turn off polarization (polarizeterm none) or even permanent ele completely (multipoleterm none &amp;amp; polarizeterm none) first to minimize using vdw to move close atoms apart. Then turn on multipole and then induce back&lt;br /&gt;
&lt;br /&gt;
2 For MD simulations of protein/RNA/DNA in water, run MD first at low T with pro/rna/dna &amp;quot;heavy atoms&amp;quot; restrained (e.g. restrain-position -1 1000 5.0 or restrain-position 2 , , , 1.0) to let water &amp;amp; counter ions to relax for few ns. Then gradually heat up and remove the restraints. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#d35400;&amp;quot;&amp;gt;Note &amp;quot;restrain-position -1 1000 0.0&amp;quot; or &amp;quot;restrain-position 2 , , , 0.0&amp;quot; DOESN&#039;T mean 0 restraint (k=0.0) on atoms 1 to 1000 or atom 2!!!&amp;amp;nbsp; &amp;quot;0.0&amp;quot; is replaced by 100.0 in tinker by default.&amp;lt;/span&amp;gt;&#039;&#039;&#039; If you don&#039;t want restraint, comment out/remove these lines.&lt;br /&gt;
&lt;br /&gt;
3. But if you see this error randomly over few hundreds of ps, which may happen for tough systems of large/many charges e.g DNA/RNA, you can add &amp;quot;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;&#039;&#039;&#039;USOLVE-CUTOFF 0.0&#039;&#039;&#039;&amp;lt;/span&amp;gt;&amp;quot; option to key. This will change the precondition behavior and make induced dipole solver more stable. It is not used by default because for &amp;quot;easy&amp;quot; systems like boxes of water, this makes MD little slower (more iterations to converge induced dipoles). If still have stability issue you may further add &amp;quot;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e67e22;&amp;quot;&amp;gt;USOLVE-DIAG xx&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;quot; where xx is 2.0 by default and a smaller number towards 1 (e.g. 1.5) will make more stable but slightly slower.&lt;br /&gt;
&lt;br /&gt;
4. If system is rather big,&amp;amp;nbsp;use &amp;quot;polar-eps 0.1&amp;quot; or 0.01 during system setup and 0.01 (0.001) for production.&lt;br /&gt;
&lt;br /&gt;
== Modified PRO &amp;amp; NA residues ==&lt;br /&gt;
&lt;br /&gt;
=== Build a structure with modified residues ===&lt;br /&gt;
&lt;br /&gt;
Modify residues in a PDB file.&lt;br /&gt;
&lt;br /&gt;
Input: PDB files of the biopolymer, an original residue and a modified residue. The original residue must be present in the biopolymer, and the modified residue must share at least 3 atoms with the original residue with identical coordinates. The modified residue is usually obtained by manually modifying the original residue.&lt;br /&gt;
&lt;br /&gt;
Output: A PDB file with specified residues modified to the new residue. [https://biomol.bme.utexas.edu/~zj2244/tutorial/modeling/modres/modified_pdb/ link]&lt;br /&gt;
&lt;br /&gt;
 # change residues 2 and 14 in dna15.pdb from res_A to res_pA&lt;br /&gt;
 morphling.py -i dna15.pdb -o pdna15.pdb -t0 res_A.pdb -t1 res_pA.pdb -n 2,14&lt;br /&gt;
&lt;br /&gt;
=== Convert pdb to xyz ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/zjing7/modified-na link]&lt;br /&gt;
&lt;br /&gt;
= More on running Tinker and tinker9 (GPU) =&lt;br /&gt;
==Manual==&lt;br /&gt;
https://tinkerdoc.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
== Compiling &amp;amp; running: ==&lt;br /&gt;
[[Software:tinkergpu]] &lt;br /&gt;
&lt;br /&gt;
== Command line ==&lt;br /&gt;
&lt;br /&gt;
Tinker programs can be run interactively, which is the best way to learn what are the required inputs. Tinker programs can also run in background with all parameters specified, for the purpose of automation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;analyze.x ttt.xyz -k ttt.key ep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;dynamic.x bench7 100000 3.0 6.0 2 298.0 N &amp;gt; ben7.log &amp;amp;&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;# the bench7.xyz above can be found in tinker official distribution inside tinker/bench/&#039;&#039;&lt;br /&gt;
 #2-fs time step for MD here is ok because of the &amp;quot;integrator respa&amp;quot; in the key file&lt;br /&gt;
&lt;br /&gt;
Or for tinker9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #source /home/liuchw/.bashrc.tinker9&lt;br /&gt;
 #export TINKER9=/home/pren/tinker9/tinker9_sugar/build/&lt;br /&gt;
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib/&lt;br /&gt;
 export CUDA_DEVICE_ORDER=PCI_BUS_ID&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0 # device number; can use 1 or 2 if there are multiple GPU cards&lt;br /&gt;
 $TINKER9/tinker9 dynamic bench7.xyz -k bench7.key 5000 2.0 1000.0 4 298.15 1.0 N &amp;gt; out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Pause and resume MD ==&lt;br /&gt;
&lt;br /&gt;
Tinker creates .dyn file that contains coordinates and velocities needed for restart MD. To stop MD, simply create a .end file (e.g. touch myrun.end) in the folder where MD is running. At the next time MD frame was written, the end file will signal Tinker to stop. To resume later simply rerun dynamics with the presence of the .dyn file. Note the output file of dynamics does not resume the count of MD steps/frames.&lt;br /&gt;
&lt;br /&gt;
== Additional notes for &amp;quot;tinker-openmm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
*It s recommended to use the respa inetgrator and 2-fs time step &lt;br /&gt;
*&amp;quot;heavy-hydrogen&amp;quot; in key file allows a 3-fs time step (not reommended) &lt;br /&gt;
*Bussi thermostat &lt;br /&gt;
*Only MC barostat is available for now. We are adding virial/Langevin piston pressure to openmm.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to specify different ensembles for MD simulation =&lt;br /&gt;
&lt;br /&gt;
== For TINKER-openmm ==&lt;br /&gt;
&#039;&#039;&#039;Tinker-Openmm is no longer supported since 2021. Use tinker9 for GPU MD (see [[Software:tinkergpu|Tinker GPU]])&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not many options available.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
For NVT, use Bussi for thermostat, RESPA integrator (2fs)&lt;br /&gt;
&lt;br /&gt;
For NPT, use Montecarlo for Barostat, Bussi thermostat. Verlet (1 fs) is safer than RESPA for use with MC barostat if very accurate density is needed.&lt;br /&gt;
&lt;br /&gt;
See below for keyword syntax.&lt;br /&gt;
&lt;br /&gt;
== Available thermostat and barostat in TINKER (2021) ==&lt;br /&gt;
&lt;br /&gt;
Thermostats:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD (lines you add to .key file)&lt;br /&gt;
 Bussi-Parrinello           thermostat bussi&lt;br /&gt;
 Berendsen                  thermostat berendsen&lt;br /&gt;
 Andersen Stochastic        thermostat andersen&lt;br /&gt;
 Nose-Hoover                thermostat nose-hoover&lt;br /&gt;
&lt;br /&gt;
There are 3 barostats available via the “barostat” keyword:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Berendsen                  barostat berendsen&lt;br /&gt;
 Monte-Carlo                barostat montecarlo&lt;br /&gt;
 Lagevin                    Barostat Langevin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above thermostat and barostats are available for the Verlet, Beeman and RESPA integrators, and can be used in combination with those integrators. These integrators are available via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Verlet                     integrator verlet&lt;br /&gt;
 Beeman                     integrator beeman (tinker 8 CPU only)&lt;br /&gt;
 RESPA                      integrator respa&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;&#039;defaults&#039;&#039;&#039; are Bussi for thermostat, Berendsen for barostat, and Beeman for integrator.&lt;br /&gt;
&lt;br /&gt;
Then there are two special integrators, a stochastic one, and a Nose-Hoover that does NPT. The stochastic integrator uses a kind of Langevin temperature bath for thermostating, and does listen to the barostat keyword. The Nose-Hoover integrator uses a separate code branch and does only NPT with Nose-Hoover methods following Martyna-Tuckerman-Klein. You can get these via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                      KEYWORD&lt;br /&gt;
 Stochastic                   integrator stochastic (no need for other T control)&lt;br /&gt;
 Nose-Hoover NPT             integrator nose-hoover (no need other keywords for T or P; starting structures need to reasonable)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Recommended NVT and NPT combinations ==&lt;br /&gt;
&lt;br /&gt;
NVT keywords combination in the key file (2fs time step)&lt;br /&gt;
&lt;br /&gt;
 thermostat bussi &lt;br /&gt;
 integrator RESPA&lt;br /&gt;
&lt;br /&gt;
Preferred/Recommended NPT (2fs, relative isotropic and homogenous systems)&lt;br /&gt;
&lt;br /&gt;
 archive (&#039;&#039;&#039;dcd-archive&#039;&#039;&#039; to produce compressed traj for large systems; need .xyz or .pdb to render in VMD)&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
 barostat MonteCarlo&lt;br /&gt;
 integrator RESPA&lt;br /&gt;
 vdw-cutoff 9 (12 for amoeba)&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 9.0 (7.0 for amoeba)&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001 (only for amoeba)&lt;br /&gt;
 polar-predict (only for amoeba)&lt;br /&gt;
&lt;br /&gt;
Recommended NPT for &#039;&#039;&#039;anisotropic systems&#039;&#039;&#039; such as membrane, or large local volume fluctuation in protein folding. Slower than above for virial calculations)&lt;br /&gt;
&lt;br /&gt;
Documentation: https://tinkerdoc.readthedocs.io/en/latest/text/feature/integrator-langevin-piston.html#implementation-2 &lt;br /&gt;
Semi-isotropic pressure control not finished yet&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;barostat langevin&#039;&#039;&#039; # for GPU&lt;br /&gt;
 &#039;&#039;&#039;semiiso-pressure&#039;&#039;&#039; (if using tinker-GPU from 2025)&lt;br /&gt;
 &#039;&#039;&#039;pressure  SEMIISO (or &amp;quot;PRESSURE SEMI&amp;quot; if using tinker-GPU from 2026&#039;&#039;&#039; #PRESSURE [ISOTROPIC / SEMI-ISOTROPIC / ANISOTROPIC ] &lt;br /&gt;
 #barostat Langevin&lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA   #or Verlet/1 fs; T control not needed&lt;br /&gt;
 a-axis 40 #change this to your actual box size; b or c can be different from a&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.001&lt;br /&gt;
 polar-predict&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Alternative NPT (1fs, built in P and T control)&lt;br /&gt;
&lt;br /&gt;
 integrator nose-hoover&lt;br /&gt;
&lt;br /&gt;
== Recommended keywords (add somewhere in the .key file) for NVT ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 2 298  (100000 steps, 2.0 fs time step, dump structure every 1.0 ps, option 2 is NVT, 298 is the target T)&lt;br /&gt;
&lt;br /&gt;
It is also possible to combine &amp;quot;&#039;&#039;&#039;integrator Beeman&#039;&#039;&#039;&amp;quot; or &#039;&#039;&#039;&amp;quot;thermostat Berendsen”&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;thermostat Andersen&amp;quot;&#039;&#039;&#039;. But RESPA allows large time steps (2.0 or 2.5 fs) than Beeman. Berendsen thermostat does not provide canonical ensemble fluctuation.&lt;br /&gt;
&lt;br /&gt;
== NVE ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 1&lt;br /&gt;
&lt;br /&gt;
No need for thermostat or barostat of course. It is best to use smaller time step such as 1.0fs to conserve energy better. May even use smaller polar-eps (10^-6) than default (10^-5) in the key file.&lt;br /&gt;
&lt;br /&gt;
== Non periodic system, e.g. gas molecules not in a box ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;_&amp;quot; style=&amp;quot;background:#eee; border:1px solid #ccc; padding:5px 10px&amp;quot;&amp;gt;integrate stochastic&amp;lt;/div&amp;gt; &lt;br /&gt;
If there is no box (a-axis) in the key file, or no box dimensions in the den file, the system is non-periodic. This will set the stochastic temperature control along with the stochastic MD integration. &#039;&#039;&#039;For gas phase molecular cluster (very few atoms), the recommended time step is 0.1 fs&#039;&#039;&#039;.&lt;br /&gt;
= Free energy calculations =&lt;br /&gt;
&lt;br /&gt;
Theory about free energy calculation: http://alchemistry.org/wiki/Bennett_Acceptance_Ratio&lt;br /&gt;
&lt;br /&gt;
About AMOEBA softcore and BAR, read our book chapter: &lt;br /&gt;
&lt;br /&gt;
[[File:PL_BAR_softcore.pdf|page=3|300px]]&lt;br /&gt;
&lt;br /&gt;
== MD setup-initial equilibration ==&lt;br /&gt;
&lt;br /&gt;
Determine protonation state of ionizable groups (ASP, GLU, LYS, ARG, HIS). Use propka here&amp;amp;nbsp;[http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&amp;amp;nbsp;for proteins. For ligand, you may use pka predicction tool&amp;amp;nbsp;from Chemaxon. &lt;br /&gt;
*Add water and counter ions (neutralize system) so that the density is ~1.0 g/cc. The distance between protein and box wall should be&amp;amp;nbsp;10-15 A. Check/remove extra water in the binding pocket as necessary (keep the crystal water molecules in the pocket) &lt;br /&gt;
*In the key file, set&amp;amp;nbsp;PME-grid&amp;amp;nbsp;to be&amp;amp;nbsp;1.2x&amp;amp;nbsp;box size in Ang. For example, if box size is 55, “pme-grid&amp;amp;nbsp;64 64 64” is enough. The default of Tinker is usually more conservative. See kewald.f for allowed grid values. Add &#039;&#039;&#039;“neighbor-list”, “polar-eps 0.01”, “vdw-cutoff&amp;amp;nbsp;12”, &amp;quot;vdw-correction&amp;quot; “integrator respa”, “ewald”, “ewald-cutoff 7.0” &#039;&#039;&#039;&amp;amp;nbsp;to .key file. You can even turn off polarization initially (polarizeterm NONE) during EQ and add it back (&#039;&#039;&#039;polar-eps 0.001&#039;&#039;&#039; or tighter for production) &lt;br /&gt;
*Minimize the box before MD. If you see errors related to polarization (induced dipole not converge), do this in two steps: first minimize with electrostatic (multipoleterm NONE) and polarization turned off (polarizeterm NONE in .key file), to ~5.0 or lower; then minimize again with ele then ele+polarization back on to ~2.0 or lower. You may use position-restraints&amp;amp;nbsp;&#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; if you don&#039;t want your solute to undergo dramtic changes. (RESTRAIN-POSITION -1 200 50.0, means restrain atoms 1 to 200 using a force constant of K=50 kcal/mol).&amp;amp;nbsp; &lt;br /&gt;
*MD relaxation. You may use GPU for MD now (dynamic_omm.x).&amp;amp;nbsp;Use repsa integrator and 2fs time step.&amp;amp;nbsp;Add&amp;amp;nbsp;&#039;&#039;&#039;position-restraints&#039;&#039;&#039; to restrain protein &amp;amp; ligands &#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; in the key file&amp;amp;nbsp;initially; For metal ion-protein binding or weak binding ligand,&amp;amp;nbsp;we&amp;amp;nbsp;also suggest to use ~3 distance restraints between ion/ligand and first shell atoms. This is to prevent water disrupt the initial solute structure during the equilibration.&amp;amp;nbsp; &lt;br /&gt;
**Use 2 fs for all MD below.&amp;amp;nbsp;If you want to use 3fs (e.g. for large systems),&amp;amp;nbsp;you need to&amp;amp;nbsp;&amp;quot;heavy-hydrogen&amp;quot; in the key file.&amp;amp;nbsp;Another way to speed up is to use the OPTx: &amp;quot;polarization OPT4&amp;quot; or &amp;quot;polarization OPT3&amp;quot; OPT3 is faster but bigger error.&lt;br /&gt;
**Use &amp;quot;polar-eps 0.01&amp;quot; and &amp;quot;polar-predict&amp;quot; for equilibration for speed. For production use &amp;quot;polar-eps 0.001&amp;quot; or &amp;quot;0.0001&amp;quot;.&lt;br /&gt;
**use &amp;quot;neighbor-list&amp;quot;&lt;br /&gt;
**With the positional/distance restraints, run ~2ns&amp;amp;nbsp; NVT MD to gradually (e.g. exponentially) heat up the system from 10K&amp;amp;nbsp; to 298K or whatever expt T should be. Water/ions are relaxed after this step.&lt;br /&gt;
**Run NVT at 298K or expt T for ~2ns &#039;&#039;&#039;while gradually turning off all the position and distance restraints on protein-ligands.&#039;&#039;&#039; &lt;br /&gt;
**Run 1-2 ns NPT. Add/use &#039;&#039;&#039;&amp;quot;barostat MonteCarlo&amp;quot; in key.&#039;&#039;&#039;&lt;br /&gt;
**Check protein RMSD (esp. around binding pocket) from crystal structure after every step above. If any step gives large RMSD, redo that (and previous step) with longer/slower MD to correct the problems.   &lt;br /&gt;
*MD production run. For alchemical free energy, this involves setting the ligand group and various lambda values for ele and vdw to scale the interactions between ligand and surrounding (see below BAR section). &lt;br /&gt;
**use 2 fs with RESPA&lt;br /&gt;
**polar-eps 0.001 &lt;br /&gt;
**polar-predict&lt;br /&gt;
**neighbor-list&lt;br /&gt;
**&#039;&#039;&#039;barostat MonteCarlo&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Hydration or binding using BAR ==&lt;br /&gt;
&lt;br /&gt;
Alchemical free energy calculations are available in TINKER, Tinker9 GPU (TINKER-OpenMM no longer supported). One needs to specify the ligand or solute using the group keyword&amp;amp;nbsp;in the key file (example below). The lambda scaling schedule can be specified by user, automated by the &amp;quot;bar.x&amp;quot; in TINKER. For each set of lambda value (scaling the interaction betweem ligand and enviroemnt and inside ligand), one needs to perform one MD simulation. The bar.x is then used to analyze the dG between neighboring steps i and j, using the arc files from MD simulation i and j. The total free energy is then sum of 1-2, 2-3, ...N-1 and N.&amp;amp;nbsp;See this reference for examples: &#039;&#039;J Comput Chem. 2017 Sep 5;38(23):2047-2055&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note &#039;&#039;&#039;GPU MD and bar code&#039;&#039;&#039;&amp;amp;nbsp;is much faster than the CPU one&amp;amp;nbsp;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running BAR code in Tinker==&lt;br /&gt;
To compute free energy between two states (i and j), the bar.x (CPU or GPU) will need two trajectories (and two key files of course) of the same simulation length (frames). the two states can be neighboring lambda states in HFE or binding. &lt;br /&gt;
&lt;br /&gt;
See above (and PNAS 2008 paper) for BAR equations.&lt;br /&gt;
&lt;br /&gt;
Step 1 (bar option 1) is to generate two files, each contain the energy of its own state and perturbed energy (Eii, Eij). The second energy is using arc i and key of state j (bar will do this for you).&lt;br /&gt;
&lt;br /&gt;
 tinker9 bar 1 arc1 300 arc2 300 N &amp;gt; barfile &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;tinker 9 bar&amp;quot; is for GPU. You can replace with CPU version bar.x (slower). the arc1 and arc2 can be in different folders with their matching key files.&lt;br /&gt;
&lt;br /&gt;
Example barfile produced from this step: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.bar.&lt;br /&gt;
&lt;br /&gt;
The output below shows 500 frame used, 300K, for frame 1, energy of Eii, Eij and volume of the system (since we can do NPT where volume changes)&lt;br /&gt;
  500    300.00  comments&lt;br /&gt;
       1          -6396.8707        -6396.7580        27379.1152&lt;br /&gt;
&lt;br /&gt;
The second section of this same file will have Ejj, Eji, volume&lt;br /&gt;
&lt;br /&gt;
Step  2 (bar option 2) &lt;br /&gt;
Use the barfile produced from above to compute dG , dH and dS&lt;br /&gt;
 tinker9 bar 2 {barfile} {startsnapshot} {totalsnapshot} 1 {startsnapshot} {totalsnapshot} 1 &amp;gt; {enefile}&lt;br /&gt;
Note this step is much faster since it uses energy from above. You can also set to use a subset of the total frames, e.g. to exam how the dG converge with longer simulaitons.&lt;br /&gt;
Example out: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.ene&lt;br /&gt;
&lt;br /&gt;
== HFE ==&lt;br /&gt;
&lt;br /&gt;
Common keywords for hydration free energy calculation (suggest NPT with MC barostat or Langevin piston barostat)&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 a-axis 40&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 barostat Monte Carlo   #NPT. Use Langevin NPT if care e.g. membrane &lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA # 2-fs time step for solution; 1 for gas&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #openmp-threads    16 #this is for CPU&lt;br /&gt;
 Vdw-annihilation      #this is to help sampling conformation at low lambda by removing intrmol vdw interactions; not needed for rigid solute.&lt;br /&gt;
&lt;br /&gt;
The ele and vdw schedules are found in our previous paper. Also recommended as below. Note you can add or remove steps based dG results and error bars.&lt;br /&gt;
&lt;br /&gt;
Run NPT for each lambda below. 2-5 ns for each lambda typically depending how complex your system (eg, 2ns is sufficient for K+ in water but a large ligand mayneed 5ns). Use BAR-NPT to analyze free energy between neighboring lambda (ignore first 200 ps). The toal FE is the sum of each step. You can check cumulative free energy convergence as a function of simulation time. Add more MD if needed.&lt;br /&gt;
&lt;br /&gt;
Repeat the set of simulations for ligand in solution and ligand itself in gas phase (not necessary if gas energy is 0 like single ion). The gas phase part should use the matching keywords as above (but no a-axis, Ewald, and time step for constant T MD is 0.1fs).&lt;br /&gt;
&lt;br /&gt;
Typical lambda schedule:&lt;br /&gt;
&lt;br /&gt;
 Ele L	Vdw L&lt;br /&gt;
 0	0&lt;br /&gt;
 0	0.4&lt;br /&gt;
 0	0.5&lt;br /&gt;
 0	0.525&lt;br /&gt;
 0	0.55&lt;br /&gt;
 0	0.575&lt;br /&gt;
 0	0.6&lt;br /&gt;
 0	0.625&lt;br /&gt;
 0	0.65&lt;br /&gt;
 0	0.675&lt;br /&gt;
 0	0.7&lt;br /&gt;
 0	0.725&lt;br /&gt;
 0	0.75&lt;br /&gt;
 0	0.775&lt;br /&gt;
 0	0.8&lt;br /&gt;
 0	0.9&lt;br /&gt;
 0	1&lt;br /&gt;
 0.1	1&lt;br /&gt;
 0.2	1&lt;br /&gt;
 0.3	1&lt;br /&gt;
 0.4	1&lt;br /&gt;
 0.5	1&lt;br /&gt;
 0.6	1&lt;br /&gt;
 0.7	1&lt;br /&gt;
 0.8	1&lt;br /&gt;
 0.9	1&lt;br /&gt;
  1     1&lt;br /&gt;
&lt;br /&gt;
== binding free energy ==&lt;br /&gt;
&lt;br /&gt;
For host-guest binding, the simulation process similiar to above but involve two sets: one is host-guest-water, and the other guest-water. In both cases, guest is the ligand that is being scaled. For host-guest-water, one also applies&amp;amp;nbsp;a bond restraint between host and guest. This restraint can be turned off in one or two steps for lambda=1 but should be kept when L&amp;lt;1.&lt;br /&gt;
&lt;br /&gt;
 One way is to set the restraint K=0 when Lele, Lvdw=1, then K=90% when Lele=0.9/Lvdw=1, then K=100% when Lele=80%/Lvdw=1..... K=100% for all rest of L including L=0. &lt;br /&gt;
 The goal is for L=1 (host-guest full interaction), there is no restraint. when L=0, restraint is at 100%. The L=0 state seems &amp;quot;incorrect&amp;quot; due to the restraint but can be corrected (below).&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;bond&amp;quot; is between group of guest/ligand and group of host atoms. It is best to minimize the distance between the centers of the two groups (for sampling).  For example, if you are simulating an ion binding to a spherical cavity like CPP, you can pick 3 atoms on the host whose center is roughly the center of the ion; the restraint will be between the ion and this group. A correction is needed to &amp;quot;remove&amp;quot; the effect of this restraint and standard volume that goes into the final binding free energy.&#039;&#039;&#039;Tinker/utiity/freefix.f&#039;&#039;&#039; can be used to calculate the correction. Note this correction is typically positive (make binding energy less negative) since restraint leads to overestimation of binding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*The correction for lambda=0 from RTln(C0*V), where C0=1/1660 A^3 and V=integrate{4*pi*r^2*exp[-k*(r-r0)^2/RT]dr}. k=15 kcal/mol in the example below. If you are using a harmonic restraint (example below) and the equilibrium r0 is not 0, numerical integration is necessary. A good reference is JACS v126, NO. 24, 2004.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brandon setup script can also set up protein-lig distance restraint now. Basically select a central heavy atom on ligand (or a function group) and another group of nearby 3-4 Ca from protein.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Francis wrote a program to pick restraints based on Boresch paper. It can include additional angle and torsion restraints. However we found it is best to just use the simple distance restraints. The additional restraints may introduce bias towards ligand or host dynamics if not picked carefully.&amp;lt;/pre&amp;gt; [[Tinkergpu:get_rot_rest]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use distance restraint when lambda =1 for both ele and vdw, you can remove the effect of restraint from FEP or BAR; or you can avoid this correction if the restraint strength is set to 0 when the lambda =1 (gradually turned on when lambda-&amp;gt; 0 for both vdw and ele).&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 GROUP 1 -1 3 //ligand group&lt;br /&gt;
 GROUP 2 100, 102, 138 //protein group&lt;br /&gt;
 RESTRAIN-GROUPS  1  2  15.0  2.0 2.0&lt;br /&gt;
 Vdw-annihilation&lt;br /&gt;
 #lower bound &amp;amp; upper bound (2.0, 2.0) do not have to be the same. 15 is the force constant.&lt;br /&gt;
&lt;br /&gt;
Each set of lambda corresponds to one separate MD simulations of 5-10ns or longer. Save MD frames at every 3-5 ps. Use bar.x (bar_omm.x for GPU) to analyze the free energy dG between the neighboring lambda values.&lt;br /&gt;
&lt;br /&gt;
Unlike HFE, no need for gas-phase simulation since the end states of the ligand-water vs. ligand-protein cancels.&lt;br /&gt;
&lt;br /&gt;
Some scripts fron CW:&amp;amp;nbsp;[https://github.com/leucinw/ComputTools/tree/master/bardemo https://github.com/leucinw/ComputTools/tree/master/bardemo]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==ion HFE steps==&lt;br /&gt;
To compute ion hydration FE, &lt;br /&gt;
* prepare ion.xyz and waterbox.xyz. One key file containing all parameters (amoeba09.prm has ion and bunch of ions). If you have a new ion, add its parameters including multipoles, polarizability/damping, vdw &lt;br /&gt;
* water box should be ~50 A. A list of prebuilt water box (you many need to change atom types in xyz if you are using different key) https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#prebuilt_water_box &lt;br /&gt;
* use xyzedit to soak ion in water (see tutorial above about building and combining xyz)&lt;br /&gt;
* Run NPT for ~1ns to relax. See tutorial on this page about dynamics on GPU NPT keywords (using Langevin or MonteCarlo)&lt;br /&gt;
* Take the last relaxed structure to create inputs for HFE. Best to create a series of folders, one for each lambda with inputs and run scripts. See here for lambda schedule https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#HFE&lt;br /&gt;
* Get a list of nodes from Google spreadsheet of lab cluster. Ask for it if you can&#039;t find ~10 GPU nodes.&lt;br /&gt;
* each MD for ~2ns (add more if needed)&lt;br /&gt;
* Use a script to send jobs to each node. You can have 2 jobs concurrent on one GPU and rotate your jobs (~50 lambdas) through.&amp;lt;br /&amp;gt;&lt;br /&gt;
== hydration and binding free energy examples ==&lt;br /&gt;
&lt;br /&gt;
*Ethanol solvation free energy [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/01_solvation/Ethanol.zip download] &lt;br /&gt;
*PBP-phosphate binding [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/02_protein_ligand_binding/PBP_PO4.zip download] &lt;br /&gt;
&lt;br /&gt;
Please unzip the files and see README for instructions.&lt;br /&gt;
&lt;br /&gt;
== HFE and binding free energy calc using Brandon&#039;s script ==&lt;br /&gt;
&lt;br /&gt;
Set up from complex PDB and ligand xyz/key (POLTYE):&amp;amp;nbsp;[https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*create conda env according to instructions on the annihilator github page &lt;br /&gt;
*make&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;something like&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;/home/eew947/.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;with your username replacing mine everywhere in it &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;ssh&amp;lt;/code&amp;gt;&amp;amp;nbsp;to node you want to start from &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;source ~/.allpurpose.bashrc&amp;lt;/code&amp;gt; &lt;br /&gt;
*prepare&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;annihilator.ini&amp;lt;/code&amp;gt; &lt;br /&gt;
*if you want to use daemon, you have to add the keyword for it in annihilator *ini and have it already running before starting annihilator &lt;br /&gt;
*start annihilator by&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;nohup yourpathtoannihilatorhere/AMOEBAAnnihilatorModules/amoebaannihilator.py &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== OSRW ==&lt;br /&gt;
&lt;br /&gt;
Only implemented in tinker CPU. GPU version is under development.&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
&lt;br /&gt;
== Force Field Explorer ==&lt;br /&gt;
&lt;br /&gt;
By Mike Schneider and Jay Ponder, [http://dasher.wustl.edu http://dasher.wustl.edu] Can visualize the xyz and arc (MD trajectory) files; create and start TINKER calcualtions&lt;br /&gt;
&lt;br /&gt;
== VMD ==&lt;br /&gt;
&lt;br /&gt;
Choose TINKER format when open a xyz file. Trajectory file (.arc) also works.&lt;br /&gt;
&lt;br /&gt;
== Pymol ==&lt;br /&gt;
&lt;br /&gt;
Sometimes the xyz file can not be displayed correctly&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
[https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials]&lt;br /&gt;
&lt;br /&gt;
Please email me if you have tutorials related to AMOEBA or Tinker you would like to share.&lt;br /&gt;
&lt;br /&gt;
= AMOEBA Force Field Papers: =&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Fundamental theory of AMOEBA multipoles:&#039;&#039;&#039; ===&lt;br /&gt;
[[Tutorial:amm#Molecular Mechanics and Force Fields (AMOEBA, AMOEBA+)]]&lt;br /&gt;
&lt;br /&gt;
===AMEOBA FF:===&lt;br /&gt;
&lt;br /&gt;
#Water model: Ren, P. Y.; Ponder, J. W., Polarizable atomic multipole water model for molecular mechanics simulation. Journal of Physical Chemistry B &#039;&#039;&#039;2003&#039;&#039;&#039;, 107 (24), 5933-5947. &lt;br /&gt;
#Small molecules: Ren, P.; Wu, C.; Ponder, J. W., Polarizable Atomic Multipole-based Molecular Mechanics for Organic Molecules. J Chem Theory Comput &#039;&#039;&#039;2011&#039;&#039;&#039;, 7 (10), 3143-3161. &lt;br /&gt;
#Proteins: Shi, Y.; Xia, Z.; Zhang, J.; Best, R.; Wu, C.; Ponder, J. W.; Ren, P., The Polarizable Atomic Multipole-based AMOEBA Force Field for Proteins. J Chem Theory Comput &#039;&#039;&#039;2013&#039;&#039;&#039;, 9 (9), 4046-4063. &lt;br /&gt;
#DMP/TMP/Base &amp;amp; nucleic acids:&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
*Zhang, C.; Lu, C.; Wang, Q.; Ponder, J. W.; Ren, P., Polarizable Multipole-Based Force Field for Dimethyl and Trimethyl Phosphate. J Chem Theory Comput 2015, 11 (11), 5326-39. &lt;br /&gt;
*Zhang, C.; Bell, D.; Harger, M.; Ren, P., Polarizable Multipole-Based Force Field for Aromatic Molecules and Nucleobases. J Chem Theory Comput 2017, 13 (2), 666-678. &lt;br /&gt;
*Zhang, C.; Lu, C.; Jing, Z.; Wu, C.; Piquemal, J. P.; Ponder, J. W.; Ren, P., AMOEBA Polarizable Atomic Multipole Force Field for Nucleic Acids. J Chem Theory Comput 2018, 14 (4), 2084-2108. &lt;br /&gt;
&lt;br /&gt;
===AMOEBA+ model (water published, small and biomolecules in progress)===&lt;br /&gt;
&lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., AMOEBA+ Classical Potential for Modeling Molecular Interactions. J Chem Theory Comput 2019. &lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., Implementation of Geometry-Dependent Charge Flux into the Polarizable AMOEBA+ Potential. J Phys Chem Lett 2019, 11, 419-426.&lt;br /&gt;
&lt;br /&gt;
===AMOEBA+NN model: incorporating Neural Networks===&lt;br /&gt;
&lt;br /&gt;
Wang, Y., et al. (2024). &amp;quot;Incorporating Neural Networks into the AMOEBA Polarizable Force Field.&amp;quot; The Journal of Physical Chemistry B 128(10): 2381-2388.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Tinker Key File for AMOEBA+ Condensed Phase Simulations ===&lt;br /&gt;
 EWALD&lt;br /&gt;
 EWALD-CUTOFF      9.0 # for real space Ewald and charge penetration&lt;br /&gt;
 &lt;br /&gt;
 NEIGHBOR-LIST&lt;br /&gt;
 &lt;br /&gt;
 VDW-CUTOFF        12.0 # for vdw term&lt;br /&gt;
 CHGTRN-CUTOFF     12.0 # for charge transfer term&lt;br /&gt;
 VDW-CORRECTION&lt;br /&gt;
 &lt;br /&gt;
 INTEGRATOR  RESPA&lt;br /&gt;
 THERMOSTAT  BUSSI&lt;br /&gt;
 BAROSTAT    MONTECARLO&lt;br /&gt;
 &lt;br /&gt;
 POLAR-PREDICT&lt;br /&gt;
 POLAR-EPS 0.00001&lt;br /&gt;
&lt;br /&gt;
==Lectures on Force Field, AMOEBA, AMOEBA+==&lt;br /&gt;
Under &#039;&#039;&#039;Adv Mol Modeling&#039;&#039;&#039; menu:&lt;br /&gt;
 [[Tutorial:amm#Molecular_Mechanics_and_Force_Fields_(AMOEBA,_AMOEBA+) | Link]]&lt;br /&gt;
&lt;br /&gt;
= More Explicit Free Energy Calc Steps - Brandon Walker =&lt;br /&gt;
&lt;br /&gt;
Old/obsolete description here: [[Tinker-tut:free_eng_Bbdw|Obsolete description here]]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
	<entry>
		<id>https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2151</id>
		<title>Tutorial:tinkertut</title>
		<link rel="alternate" type="text/html" href="https://biomolmd.org/mw/index.php?title=Tutorial:tinkertut&amp;diff=2151"/>
		<updated>2025-12-17T16:33:04Z</updated>

		<summary type="html">&lt;p&gt;Brendan: /* Check your xyz/key files and common errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purposes =&lt;br /&gt;
This page provide tutorials on using AMOEBA force field via Tinker (CPU) and Tinker-OpenMM (GPU) programs.&lt;br /&gt;
&lt;br /&gt;
= Tutorials =&lt;br /&gt;
&lt;br /&gt;
Some simple tutorials about Tinker I used in my teaching below. Note you can directly download tinker source from https://github.com/TinkerTools/tinker&amp;lt;nowiki/&amp;gt;and executables from https://github.com/TinkerTools/tinker-ffe/releases/tag/v25.5 or  [https://dasher.wustl.edu/tinker/ https://dasher.wustl.edu/tinker/]&amp;amp;nbsp;(Windows, mac. Linux) for the following tutorials.&lt;br /&gt;
&lt;br /&gt;
You can either use command lines in Windows CMD window or Linux terminals, or use FFX interface for some exercises. &#039;&#039;&#039;Actually applications always use command lines to operate in Linux OS&#039;&#039;&#039;. If you are not familiar with Linux, this is the opportunity to practice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;[https://biomolmd.org/pren/tinker-tut/ &amp;lt;span style=&amp;quot;background-color:#ffff00;&amp;quot;&amp;gt;https://biomolmd.org/pren/tinker-tut/&amp;lt;/span&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Below you will find more detailed instructions and discussions.&lt;br /&gt;
&lt;br /&gt;
= Input files =&lt;br /&gt;
&lt;br /&gt;
You can find examples of input files in tinker distribution under tinker/bench, tinker/example or tinker/test. Two files are required to run TINKER calculations: *.xyz and *.key For example, open butane.xyz and butane.key in tinker/example/ (available in all official distributions) to see what’s inside.&lt;br /&gt;
&lt;br /&gt;
== *.xyz file ==&lt;br /&gt;
&lt;br /&gt;
*The first number on the 1st line is how many atoms total. &lt;br /&gt;
*There may be a second line that specify the box dimensions if the system is periodic (newer format since tinker 6) &lt;br /&gt;
*The first column is the atomic index &lt;br /&gt;
*The second column is the atomic symbol &lt;br /&gt;
*The 3 -5th columns are x,y,z coordinates in Angstrom &lt;br /&gt;
*The 6th is the “atom type” defined in the *.key file. This is the index tinker uses to assign parameters from the key/parameter file. &lt;br /&gt;
*The 7th – last columns are lists of atoms that are connected to the current atom&lt;br /&gt;
&lt;br /&gt;
== *.key file ==&lt;br /&gt;
&lt;br /&gt;
The key file may have all the actual parameters or a link to the actual parameters file specified in the first line. The parameters specify the bond, angle, torsion, vdW and electrostatic interactions between atoms based on the “atom type”. If you see an error related to OMP, please set the OPENMP-THREADS in the key file to a number less than the # of CPU cores on your computer. This sets how many CPU cores are used in the parallel execution.&lt;br /&gt;
&lt;br /&gt;
For example, in protein.key below, borrowed from tinker/bench/bench7.key, the first line specific the actual parameters are contain in the amoebapro13.prm. More examples can be found in tinker/bench, tinker/example, or tinker/test.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 parameters           $TINKERDIR/params/amoebapro13.prm&lt;br /&gt;
 # &lt;br /&gt;
 # the amoebapro13.prm is the AMOEBA protein force field in tinker/params/. If you have a ligand you can add the parameters below. More info below&lt;br /&gt;
 #&lt;br /&gt;
 # verbose                                  &#039;&#039;# printing info for every step, for debugging mostly&#039;&#039;&lt;br /&gt;
 #&lt;br /&gt;
 #randomseed            123456789&lt;br /&gt;
 integrator            respa                &#039;&#039;#this multi-time step integrator allows TINKER to use 2 fs time step&#039;&#039;&lt;br /&gt;
 #HEAVY-HYDROGEN                    #&#039;&#039;This will increase H atom mass automatically so 3 or 3.5 fs time step can be used.                          &#039;&#039;&lt;br /&gt;
 &amp;amp;nbsp;                                  #&#039;&#039;Kinetics will  be affected               &#039;&#039;&lt;br /&gt;
 neighbor-list                              &#039;&#039;# this below requires your box is twice the cutoff plus 2-3 Ang.&#039;&#039;&lt;br /&gt;
                                           # &#039;&#039;If your box is too small for vdw cutoff but OK for Ewald, you can use &amp;quot;mpole-list&amp;quot; here.&#039;&#039;&lt;br /&gt;
 #openmp-threads    16                       &#039;&#039;# how many core you want to use on the node.&#039;&#039;&lt;br /&gt;
 #&lt;br /&gt;
 #  Define the Periodic Box and Cutoffs&lt;br /&gt;
 #&lt;br /&gt;
 a-axis                62.23&lt;br /&gt;
 vdw-cutoff            12.0&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 #&lt;br /&gt;
 #  Set Parameters for Ewald Summation&lt;br /&gt;
 #&lt;br /&gt;
 ewald&lt;br /&gt;
 ewald-cutoff          7.0                  &#039;&#039;# we use such small cutoff because dipole/quadrupole die off faster than point charge.&#039;&#039;&lt;br /&gt;
 # pme-grid  64 64 64                         &#039;&#039;#If speed is a concern, set this mannually to be slightly bigger than simulation box size. E.g. use 64 is box is 62.23 (1.2x is the best but slower). &#039;&#039;&lt;br /&gt;
                                            &#039;&#039;Must be even with factors of only 2, 3 and 5. see source/kewald.f for a list. Sometimes the default grid size is conservative&#039;&#039; &lt;br /&gt;
 &#039;&#039;                                  &#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 #fft-package           FFTW&lt;br /&gt;
 #&lt;br /&gt;
 #  Set Parameters for Induced Dipole Convergence&lt;br /&gt;
 #&lt;br /&gt;
 #polarization OPT3                         #OPT4 is mre accurate but OPT3 is faster&#039;&#039;&#039;&lt;br /&gt;
 polar-eps             0.001                &#039;&#039;# the induced dipole convergence threshold&#039;&#039;&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #&lt;br /&gt;
 # Example of overwriting the parameters in the .prm file. The bond parameters between &lt;br /&gt;
 # atom classes 1 and 4 are redefined below, which&lt;br /&gt;
 # will overwrite those already in the amoebapro13.prm. &lt;br /&gt;
 #this is only for illustration purpose&lt;br /&gt;
 # bond          1    4          200.00     1.1&lt;br /&gt;
&lt;br /&gt;
= How to generate input files of your own =&lt;br /&gt;
&lt;br /&gt;
== proteins, nucleic acids, common organics ==&lt;br /&gt;
&lt;br /&gt;
In tinker/params, you can find pre-existing parameters for certain molecular systems, both AMOEBA, amber, charmm, opls, mmff, and mm2/3.&lt;br /&gt;
&lt;br /&gt;
If you want to build a peptide from a sequence, you can use tinker &amp;quot;protein.x&amp;quot; command, for example, ACE-ALA-NME, while create/use a tinker.key to specify which force field (with one line as below).&lt;br /&gt;
 parameters /path/to/amoebabio18.prm&lt;br /&gt;
&lt;br /&gt;
== PDB to xyz ==&lt;br /&gt;
&lt;br /&gt;
If you have a pdb file you can convert it tinker xyz file by specifying a prm file above. It will remove the heteroatoms such as ligand, which you can use POLTYPE to generate parameters for.&lt;br /&gt;
&lt;br /&gt;
First you need to determine the protonation state of charged residue. Tools like propka can do this quikly: [http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&lt;br /&gt;
&lt;br /&gt;
Once you decided the protonation state, make sure the residue name in PDB file match the protonation state (list below). For example, ASH is the neutral form of ASP. Then you can run &amp;quot;pdbxyz.x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;GLY&#039; &#039;ALA&#039; &#039;VAL&#039; &#039;LEU&#039; &#039;ILE&#039; &#039;SER&#039; &#039;THR&#039; &#039;CYS&#039; &#039;CYX&#039; &#039;CYD&#039; &#039;PRO&#039; &#039;PHE&#039; &#039;TYR&#039; &#039;TYD&#039; &#039;TRP&#039; &#039;HIS&#039; &#039;HID&#039; &#039;HIE&#039; &#039;ASP&#039; &#039;ASH&#039; &#039;ASN&#039; &#039;GLU&#039; &#039;GLH&#039; &#039;GLN&#039; &#039;MET&#039; &#039;LYS&#039; &#039;LYD&#039; &#039;ARG&#039; &#039;ORN&#039; &#039;AIB&#039; &#039;PCA&#039; &#039;UNK&#039;&lt;br /&gt;
&lt;br /&gt;
UNK means unownk; AIB, ORN and PCA&amp;amp;nbsp; are modified AA.&lt;br /&gt;
&lt;br /&gt;
[https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN https://www.ebi.ac.uk/pdbe/entry/pdb/3q9g/modified/ORN]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA http://www.ebi.ac.uk/pdbe/entry/pdb/4ua7/modified/PCA]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Terminal residue names:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
COH ACE NH2 NME&amp;amp;nbsp; FOR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HETATM&#039;&#039;&#039; (residue name) recoginzed by pdbxyz:&lt;br /&gt;
&lt;br /&gt;
HOH K CA MG NA CL&lt;br /&gt;
&lt;br /&gt;
== AMOEBA library ==&lt;br /&gt;
&lt;br /&gt;
For AMOEBA, please use amoeba09.prm for common small molecules, amoebapro13.prm for proteins. Nucleic acid parameters coming soon (end of 2017). More information here: [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Amoeba http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Amoeba]&lt;br /&gt;
&lt;br /&gt;
If you have a protein, you use &amp;quot;pdbxyz&amp;quot; to convert it to tinker xyz file. It will ask you for a key file (1bty.key below) or you can create a key file with &amp;quot;parameters $TINKERDIR/params/amoebapro13.prm&amp;quot; in it:&lt;br /&gt;
&lt;br /&gt;
 pdbxyz 1bty.pdb -k ./1bty.key&lt;br /&gt;
&lt;br /&gt;
== AMOEBA for a new ligand ==&lt;br /&gt;
&lt;br /&gt;
Note that pdbxyz recognize proteins, water (res name HOH and some ions). The ligand (benzamidine above) is stripped. For that you need to derive your own parameters. For AMOEBA this can be done using POLTYPE: [https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype https://biomol.bme.utexas.edu/wiki/index.php/Research_ex:Poltype]&lt;br /&gt;
&lt;br /&gt;
 Input: ligand.sdf or ligand.pdb (for example, you can truncate the ligand &amp;quot;BEN&amp;quot; out of the 1bty.pdb) &lt;br /&gt;
 Output: will produce the xyz and corresponding key files (ttt.xyz and ttt.key):&lt;br /&gt;
&lt;br /&gt;
If you will merge the ligand xyz file with another molecule, &#039;&#039;&#039;make sure you set the suitable range for atom types (an option for pOLTYPE) so that they won&#039;t overlap.&#039;&#039;&#039; See the &amp;quot;Check the results section&amp;quot; on POLTYPE website before using them. Use &amp;quot;analyze.x&amp;quot; to make sure the xyz and key files work correctly: &amp;quot;analyze.x ttt.xyz -k ttt.key ep&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== build a solvent box ==&lt;br /&gt;
&lt;br /&gt;
=== arbirary solvent ===&lt;br /&gt;
&lt;br /&gt;
Use xyzedit.x to build a water (or any solvent) box starting from a water monomer (e.g. tinker/test/water.xyz). You can specify many monomers to add and how big the box is. Type xyzedit.x at the command line and you will be asked to enter relevant inputs (or you may type all the parameters in one line).&lt;br /&gt;
&lt;br /&gt;
Make sure edit the key file to add box size and Ewald related keywords (see [http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file http://biomol.bme.utexas.edu/tinker-openmm/index.php/TINKER-OPENMM:Tinker-tut#.2A.key_file])&lt;br /&gt;
&lt;br /&gt;
=== prebuilt water box ===&lt;br /&gt;
&lt;br /&gt;
Some prebuilt waterboxs:&amp;amp;nbsp;[http://biomol.bme.utexas.edu/~pren/downloads/waterbox http://biomol.bme.utexas.edu/~pren/downloads/waterbox]&lt;br /&gt;
&lt;br /&gt;
Larger boxes can be created as supercells of smaller boxes, e.g. this following command will create a box 64x larger than the orignial box.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -e &amp;quot;5\n4\n\n&amp;quot; | crystal.x watersmall.xyz -k tinker.key&lt;br /&gt;
== Combining two xyz files ==&lt;br /&gt;
&lt;br /&gt;
Tinker &amp;quot;xyzedit.x&amp;quot; program (option 20) can be used to combine two xyz files into one (matching key file for each xyz is required). You can merge the key or parameter files by appending one to the other, but please make sure the atom types are not overlapping between the two.&lt;br /&gt;
&lt;br /&gt;
For the above 1BTY example, poltype will translate/rotate the ligand in standard orientation. You may need a script to copy the coordinates from ligand.pdb into ttt.xyz (hwich you get out of the POLTYPE run).&lt;br /&gt;
&lt;br /&gt;
Then you can use xyzedit.x to combine 1bty.xyz and lig.xyz into one xyz file with the two molecules orient/position as in PDB. Merge the key file by appending ttt.key (except the first line which contains header already in amoebapro13.prm of 1bty.key) to 1bty.key; again avoid overlapping atom types between the ligand and protein.&lt;br /&gt;
&lt;br /&gt;
== Soaking solute in solvent ==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;Tinker &amp;quot;xyzedit.x&amp;quot; is an interactive program (option 20) that can be used for this as well. You just need a molecule.xyz and waterbox.xyz along with matching key files (actual names do not matter).&lt;br /&gt;
&lt;br /&gt;
Some water files (monomers, boxes) are in tinker/example or test folder. One can make a water box of different size using this program too (starting from one water or a cluster of water and use option 19). Option 21 can add ions to solvent box. To distiguish between AMOEBA or fixed charged FF simulation files, check the key file to see which prm file it is pointing to.&lt;br /&gt;
&lt;br /&gt;
Or you can use this utility: [http://www.ime.unicamp.br/~martinez/packmol/home.shtml http://www.ime.unicamp.br/~martinez/packmol/home.shtml]&lt;br /&gt;
&lt;br /&gt;
On renlab cluster, there is &amp;quot;packmol&amp;quot; installed at /home/liuchw/Softwares/packmol-20.14.4/packmol&lt;br /&gt;
&lt;br /&gt;
Two examples for generating a cubic box:&lt;br /&gt;
&lt;br /&gt;
example 1: generate a pure liquid box, using water as an example. In the real cases, one could calculate the number of molecules and the length of the cube according to desired density. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output water-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;example 2: soak a MeOH molecule into the above box. We first let MeOH be in the center of the box with coordinates (9,9,9), and then soak with water in 18.6 A cubic box. &amp;lt;syntaxhighlight lang=&amp;quot;abap&amp;quot;&amp;gt;&lt;br /&gt;
filetype tinker&lt;br /&gt;
output liquid-box.xyz&lt;br /&gt;
tolerance 2.0&lt;br /&gt;
&lt;br /&gt;
structure MeOH.xyz&lt;br /&gt;
number 1&lt;br /&gt;
center&lt;br /&gt;
fixed 9.0 9.0 9.0 0.0 0.0 0.0&lt;br /&gt;
end structure&lt;br /&gt;
&lt;br /&gt;
structure Wat.xyz&lt;br /&gt;
number 216&lt;br /&gt;
inside cube 0. 0. 0. 18.6&lt;br /&gt;
end structure&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the above two examples, all one needs are the &amp;quot;Wat.xyz&amp;quot; and &amp;quot;MeOH.xyz&amp;quot; files. After the box is generated, it is straightforward to use Tinker to minimize the structure. &lt;br /&gt;
&lt;br /&gt;
After construct the simulations, relax the system using minimize and dynamics (restraint the solute first), with proper restraints and heating. See [[Tutorial:tinkertut#MD_setup-initial_equilibration|MD setup]] for details&lt;br /&gt;
&lt;br /&gt;
== Check your xyz/key files and common errors ==&lt;br /&gt;
&lt;br /&gt;
Once you have a pair of xyz and key (and prm file the key uses one), you can use &amp;quot;analyze&amp;quot; to do some basic check&lt;br /&gt;
&lt;br /&gt;
analyze xxx.xyz -k xxx.key e&amp;quot; will print energy and its components.&lt;br /&gt;
&lt;br /&gt;
 If there are any error related to missing parameters, you need to fix them. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key em&amp;quot; prints total charge and dipole moments etc.&lt;br /&gt;
&lt;br /&gt;
 The total charge should match your expectation (0, -1, +1) etc&lt;br /&gt;
 If this is a box of solute in water, you should add neutralizing ions (K+ or Cl-) and then &amp;quot;additional&amp;quot; 0.1 mM KCl. So the next charge should be 0!&lt;br /&gt;
&lt;br /&gt;
&amp;quot;analyze xxx.xyz -k xxx.key ep&amp;quot; prints all parameters&lt;br /&gt;
&lt;br /&gt;
 Check if every atom has a multipole (number of multipole matches no of atoms) &lt;br /&gt;
 check if every atom has vdw (if an atom has 0.000 0.000 for vdw R and eps, that means the vdw parameters are missing; need to add) &lt;br /&gt;
 check polarization groups are making sense. If you see every atom is its own group, this is likely wrong. Typically we keep each function group (e.g. benzyl) as one group. &lt;br /&gt;
&lt;br /&gt;
analyze with EL will print out large interactions, for example large ele or vdw interactions of two atoms that are too close (in early PDB structure this can happen)&lt;br /&gt;
&lt;br /&gt;
analyze with &amp;quot;ED&amp;quot; option (debug) will print out all individual interactions and lot more information. The output&amp;amp;nbsp;is of course huge if you do this to a large bix, but you can use &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;vdwterm only, bondterm only, angleterm only. multipoleterm only, polarizeterm only, etc&amp;lt;/span&amp;gt;&#039;&#039;&#039; to check a specific energy component. Or use &#039;&#039;&#039;bondterm none, angleterm none&#039;&#039;&#039;....ect to turn off some interactions you don&#039;t want to check. A full list of xxxTERM can be found in &amp;lt;span style=&amp;quot;color:#2980b9;&amp;quot;&amp;gt;&#039;&#039;&#039;tinker/source/prmkey.f&#039;&#039;&#039;&amp;lt;/span&amp;gt;(grep TERM).&lt;br /&gt;
=== Induced dipole not converging error ===&lt;br /&gt;
&lt;br /&gt;
If analyze give you error related to induced dipole not converging, the structure is bad. If you see &amp;quot;induced dipole not converging&amp;quot; error in the beginning of your MD, it is also due to bad structures (atoms too close). The structure needs refinement, or missing parameters above. To refine the structure&lt;br /&gt;
&lt;br /&gt;
1. minimize the structure. you can turn off polarization (polarizeterm none) or even permanent ele completely (multipoleterm none &amp;amp; polarizeterm none) first to minimize using vdw to move close atoms apart. Then turn on multipole and then induce back&lt;br /&gt;
&lt;br /&gt;
2 For MD simulations of protein/RNA/DNA in water, run MD first at low T with pro/rna/dna &amp;quot;heavy atoms&amp;quot; restrained (e.g. restrain-position -1 1000 5.0 or restrain-position 2 , , , 1.0) to let water &amp;amp; counter ions to relax for few ns. Then gradually heat up and remove the restraints. &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#d35400;&amp;quot;&amp;gt;Note &amp;quot;restrain-position -1 1000 0.0&amp;quot; or &amp;quot;restrain-position 2 , , , 0.0&amp;quot; DOENOT mean 0 restraint (k=0.0) on atoms 1 to 1000 or atom 2!!!&amp;amp;nbsp; &amp;quot;0.0&amp;quot; is replaced by 100.0 in tinker by default.&amp;lt;/span&amp;gt;&#039;&#039;&#039; If you don&#039;t want restraint, comment out/remove these lines.&lt;br /&gt;
&lt;br /&gt;
3. But if you see this error randomly over few hundreds of ps, which may happen for tough systems of large/many charges e.g DNA/RNA, you can add &amp;quot;&amp;lt;span style=&amp;quot;color:#e74c3c;&amp;quot;&amp;gt;&#039;&#039;&#039;USOLVE-CUTOFF 0.0&#039;&#039;&#039;&amp;lt;/span&amp;gt;&amp;quot; option to key. This will change the precondition behavior and make induced dipole solver more stable. It is not used by default because for &amp;quot;easy&amp;quot; systems like boxes of water, this makes MD little slower (more iterations to converge induced dipoles). If still have stability issue you may further add &amp;quot;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:#e67e22;&amp;quot;&amp;gt;USOLVE-DIAG xx&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;quot; where xx is 2.0 by default and a smaller number towards 1 (e.g. 1.5) will make more stable but slightly slower.&lt;br /&gt;
&lt;br /&gt;
4. If system is rather big,&amp;amp;nbsp;use &amp;quot;polar-eps 0.01&amp;quot; or 0.001 during system setup and 0.0001 for production.&lt;br /&gt;
&lt;br /&gt;
== Modified PRO &amp;amp; NA residues ==&lt;br /&gt;
&lt;br /&gt;
=== Build a structure with modified residues ===&lt;br /&gt;
&lt;br /&gt;
Modify residues in a PDB file.&lt;br /&gt;
&lt;br /&gt;
Input: PDB files of the biopolymer, an original residue and a modified residue. The original residue must be present in the biopolymer, and the modified residue must share at least 3 atoms with the original residue with identical coordinates. The modified residue is usually obtained by manually modifying the original residue.&lt;br /&gt;
&lt;br /&gt;
Output: A PDB file with specified residues modified to the new residue. [https://biomol.bme.utexas.edu/~zj2244/tutorial/modeling/modres/modified_pdb/ link]&lt;br /&gt;
&lt;br /&gt;
 # change residues 2 and 14 in dna15.pdb from res_A to res_pA&lt;br /&gt;
 morphling.py -i dna15.pdb -o pdna15.pdb -t0 res_A.pdb -t1 res_pA.pdb -n 2,14&lt;br /&gt;
&lt;br /&gt;
=== Convert pdb to xyz ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/zjing7/modified-na link]&lt;br /&gt;
&lt;br /&gt;
= More on running Tinker and tinker9 (GPU) =&lt;br /&gt;
==Manual==&lt;br /&gt;
https://tinkerdoc.readthedocs.io/en/latest/&lt;br /&gt;
&lt;br /&gt;
== Compiling &amp;amp; running: ==&lt;br /&gt;
[[Software:tinkergpu]] &lt;br /&gt;
&lt;br /&gt;
== Command line ==&lt;br /&gt;
&lt;br /&gt;
Tinker programs can be run interactively, which is the best way to learn what are the required inputs. Tinker programs can also run in background with all parameters specified, for the purpose of automation:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;analyze.x ttt.xyz -k ttt.key ep&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;dynamic.x bench7 100000 3.0 6.0 2 298.0 N &amp;gt; ben7.log &amp;amp;&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;# the bench7.xyz above can be found in tinker official distribution inside tinker/bench/&#039;&#039;&lt;br /&gt;
 #2-fs time step for MD here is ok because of the &amp;quot;integrator respa&amp;quot; in the key file&lt;br /&gt;
&lt;br /&gt;
Or for tinker9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #source /home/liuchw/.bashrc.tinker9&lt;br /&gt;
 #export TINKER9=/home/pren/tinker9/tinker9_sugar/build/&lt;br /&gt;
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib/&lt;br /&gt;
 export CUDA_DEVICE_ORDER=PCI_BUS_ID&lt;br /&gt;
 export CUDA_VISIBLE_DEVICES=0 # device number; can use 1 or 2 if there are multiple GPU cards&lt;br /&gt;
 $TINKER9/tinker9 dynamic bench7.xyz -k bench7.key 5000 2.0 1000.0 4 298.15 1.0 N &amp;gt; out &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Pause and resume MD ==&lt;br /&gt;
&lt;br /&gt;
Tinker creates .dyn file that contains coordinates and velocities needed for restart MD. To stop MD, simply create a .end file (e.g. touch myrun.end) in the folder where MD is running. At the next time MD frame was written, the end file will signal Tinker to stop. To resume later simply rerun dynamics with the presence of the .dyn file. Note the output file of dynamics does not resume the count of MD steps/frames.&lt;br /&gt;
&lt;br /&gt;
== Additional notes for &amp;quot;tinker-openmm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
*It s recommended to use the respa inetgrator and 2-fs time step &lt;br /&gt;
*&amp;quot;heavy-hydrogen&amp;quot; in key file allows a 3-fs time step (not reommended) &lt;br /&gt;
*Bussi thermostat &lt;br /&gt;
*Only MC barostat is available for now. We are adding virial/Langevin piston pressure to openmm.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to specify different ensembles for MD simulation =&lt;br /&gt;
&lt;br /&gt;
== For TINKER-openmm ==&lt;br /&gt;
&#039;&#039;&#039;Tinker-Openmm is no longer supported since 2021. Use tinker9 for GPU MD (see [[Software:tinkergpu|Tinker GPU]])&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not many options available.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
For NVT, use Bussi for thermostat, RESPA integrator (2fs)&lt;br /&gt;
&lt;br /&gt;
For NPT, use Montecarlo for Barostat, Bussi thermostat. Verlet (1 fs) is safer than RESPA for use with MC barostat if very accurate density is needed.&lt;br /&gt;
&lt;br /&gt;
See below for keyword syntax.&lt;br /&gt;
&lt;br /&gt;
== Available thermostat and barostat in TINKER (2021) ==&lt;br /&gt;
&lt;br /&gt;
Thermostats:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD (lines you add to .key file)&lt;br /&gt;
 Bussi-Parrinello           thermostat bussi&lt;br /&gt;
 Berendsen                  thermostat berendsen&lt;br /&gt;
 Andersen Stochastic        thermostat andersen&lt;br /&gt;
 Nose-Hoover                thermostat nose-hoover&lt;br /&gt;
&lt;br /&gt;
There are 3 barostats available via the “barostat” keyword:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Berendsen                  barostat berendsen&lt;br /&gt;
 Monte-Carlo                barostat montecarlo&lt;br /&gt;
 Lagevin                    Barostat Langevin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above thermostat and barostats are available for the Verlet, Beeman and RESPA integrators, and can be used in combination with those integrators. These integrators are available via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                     KEYWORD&lt;br /&gt;
 Verlet                     integrator verlet&lt;br /&gt;
 Beeman                     integrator beeman (tinker 8 CPU only)&lt;br /&gt;
 RESPA                      integrator respa&lt;br /&gt;
&lt;br /&gt;
Note that the &#039;&#039;&#039;defaults&#039;&#039;&#039; are Bussi for thermostat, Berendsen for barostat, and Beeman for integrator.&lt;br /&gt;
&lt;br /&gt;
Then there are two special integrators, a stochastic one, and a Nose-Hoover that does NPT. The stochastic integrator uses a kind of Langevin temperature bath for thermostating, and does listen to the barostat keyword. The Nose-Hoover integrator uses a separate code branch and does only NPT with Nose-Hoover methods following Martyna-Tuckerman-Klein. You can get these via:&lt;br /&gt;
&lt;br /&gt;
 METHOD                      KEYWORD&lt;br /&gt;
 Stochastic                   integrator stochastic (no need for other T control)&lt;br /&gt;
 Nose-Hoover NPT             integrator nose-hoover (no need other keywords for T or P; starting structures need to reasonable)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Recommended NVT and NPT combinations&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
NVT keywords combination in the key file (2fs time step)&lt;br /&gt;
&lt;br /&gt;
 thermostat bussi &lt;br /&gt;
 integrator RESPA&lt;br /&gt;
&lt;br /&gt;
Preferred/Recommended NPT (2fs, relative isotropic and homogenous systems)&lt;br /&gt;
&lt;br /&gt;
 archive (&#039;&#039;&#039;dcd-archive&#039;&#039;&#039; to produce compressed traj for large systems; need .xyz or .pdb to render in VMD)&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
 barostat MonteCarlo&lt;br /&gt;
 integrator RESPA&lt;br /&gt;
 vdw-cutoff 9 (12 for amoeba)&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 9.0 (7.0 for amoeba)&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001 (only for amoeba)&lt;br /&gt;
 polar-predict (only for amoeba)&lt;br /&gt;
&lt;br /&gt;
Recommended NPT for anisotropic systems such as membrane, or large local volume fluctuation in protein folding. Slower than above for virial calculations)&lt;br /&gt;
&lt;br /&gt;
Documentation: https://tinkerdoc.readthedocs.io/en/latest/text/feature/integrator-langevin-piston.html#implementation-2 &lt;br /&gt;
Semi-isotropic pressure control not finished yet&lt;br /&gt;
&lt;br /&gt;
 barostat Langevin&lt;br /&gt;
 Integrator RESPA   #or Verlet/1 fs; T control not needed&lt;br /&gt;
 a-axis 40 #change this to your actual box size; b or c can be different from a&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Alternative NPT (1fs, built in P and T control)&lt;br /&gt;
&lt;br /&gt;
 integrator nose-hoover&lt;br /&gt;
&lt;br /&gt;
== Recommended keywords (add somewhere in the .key file) for NVT ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
 thermostat bussi&lt;br /&gt;
&lt;br /&gt;
Command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 2 298  (100000 steps, 2.0 fs time step, dump structure every 1.0 ps, option 2 is NVT, 298 is the target T)&lt;br /&gt;
&lt;br /&gt;
It is also possible to combine &amp;quot;&#039;&#039;&#039;integrator Beeman&#039;&#039;&#039;&amp;quot; or &#039;&#039;&#039;&amp;quot;thermostat Berendsen”&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;thermostat Andersen&amp;quot;&#039;&#039;&#039;. But RESPA allows large time steps (2.0 or 2.5 fs) than Beeman. Berendsen thermostat does not provide canonical ensemble fluctuation.&lt;br /&gt;
&lt;br /&gt;
== NVE ==&lt;br /&gt;
&lt;br /&gt;
 integrator respa&lt;br /&gt;
&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
 dynamic xxx.xyz 100000 2.0 1.0 1&lt;br /&gt;
&lt;br /&gt;
No need for thermostat or barostat of course. It is best to use smaller time step such as 1.0fs to conserve energy better. May even use smaller polar-eps (10^-6) than default (10^-5) in the key file.&lt;br /&gt;
&lt;br /&gt;
== Non periodic system, e.g. gas molecules not in a box ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;_&amp;quot; style=&amp;quot;background:#eee; border:1px solid #ccc; padding:5px 10px&amp;quot;&amp;gt;integrate stochastic&amp;lt;/div&amp;gt; &lt;br /&gt;
If there is no box (a-axis) in the key file, or no box dimensions in the den file, the system is non-periodic. This will set the stochastic temperature control along with the stochastic MD integration. &#039;&#039;&#039;For gas phase molecular cluster (very few atoms), the recommended time step is 0.1 fs&#039;&#039;&#039;.&lt;br /&gt;
= Free energy calculations =&lt;br /&gt;
&lt;br /&gt;
Theory about free energy calculation: http://alchemistry.org/wiki/Bennett_Acceptance_Ratio&lt;br /&gt;
&lt;br /&gt;
About AMOEBA softcore and BAR, read our book chapter: &lt;br /&gt;
&lt;br /&gt;
[[File:PL_BAR_softcore.pdf|page=3|300px]]&lt;br /&gt;
&lt;br /&gt;
== MD setup-initial equilibration ==&lt;br /&gt;
&lt;br /&gt;
Determine protonation state of ionizable groups (ASP, GLU, LYS, ARG, HIS). Use propka here&amp;amp;nbsp;[http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/ http://nbcr-222.ucsd.edu/pdb2pqr_2.0.0/]&amp;amp;nbsp;for proteins. For ligand, you may use pka predicction tool&amp;amp;nbsp;from Chemaxon. &lt;br /&gt;
*Add water and counter ions (neutralize system) so that the density is ~1.0 g/cc. The distance between protein and box wall should be&amp;amp;nbsp;10-15 A. Check/remove extra water in the binding pocket as necessary (keep the crystal water molecules in the pocket) &lt;br /&gt;
*In the key file, set&amp;amp;nbsp;PME-grid&amp;amp;nbsp;to be&amp;amp;nbsp;1.2x&amp;amp;nbsp;box size in Ang. For example, if box size is 55, “pme-grid&amp;amp;nbsp;64 64 64” is enough. The default of Tinker is usually more conservative. See kewald.f for allowed grid values. Add &#039;&#039;&#039;“neighbor-list”, “polar-eps 0.01”, “vdw-cutoff&amp;amp;nbsp;12”, &amp;quot;vdw-correction&amp;quot; “integrator respa”, “ewald”, “ewald-cutoff 7.0” &#039;&#039;&#039;&amp;amp;nbsp;to .key file. You can even turn off polarization initially (polarizeterm NONE) during EQ and add it back (&#039;&#039;&#039;polar-eps 0.001&#039;&#039;&#039; or tighter for production) &lt;br /&gt;
*Minimize the box before MD. If you see errors related to polarization (induced dipole not converge), do this in two steps: first minimize with electrostatic (multipoleterm NONE) and polarization turned off (polarizeterm NONE in .key file), to ~5.0 or lower; then minimize again with ele then ele+polarization back on to ~2.0 or lower. You may use position-restraints&amp;amp;nbsp;&#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; if you don&#039;t want your solute to undergo dramtic changes. (RESTRAIN-POSITION -1 200 50.0, means restrain atoms 1 to 200 using a force constant of K=50 kcal/mol).&amp;amp;nbsp; &lt;br /&gt;
*MD relaxation. You may use GPU for MD now (dynamic_omm.x).&amp;amp;nbsp;Use repsa integrator and 2fs time step.&amp;amp;nbsp;Add&amp;amp;nbsp;&#039;&#039;&#039;position-restraints&#039;&#039;&#039; to restrain protein &amp;amp; ligands &#039;&#039;&#039;(HEAVY ATOMS only)&#039;&#039;&#039; in the key file&amp;amp;nbsp;initially; For metal ion-protein binding or weak binding ligand,&amp;amp;nbsp;we&amp;amp;nbsp;also suggest to use ~3 distance restraints between ion/ligand and first shell atoms. This is to prevent water disrupt the initial solute structure during the equilibration.&amp;amp;nbsp; &lt;br /&gt;
**Use 2 fs for all MD below.&amp;amp;nbsp;If you want to use 3fs (e.g. for large systems),&amp;amp;nbsp;you need to&amp;amp;nbsp;&amp;quot;heavy-hydrogen&amp;quot; in the key file.&amp;amp;nbsp;Another way to speed up is to use the OPTx: &amp;quot;polarization OPT4&amp;quot; or &amp;quot;polarization OPT3&amp;quot; OPT3 is faster but bigger error.&lt;br /&gt;
**Use &amp;quot;polar-eps 0.01&amp;quot; and &amp;quot;polar-predict&amp;quot; for equilibration for speed. For production use &amp;quot;polar-eps 0.001&amp;quot; or &amp;quot;0.0001&amp;quot;.&lt;br /&gt;
**use &amp;quot;neighbor-list&amp;quot;&lt;br /&gt;
**With the positional/distance restraints, run ~2ns&amp;amp;nbsp; NVT MD to gradually (e.g. exponentially) heat up the system from 10K&amp;amp;nbsp; to 298K or whatever expt T should be. Water/ions are relaxed after this step.&lt;br /&gt;
**Run NVT at 298K or expt T for ~2ns &#039;&#039;&#039;while gradually turning off all the position and distance restraints on protein-ligands.&#039;&#039;&#039; &lt;br /&gt;
**Run 1-2 ns NPT. Add/use &#039;&#039;&#039;&amp;quot;barostat MonteCarlo&amp;quot; in key.&#039;&#039;&#039;&lt;br /&gt;
**Check protein RMSD (esp. around binding pocket) from crystal structure after every step above. If any step gives large RMSD, redo that (and previous step) with longer/slower MD to correct the problems.   &lt;br /&gt;
*MD production run. For alchemical free energy, this involves setting the ligand group and various lambda values for ele and vdw to scale the interactions between ligand and surrounding (see below BAR section). &lt;br /&gt;
**use 2 fs with RESPA&lt;br /&gt;
**polar-eps 0.001 &lt;br /&gt;
**polar-predict&lt;br /&gt;
**neighbor-list&lt;br /&gt;
**&#039;&#039;&#039;barostat MonteCarlo&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
== Hydration or binding using BAR ==&lt;br /&gt;
&lt;br /&gt;
Alchemical free energy calculations are available in TINKER, Tinker9 GPU (TINKER-OpenMM no longer supported). One needs to specify the ligand or solute using the group keyword&amp;amp;nbsp;in the key file (example below). The lambda scaling schedule can be specified by user, automated by the &amp;quot;bar.x&amp;quot; in TINKER. For each set of lambda value (scaling the interaction betweem ligand and enviroemnt and inside ligand), one needs to perform one MD simulation. The bar.x is then used to analyze the dG between neighboring steps i and j, using the arc files from MD simulation i and j. The total free energy is then sum of 1-2, 2-3, ...N-1 and N.&amp;amp;nbsp;See this reference for examples: &#039;&#039;J Comput Chem. 2017 Sep 5;38(23):2047-2055&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note &#039;&#039;&#039;GPU MD and bar code&#039;&#039;&#039;&amp;amp;nbsp;is much faster than the CPU one&amp;amp;nbsp;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running BAR code in Tinker==&lt;br /&gt;
To compute free energy between two states (i and j), the bar.x (CPU or GPU) will need two trajectories (and two key files of course) of the same simulation length (frames). the two states can be neighboring lambda states in HFE or binding. &lt;br /&gt;
&lt;br /&gt;
See above (and PNAS 2008 paper) for BAR equations.&lt;br /&gt;
&lt;br /&gt;
Step 1 (bar option 1) is to generate two files, each contain the energy of its own state and perturbed energy (Eii, Eij). The second energy is using arc i and key of state j (bar will do this for you).&lt;br /&gt;
&lt;br /&gt;
 tinker9 bar 1 arc1 300 arc2 300 N &amp;gt; barfile &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;tinker 9 bar&amp;quot; is for GPU. You can replace with CPU version bar.x (slower). the arc1 and arc2 can be in different folders with their matching key files.&lt;br /&gt;
&lt;br /&gt;
Example barfile produced from this step: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.bar.&lt;br /&gt;
&lt;br /&gt;
The output below shows 500 frame used, 300K, for frame 1, energy of Eii, Eij and volume of the system (since we can do NPT where volume changes)&lt;br /&gt;
  500    300.00  comments&lt;br /&gt;
       1          -6396.8707        -6396.7580        27379.1152&lt;br /&gt;
&lt;br /&gt;
The second section of this same file will have Ejj, Eji, volume&lt;br /&gt;
&lt;br /&gt;
Step  2 (bar option 2) &lt;br /&gt;
Use the barfile produced from above to compute dG , dH and dS&lt;br /&gt;
 tinker9 bar 2 {barfile} {startsnapshot} {totalsnapshot} 1 {startsnapshot} {totalsnapshot} 1 &amp;gt; {enefile}&lt;br /&gt;
Note this step is much faster since it uses energy from above. You can also set to use a subset of the total frames, e.g. to exam how the dG converge with longer simulaitons.&lt;br /&gt;
Example out: https://github.com/leucinw/autoBAR/blob/main/examples/Phenol-HFE/liquid/liquid-e000-v000.ene&lt;br /&gt;
&lt;br /&gt;
== HFE ==&lt;br /&gt;
&lt;br /&gt;
Common keywords for hydration free energy calculation (suggest NPT with MC barostat or Langevin piston barostat)&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 a-axis 40&lt;br /&gt;
 vdw-cutoff 12&lt;br /&gt;
 vdw-correction&lt;br /&gt;
 Ewald&lt;br /&gt;
 Ewald-cutoff 7.0&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 barostat Monte Carlo   #NPT. Use Langevin NPT if care e.g. membrane &lt;br /&gt;
 thermostat Bussi&lt;br /&gt;
 Integrator RESPA # 2-fs time step for solution; 1 for gas&lt;br /&gt;
 neighbor-list&lt;br /&gt;
 polar-eps 0.0001&lt;br /&gt;
 polar-predict&lt;br /&gt;
 #openmp-threads    16 #this is for CPU&lt;br /&gt;
 Vdw-annihilation      #this is to help sampling conformation at low lambda by removing intrmol vdw interactions; not needed for rigid solute.&lt;br /&gt;
&lt;br /&gt;
The ele and vdw schedules are found in our previous paper. Also recommended as below. Note you can add or remove steps based dG results and error bars.&lt;br /&gt;
&lt;br /&gt;
Run NPT for each lambda below. 2-5 ns for each lambda typically depending how complex your system (eg, 2ns is sufficient for K+ in water but a large ligand mayneed 5ns). Use BAR-NPT to analyze free energy between neighboring lambda (ignore first 200 ps). The toal FE is the sum of each step. You can check cumulative free energy convergence as a function of simulation time. Add more MD if needed.&lt;br /&gt;
&lt;br /&gt;
Repeat the set of simulations for ligand in solution and ligand itself in gas phase (not necessary if gas energy is 0 like single ion). The gas phase part should use the matching keywords as above (but no a-axis, Ewald, and time step for constant T MD is 0.1fs).&lt;br /&gt;
&lt;br /&gt;
Typical lambda schedule:&lt;br /&gt;
&lt;br /&gt;
 Ele L	Vdw L&lt;br /&gt;
 0	0&lt;br /&gt;
 0	0.4&lt;br /&gt;
 0	0.5&lt;br /&gt;
 0	0.525&lt;br /&gt;
 0	0.55&lt;br /&gt;
 0	0.575&lt;br /&gt;
 0	0.6&lt;br /&gt;
 0	0.625&lt;br /&gt;
 0	0.65&lt;br /&gt;
 0	0.675&lt;br /&gt;
 0	0.7&lt;br /&gt;
 0	0.725&lt;br /&gt;
 0	0.75&lt;br /&gt;
 0	0.775&lt;br /&gt;
 0	0.8&lt;br /&gt;
 0	0.9&lt;br /&gt;
 0	1&lt;br /&gt;
 0.1	1&lt;br /&gt;
 0.2	1&lt;br /&gt;
 0.3	1&lt;br /&gt;
 0.4	1&lt;br /&gt;
 0.5	1&lt;br /&gt;
 0.6	1&lt;br /&gt;
 0.7	1&lt;br /&gt;
 0.8	1&lt;br /&gt;
 0.9	1&lt;br /&gt;
  1     1&lt;br /&gt;
&lt;br /&gt;
== binding free energy ==&lt;br /&gt;
&lt;br /&gt;
For host-guest binding, the simulation process similiar to above but involve two sets: one is host-guest-water, and the other guest-water. In both cases, guest is the ligand that is being scaled. For host-guest-water, one also applies&amp;amp;nbsp;a bond restraint between host and guest. This restraint can be turned off in one or two steps for lambda=1 but should be kept when L&amp;lt;1.&lt;br /&gt;
&lt;br /&gt;
 One way is to set the restraint K=0 when Lele, Lvdw=1, then K=90% when Lele=0.9/Lvdw=1, then K=100% when Lele=80%/Lvdw=1..... K=100% for all rest of L including L=0. &lt;br /&gt;
 The goal is for L=1 (host-guest full interaction), there is no restraint. when L=0, restraint is at 100%. The L=0 state seems &amp;quot;incorrect&amp;quot; due to the restraint but can be corrected (below).&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;bond&amp;quot; is between group of guest/ligand and group of host atoms. It is best to minimize the distance between the centers of the two groups (for sampling).  For example, if you are simulating an ion binding to a spherical cavity like CPP, you can pick 3 atoms on the host whose center is roughly the center of the ion; the restraint will be between the ion and this group. A correction is needed to &amp;quot;remove&amp;quot; the effect of this restraint and standard volume that goes into the final binding free energy.&#039;&#039;&#039;Tinker/utiity/freefix.f&#039;&#039;&#039; can be used to calculate the correction. Note this correction is typically positive (make binding energy less negative) since restraint leads to overestimation of binding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;*The correction for lambda=0 from RTln(C0*V), where C0=1/1660 A^3 and V=integrate{4*pi*r^2*exp[-k*(r-r0)^2/RT]dr}. k=15 kcal/mol in the example below. If you are using a harmonic restraint (example below) and the equilibrium r0 is not 0, numerical integration is necessary. A good reference is JACS v126, NO. 24, 2004.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Brandon setup script can also set up protein-lig distance restraint now. Basically select a central heavy atom on ligand (or a function group) and another group of nearby 3-4 Ca from protein.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Francis wrote a program to pick restraints based on Boresch paper. It can include additional angle and torsion restraints. However we found it is best to just use the simple distance restraints. The additional restraints may introduce bias towards ligand or host dynamics if not picked carefully.&amp;lt;/pre&amp;gt; [[Tinkergpu:get_rot_rest]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use distance restraint when lambda =1 for both ele and vdw, you can remove the effect of restraint from FEP or BAR; or you can avoid this correction if the restraint strength is set to 0 when the lambda =1 (gradually turned on when lambda-&amp;gt; 0 for both vdw and ele).&lt;br /&gt;
&lt;br /&gt;
 ligand                  -1 24, 26    &#039;&#039;#negative means range: atoms 1 to 24 plus 26&#039;&#039;&lt;br /&gt;
 vdw-lambda              1.00&lt;br /&gt;
 ele-lambda              0.50&lt;br /&gt;
 GROUP 1 -1 3 //ligand group&lt;br /&gt;
 GROUP 2 100, 102, 138 //protein group&lt;br /&gt;
 RESTRAIN-GROUPS  1  2  15.0  2.0 2.0&lt;br /&gt;
 Vdw-annihilation&lt;br /&gt;
 #lower bound &amp;amp; upper bound (2.0, 2.0) do not have to be the same. 15 is the force constant.&lt;br /&gt;
&lt;br /&gt;
Each set of lambda corresponds to one separate MD simulations of 5-10ns or longer. Save MD frames at every 3-5 ps. Use bar.x (bar_omm.x for GPU) to analyze the free energy dG between the neighboring lambda values.&lt;br /&gt;
&lt;br /&gt;
Unlike HFE, no need for gas-phase simulation since the end states of the ligand-water vs. ligand-protein cancels.&lt;br /&gt;
&lt;br /&gt;
Some scripts fron CW:&amp;amp;nbsp;[https://github.com/leucinw/ComputTools/tree/master/bardemo https://github.com/leucinw/ComputTools/tree/master/bardemo]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==ion HFE steps==&lt;br /&gt;
To compute ion hydration FE, &lt;br /&gt;
* prepare ion.xyz and waterbox.xyz. One key file containing all parameters (amoeba09.prm has ion and bunch of ions). If you have a new ion, add its parameters including multipoles, polarizability/damping, vdw &lt;br /&gt;
* water box should be ~50 A. A list of prebuilt water box (you many need to change atom types in xyz if you are using different key) https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#prebuilt_water_box &lt;br /&gt;
* use xyzedit to soak ion in water (see tutorial above about building and combining xyz)&lt;br /&gt;
* Run NPT for ~1ns to relax. See tutorial on this page about dynamics on GPU NPT keywords (using Langevin or MonteCarlo)&lt;br /&gt;
* Take the last relaxed structure to create inputs for HFE. Best to create a series of folders, one for each lambda with inputs and run scripts. See here for lambda schedule https://biomol.bme.utexas.edu/tinkergpu/index.php?title=Tinkergpu:Tinker-tut#HFE&lt;br /&gt;
* Get a list of nodes from Google spreadsheet of lab cluster. Ask for it if you can&#039;t find ~10 GPU nodes.&lt;br /&gt;
* each MD for ~2ns (add more if needed)&lt;br /&gt;
* Use a script to send jobs to each node. You can have 2 jobs concurrent on one GPU and rotate your jobs (~50 lambdas) through.&amp;lt;br /&amp;gt;&lt;br /&gt;
== hydration and binding free energy examples ==&lt;br /&gt;
&lt;br /&gt;
*Ethanol solvation free energy [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/01_solvation/Ethanol.zip download] &lt;br /&gt;
*PBP-phosphate binding [https://biomol.bme.utexas.edu/~zj2244/tutorial/free_energy/02_protein_ligand_binding/PBP_PO4.zip download] &lt;br /&gt;
&lt;br /&gt;
Please unzip the files and see README for instructions.&lt;br /&gt;
&lt;br /&gt;
== HFE and binding free energy calc using Brandon&#039;s script ==&lt;br /&gt;
&lt;br /&gt;
Set up from complex PDB and ligand xyz/key (POLTYE):&amp;amp;nbsp;[https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD https://github.com/bdw2292/AMOEBAAnnihilator/blob/main/README_HELP.MD]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*create conda env according to instructions on the annihilator github page &lt;br /&gt;
*make&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;something like&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;/home/eew947/.allpurpose.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;with your username replacing mine everywhere in it &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;ssh&amp;lt;/code&amp;gt;&amp;amp;nbsp;to node you want to start from &lt;br /&gt;
*&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;source ~/.allpurpose.bashrc&amp;lt;/code&amp;gt; &lt;br /&gt;
*prepare&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;annihilator.ini&amp;lt;/code&amp;gt; &lt;br /&gt;
*if you want to use daemon, you have to add the keyword for it in annihilator *ini and have it already running before starting annihilator &lt;br /&gt;
*start annihilator by&amp;amp;nbsp;&amp;lt;code data-stringify-type=&amp;quot;code&amp;quot;&amp;gt;nohup yourpathtoannihilatorhere/AMOEBAAnnihilatorModules/amoebaannihilator.py &amp;amp;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== OSRW ==&lt;br /&gt;
&lt;br /&gt;
Only implemented in tinker CPU. GPU version is under development.&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
&lt;br /&gt;
== Force Field Explorer ==&lt;br /&gt;
&lt;br /&gt;
By Mike Schneider and Jay Ponder, [http://dasher.wustl.edu http://dasher.wustl.edu] Can visualize the xyz and arc (MD trajectory) files; create and start TINKER calcualtions&lt;br /&gt;
&lt;br /&gt;
== VMD ==&lt;br /&gt;
&lt;br /&gt;
Choose TINKER format when open a xyz file. Trajectory file (.arc) also works.&lt;br /&gt;
&lt;br /&gt;
== Pymol ==&lt;br /&gt;
&lt;br /&gt;
Sometimes the xyz file can not be displayed correctly&lt;br /&gt;
&lt;br /&gt;
= Other resources =&lt;br /&gt;
&lt;br /&gt;
[https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials https://sites.google.com/site/biomolsimstw/workshop-materials/tutorials]&lt;br /&gt;
&lt;br /&gt;
Please email me if you have tutorials related to AMOEBA or Tinker you would like to share.&lt;br /&gt;
&lt;br /&gt;
= AMOEBA Force Field Papers: =&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Fundamental theory of AMOEBA multipoles:&#039;&#039;&#039; ===&lt;br /&gt;
[[Tutorial:amm#Molecular Mechanics and Force Fields (AMOEBA, AMOEBA+)]]&lt;br /&gt;
&lt;br /&gt;
===AMEOBA FF:===&lt;br /&gt;
&lt;br /&gt;
#Water model: Ren, P. Y.; Ponder, J. W., Polarizable atomic multipole water model for molecular mechanics simulation. Journal of Physical Chemistry B &#039;&#039;&#039;2003&#039;&#039;&#039;, 107 (24), 5933-5947. &lt;br /&gt;
#Small molecules: Ren, P.; Wu, C.; Ponder, J. W., Polarizable Atomic Multipole-based Molecular Mechanics for Organic Molecules. J Chem Theory Comput &#039;&#039;&#039;2011&#039;&#039;&#039;, 7 (10), 3143-3161. &lt;br /&gt;
#Proteins: Shi, Y.; Xia, Z.; Zhang, J.; Best, R.; Wu, C.; Ponder, J. W.; Ren, P., The Polarizable Atomic Multipole-based AMOEBA Force Field for Proteins. J Chem Theory Comput &#039;&#039;&#039;2013&#039;&#039;&#039;, 9 (9), 4046-4063. &lt;br /&gt;
#DMP/TMP/Base &amp;amp; nucleic acids:&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
*Zhang, C.; Lu, C.; Wang, Q.; Ponder, J. W.; Ren, P., Polarizable Multipole-Based Force Field for Dimethyl and Trimethyl Phosphate. J Chem Theory Comput 2015, 11 (11), 5326-39. &lt;br /&gt;
*Zhang, C.; Bell, D.; Harger, M.; Ren, P., Polarizable Multipole-Based Force Field for Aromatic Molecules and Nucleobases. J Chem Theory Comput 2017, 13 (2), 666-678. &lt;br /&gt;
*Zhang, C.; Lu, C.; Jing, Z.; Wu, C.; Piquemal, J. P.; Ponder, J. W.; Ren, P., AMOEBA Polarizable Atomic Multipole Force Field for Nucleic Acids. J Chem Theory Comput 2018, 14 (4), 2084-2108. &lt;br /&gt;
&lt;br /&gt;
===AMOEBA+ model (water published, small and biomolecules in progress)===&lt;br /&gt;
&lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., AMOEBA+ Classical Potential for Modeling Molecular Interactions. J Chem Theory Comput 2019. &lt;br /&gt;
#Liu, C.; Piquemal, J. P.; Ren, P., Implementation of Geometry-Dependent Charge Flux into the Polarizable AMOEBA+ Potential. J Phys Chem Lett 2019, 11, 419-426.&lt;br /&gt;
&lt;br /&gt;
===AMOEBA+NN model: incorporating Neural Networks===&lt;br /&gt;
&lt;br /&gt;
Wang, Y., et al. (2024). &amp;quot;Incorporating Neural Networks into the AMOEBA Polarizable Force Field.&amp;quot; The Journal of Physical Chemistry B 128(10): 2381-2388.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Tinker Key File for AMOEBA+ Condensed Phase Simulations ===&lt;br /&gt;
 EWALD&lt;br /&gt;
 EWALD-CUTOFF      9.0 # for real space Ewald and charge penetration&lt;br /&gt;
 &lt;br /&gt;
 NEIGHBOR-LIST&lt;br /&gt;
 &lt;br /&gt;
 VDW-CUTOFF        12.0 # for vdw term&lt;br /&gt;
 CHGTRN-CUTOFF     12.0 # for charge transfer term&lt;br /&gt;
 VDW-CORRECTION&lt;br /&gt;
 &lt;br /&gt;
 INTEGRATOR  RESPA&lt;br /&gt;
 THERMOSTAT  BUSSI&lt;br /&gt;
 BAROSTAT    MONTECARLO&lt;br /&gt;
 &lt;br /&gt;
 POLAR-PREDICT&lt;br /&gt;
 POLAR-EPS 0.00001&lt;br /&gt;
&lt;br /&gt;
==Lectures on Force Field, AMOEBA, AMOEBA+==&lt;br /&gt;
Under &#039;&#039;&#039;Adv Mol Modeling&#039;&#039;&#039; menu:&lt;br /&gt;
 [[Tutorial:amm#Molecular_Mechanics_and_Force_Fields_(AMOEBA,_AMOEBA+) | Link]]&lt;br /&gt;
&lt;br /&gt;
= More Explicit Free Energy Calc Steps - Brandon Walker =&lt;br /&gt;
&lt;br /&gt;
Old/obsolete description here: [[Tinker-tut:free_eng_Bbdw|Obsolete description here]]&lt;/div&gt;</summary>
		<author><name>Brendan</name></author>
	</entry>
</feed>