# A simple MCCE example of pH titration

## Run MCCE

### Prepare a working directory:

```
$ mkdir test_lysozyme
$ cd test_lysozyme
```

#### Get a pdb file

`$ getpdb 1dpx`

You now have a PDB file 1DPX.pdb in the working directory.

The simplest way to run MCCE is with these four steps:

### Step 1: Make PDB file into MCCE PDB

This step proofreads the structure file and cuts terminal residues and complex cofactors into smaller ones if necessary.

`$ step1.py 1DPX.pdb`

### Step 2: Create side chain conformers

This step makes alternative side chain locations and ionization states.

`$ step2.py`

### Step 3: Calculate energy table

This step calculates conformer self energy and pairwise interaction table.

`$ step3.py`

### Step 4: Simulate a titration with Monte Carlo sampling

This step simulates a titration and writes out the conformation and ionization states of each side chain at various conditions.

`$ step4.py`

### Notes

#### Command help "-h"

- For more detailed command usages, use "-h" switch in each command above.

#### Run in background

- Some steps take hours to finish, so it is recommended to run at the background. For example: `step3.py > run.log &`
- `For more exhaustive work, we recommend using tools like p_batch to process many runs at once in the background.`

### Jupyter notebook

Here is a Jupiter note book template: [mcce.ipynb](https://gunnerlab.github.io/Stable-MCCE/files/mcce.ipynb)