Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first draft of martinize2 command tutorials #616

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
38fa6e2
first draft of martinize2 command tutorials
csbrasnett Oct 9, 2024
688bf23
Merge branch 'master' into martinize2_tutorials
csbrasnett Oct 9, 2024
5ba58d8
first draft of martinize2 command tutorials
csbrasnett Oct 9, 2024
879c452
Merge remote-tracking branch 'origin/martinize2_tutorials' into marti…
csbrasnett Oct 9, 2024
6c11f45
Merge remote-tracking branch 'origin/martinize2_tutorials' into marti…
csbrasnett Oct 9, 2024
c4446e1
Merge remote-tracking branch 'origin/martinize2_tutorials' into marti…
csbrasnett Oct 9, 2024
543d245
update index
csbrasnett Oct 9, 2024
1973c94
refactor
csbrasnett Oct 9, 2024
9657bdf
refactor
csbrasnett Oct 9, 2024
89ac412
Merge remote-tracking branch 'origin/martinize2_tutorials' into marti…
csbrasnett Oct 9, 2024
bcd0a06
missed item in index
csbrasnett Oct 9, 2024
25ff84a
fixed equation formatting, added more -ss description
csbrasnett Oct 10, 2024
5386dbe
added note about polyply
csbrasnett Oct 10, 2024
6444dd3
corrected lines in go_models.rst for including go files in martini_v3…
csbrasnett Oct 10, 2024
ebfae82
Made requested changes
csbrasnett Oct 14, 2024
f0a6d44
Update doc/source/tutorials/elastic_networks.rst
csbrasnett Oct 14, 2024
6e5957b
think there needs to be a blank line in the math to make it math
csbrasnett Oct 14, 2024
208498f
made requested changes
csbrasnett Oct 21, 2024
0d8be32
added missing overbars
csbrasnett Oct 21, 2024
04df1d6
update information about scfix and elastic network defaults.
csbrasnett Oct 21, 2024
2a1cd18
Merge branch 'marrink-lab:master' into martinize2_tutorials
csbrasnett Oct 24, 2024
a3ec536
(hopefully) fix the relative links, add some small clarifications
csbrasnett Oct 24, 2024
bc5742e
(hopefully) fix the relative links, add some small clarifications
csbrasnett Oct 24, 2024
b4ebdbf
change rst to html
csbrasnett Oct 24, 2024
0cdf3c7
Merge remote-tracking branch 'origin/martinize2_tutorials' into marti…
csbrasnett Oct 24, 2024
be7b3d8
Fix links to network pages
csbrasnett Oct 29, 2024
814995b
maybe this fixes the links
csbrasnett Oct 29, 2024
1aefec9
add refs
csbrasnett Oct 29, 2024
fadda0b
try doc referencing as per https://www.sphinx-doc.org/en/master/usage…
csbrasnett Oct 30, 2024
3dc5fd2
Merge branch 'marrink-lab:master' into martinize2_tutorials
csbrasnett Oct 30, 2024
fc8cbe6
Merge branch 'marrink-lab:master' into martinize2_tutorials
csbrasnett Nov 13, 2024
66daa25
Merge branch 'master' into martinize2_tutorials
pckroon Nov 15, 2024
22ce8af
Merge branch 'master' into martinize2_tutorials
csbrasnett Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified doc/source/tutorials/elastic_examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 36 additions & 1 deletion doc/source/tutorials/elastic_networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The strength of the elastic bond can be tuned with distance using an exponential
which uses the ``-ea`` and ``-ep`` flags as input parameters:


``decay = exp^{(- f * ((x - l) ^p)}``
$$decay = e^{(- f * ((x - l) ^ p)}$$

where:

Expand Down Expand Up @@ -92,3 +92,38 @@ The fifth example adds an additional parameter ``-em`` into the function. As des
calculated to be lower than this force, they are removed and set to zero. Note how the input values are almost identical
to the fourth example, which would otherwise get cutoff at 0.9 nm. Because the decay function reduces the force below
the minimum before the cutoff, it overrides it and the force is zeroed before the upper cutoff anyway.


Defining structural units
-------------------------

By default, martinize2 will look at the structure given in the input file, and construct a distance-based elastic
network, filtered by each molecule. This behaviour is controlled by the `-eunit` flag. If you have multiple molecules
within your input file and would like the way the elastic network is written to be changed, this can be achieved
through different specifications as described in the help above.

For example:
``martinize2 -f protein.pdb -o topol.top -x cg_protein.pdb -ff martini3001 -dssp -elastic -eunit chain``

will limit the unit to individual chains in the system. *i.e.* chain A of your protein will *not* have any elastic
bonds with chain B, and so on.

Conversely,
``martinize2 -f protein.pdb -o topol.top -x cg_protein.pdb -ff martini3001 -dssp -elastic -eunit all``

will write elastic bonds between every molecule in your system in the positions that have been found.

Finally:

``martinize2 -f protein.pdb -o topol.top -x cg_protein.pdb -ff martini3001 -dssp -elastic -eunit 1:100 150:200``

Will write elastic networks internally between residues 1 to 100, and residues 150 to 200, but *not* between either of
these domains, nor between either of these domains and residues 101 to 149.


Visualising elastic networks
----------------------------

If you want to look at your elastic network in VMD to confirm that it's been constructed in the
way that you're expecting, the `MartiniGlass <https://github.com/Martini-Force-Field-Initiative/MartiniGlass>`_
package can help write visualisable topologies to view.
56 changes: 52 additions & 4 deletions doc/source/tutorials/go_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ Without any further additions, this will:
``-go-moltype`` flag.
2) Use the contact map to generate a set of non-bonded parameters between specific pairs of ``CA`` atoms in your molecule
with strength 9.414 kJ/mol (changed through the ``-go-eps`` flag).
3) Eliminate any parameters which are shorter than 0.3 nm and longer than 1.1 nm, or are closer than 3 residues in the
3) Eliminate any contacts which are shorter than 0.3 nm and longer than 1.1 nm, or are closer than 3 residues in the
molecular graph. These options are flexible through the ``-go-low`` and ``-go-up`` flags.
4) If the contact map finds any atoms within contact range defined, but are *also* within 3 residues of each other,
then the contacts are removed. This is defined through the ``-go-res-dist`` flag.

As a result, along with the standard output of martinize2 (ie. itp files for your molecules, a generic .top file,
As a result, along with the standard output of martinize2 (*i.e.* itp files for your molecules, a generic .top file,
a coarse grained structure file), you will get two extra files: ``go_atomtypes.itp`` and ``go_nbparams.itp``. The atomtypes
file defines the new virtual sites as atoms for your system, and the nbparams file defines specific non-bonded
interactions between them.
Expand All @@ -70,8 +70,48 @@ depend on your protein)::
molecule_0_23 molecule_0_19 1 0.53307395 9.41400000 ;go bond 0.5983552758317587
...

To activate your Go model, you can simply include these files in your master ``martini_v3.0.0.itp`` file with the
following commands::
To activate your Go model for use in Gromacs, the `martini_v3.0.0.itp` master itp needs the additional files included.
The additional atomtypes defined in the ``go_atomtypes.itp`` file should be included at the end of the `[ atomtypes ]`
directive as::


[ atomtypes ]
...
TX1er 36.0 0.000 A 0.0 0.0
W 72.0 0.000 A 0.0 0.0
SW 54.0 0.000 A 0.0 0.0
TW 36.0 0.000 A 0.0 0.0
U 24.0 0.000 A 0.0 0.0

#ifdef GO_VIRT
#include "go_atomtypes.itp"
#endif

[ nonbond_params ]
P6 P6 1 4.700000e-01 4.990000e+00
P6 P5 1 4.700000e-01 4.730000e+00
P6 P4 1 4.700000e-01 4.480000e+00
...

Similarly, the nonbonded parameters should be included at the end of the `[ nonbond_params ]`
directive::

...
TX2er SQ1n 1 3.660000e-01 3.528000e+00
TX2er TQ1n 1 3.520000e-01 5.158000e+00
TX1er Q1n 1 3.950000e-01 1.981000e+00
TX1er SQ1n 1 3.780000e-01 3.098000e+00
TX1er TQ1n 1 3.660000e-01 4.422000e+00

#ifdef GO_VIRT
#include "go_nbparams.itp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csbrasnett should we perhaps update the master itp supplied via the new website?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, have opened an issue here

#endif

Then in the .top file for your system, simply include `#define GO_VIRT` along with the other files
to be included to active the Go network in your model.

As a shortcut for writing the include statements above, you can simply include these files in your master
``martini_v3.0.0.itp`` file with the following commands::

sed -i "s/\[ nonbond_params \]/\#ifdef GO_VIRT\n\#include \"go_atomtypes.itp\"\n\#endif\n\n\[ nonbond_params \]/" martini_v3.0.0.itp

Expand All @@ -83,3 +123,11 @@ internally for each molecule. This means that if you have multiple copies of you
in the system, the Go bonds are still only specified internally for each copy of the molecule,
not truly as intermolecular forces in the system as a whole. For more detail on this phenomenon,
see the paper by `Korshunova et al. <https://pubs.acs.org/doi/10.1021/acs.jctc.4c00677>`_.


Visualising Go networks
----------------------------

If you want to look at your Go network in VMD to confirm that it's been constructed in the
way that you're expecting, the `MartiniGlass <https://github.com/Martini-Force-Field-Initiative/MartiniGlass>`_
package can help write visualisable topologies to view.
2 changes: 1 addition & 1 deletion doc/source/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository: https://github.com/marrink-lab/martinize-examples
basic_usage
elastic_networks
go_models
mutations_and_modifications
water_biasing
mutations_and_modifications
6_adding_residues_links/index
7_adding_modifications/index
5 changes: 5 additions & 0 deletions doc/source/tutorials/mutations_and_modifications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Martinize2 facilitates a powerful syntax for defining mutations and modification
Here we'll look at some of the options for how your protein can be changed during the coarse graining process. While
chemically and structurally the two processes are different, the command line options share the same syntax.

Although the two processes share a syntax, it should be noted that Martinize2 **does not** build coordinates. While
(for example) mutating a glycine to a phenylalanine will still output a topology file with the necessary parameters,
the corresponding coordinate file will contain NaN values because there was insufficient data to reconstruct the
necessary mappings.

General syntax
==============

Expand Down
6 changes: 3 additions & 3 deletions doc/source/tutorials/water_biasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ as per the Go model instructions.

There will also be a second file, defining the additional non-bonded interactions between
water and the secondary structure elements defined in the command. In this case, any residue
identified as ``H`` (ie. helix) by dssp will have an additional Lennard-Jones interaction of
identified as ``H`` (*i.e.* helix) by dssp will have an additional Lennard-Jones interaction of
epsilon = 1 kJ/mol between its backbone virtual site and water.

To define more interactions based on secondary structure, add more letter codes to the
Expand All @@ -46,8 +46,8 @@ To define more interactions based on secondary structure, add more letter codes
``martinize2 -f protein.pdb -o topol.top -x cg_protein.pdb -dssp -water-bias -water-bias-eps H:1 C:0.5 E:2``


Water biasing for idps
----------------------
Water biasing for intrinsically disordered regions/proteins
-----------------------------------------------------------

If you have disordered regions in your protein, then they can have additional bonded and nonbonded
parameters added (described more in the `Go model paper <https://www.biorxiv.org/content/10.1101/2024.04.15.589479v1>`_).
Expand Down
Loading