.. _solvation:

*****************
Protein solvation
*****************

The protein solvation workflow provides a guided procedure for system setup,
solvation and equilibration.

The workflow consists of the following high level sequence of steps, starting
from an initial PDB system:

1. Run PDB2PQR to assign missing hydrogens and estimate titration states
2. Solvate the system using a pre-prepared solvent background
3. Generate a CHARMM/NAMD protein structure file (PSF) using PSFGEN
4. Neutralise the system by adding an appropriate number of counterions
5. Minimise and run an initial NVT-ensemble MD with solute fixed
6. Minimise and run an NPT-ensemble MD with backbone constraints
7. Run a final "production" NPT-ensemble MD run to equilibrate the system


General options
===============

.. py:attribute:: solute

   Fragment object containing intiial structure

.. py:attribute:: pdb2pqr

   (default: ``True``) Can be set to a string containing the path to PDB2PQR


Solvation options
=================

.. py:attribute:: shape

   (default: ``'cube'``) Shape of solvent background environment. Currently, cube is the only supported option.

.. py:attribute:: solvent

   (default: ``'TIP3P'``) Forecfield model used in pre-prepared solvent background environment. Currently, only TIP3P is supported.

.. py:attribute:: padding

   (default: ``28.3459``) Padding size for solvent box (default = 15.0 Angstrom)

.. py:attribute:: boundary

   (default: ``4.53534``) Distance between the solute and solvent (default = 2.4 Angstrom)

.. py:attribute:: unit

   (default: ``'a.u.'``) Unit for distance measurements


Neutralisation options
======================

.. py:attribute:: neutralise

   (default: ``True``) Flag to neutralise the system before MD runs

.. py:attribute:: neutralise_cation

   (default: ``'Na'``) Cation species for neutralisation

.. py:attribute:: neutralise_anion

   (default: ``'Cl'``) Anion species for neutralisation


General MD options
==================

.. py:attribute:: driver

   A driver to run molecular dynamics. Must be a NAMD() instance.

.. py:attribute:: dryrun

   (default: ``False``) If True, generate input files but do not run MD

.. py:attribute:: restart_from_md

   (default: ``0``) Specify a restart from a previous MD stage (default is to start from the beginning)



1st MD run (NVT) options
========================

.. py:attribute:: length_nvt

   (default: ``2000000``) Length of 1st NVT MD run in fs (default = 2 ns)

.. py:attribute:: minimisation_nvt

   (default: ``50000``) Steps of minimisation before 1st NVT MD run

.. py:attribute:: relax_residues_nvt

   (default: ``['solvents','ions']``) Specify what to relax in the 1st MD run
 

2nd MD run (NPT) options
========================

.. py:attribute:: length_npt

   (default: ``5000000``) Length of 2nd NPT MD run in fs (default = 5 ns)

.. py:attribute:: minimisation_npt

   (default: ``50000``) Steps of minimisation before 2nd NPT MD run

.. py:attribute:: relax_residues_npt

   (default: ``['amino_acids','solvents','ions']``) Specify what to relax in the 2nd MD run


Production MD run (NPT) options
===============================

.. py:attribute:: length_production

   (default: ``20000000``) Length of production MD run in fs (default = 20 ns)


