Example 2: BPTI Excluding the Phosphate Ion¶
This is the same as Example 1, except we delete the phosphate ion.
# Author: Cameron F. Abrams, <cfa22@drexel.edu>
#
# pestifer input script
#
# Simple build of solvated BPTI (mimics psfgen user manual)
#
# Notes:
# - The phospate ion is excluded, but all crystal waters are retained
# - Solution has 0.154 M NaCl
# - A five-phase NPT equilibration is used to settle the density
# - A production tarball is generated: prod_6pti.tgz rooted in directory ready-to-run
#
title: BPTI with phosphate ion excluded in salty solution
tasks:
- fetch:
sourceID: 6pti
- psfgen:
source:
exclude:
- resname == 'PO4'
- validate:
tests:
- residue_test:
name: phosphate ion excluded
selection: resname PO4
measure: residue_count
value: 0
- md:
ensemble: minimize
- solvate:
salt_con: 0.154
cation: SOD
anion: CLA
- md:
ensemble: minimize
- md:
ensemble: NVT
- md:
ensemble: NPT
nsteps: 200
- md:
ensemble: NPT
nsteps: 400
- md:
ensemble: NPT
nsteps: 800
- md:
ensemble: NPT
nsteps: 1600
- md:
ensemble: NPT
nsteps: 13200
- mdplot:
timeseries:
- density
basename: solvated
grid: True
- terminate:
basename: my_6pti
artifacts: artifacts
package:
basename: prod_6pti
namd:
ensemble: NPT
Step |
Task |
Details |
|---|---|---|
1 |
|
|
2 |
|
exclusions |
3 |
|
1 test(s) |
4 |
|
minimize |
5 |
|
water box + 0.154 M SOD/CLA |
6 |
|
minimize → NVT (2,000 steps) → NPT (16,200 steps, 5 phases) |
7 |
|
equilibration time-series plots → |
8 |
|
basename: |
Note the exclude subdirective under source. You remember how you can learn about it? Using config-help:
$ pestifer --no-banner config-help tasks psfgen source exclude
exclude:
Logical expressions involving atom attributess used in parallel to
specify those atoms to be excluded
All subattributes at the same level as 'exclude':
base|tasks->psfgen->source
biological_assembly
transform_reserves
remap_chainIDs
reserialize
model
cif_residue_map_file
include
exclude
sequence ->
.. up
! quit
pestifer-help:
The logical expressions are expected to by Pythonic, not VMD/Tcl-like. In this case, we exclude any residue with the name “PO4”. You can use any atom attributes in the expression, such as resid, chain, name, etc. You can also combine multiple expressions using Python’s logical operators and, or, and not. If you list multiple expressions under exclude, they are combined with or logic. So, for example, to exclude both phosphate ions and water molecules, you could use:
psfgen:
source:
exclude:
- name == "PO4"
- resname == "HOH"
Because the expressions can be compound, this would be equivalent to the single expression:
psfgen:
source:
exclude:
- name == "PO4" or resname == "HOH"
We have also modified the solvate task to allow for a 0.154 M NaCl solution, which is a common salt concentration in biological systems.
Digression: The Validate Task¶
This example also uses the validate task, which is a useful way to check that your configuration file is doing what you expect by directly interrogating the PSF and PDB file of the current state. This particular test validates the exclusion of the phosphate ion. Other types of tests can check for presence or absence of other residues, interresidue bonds (disulfides and glycosylations), and more.