Skip to content

Commit

Permalink
Merge pull request #547 from marrink-lab/issue522
Browse files Browse the repository at this point in the history
Use MDTraj dssp
  • Loading branch information
fgrunewald authored Dec 6, 2023
2 parents caa8f63 + a0bfe9a commit bae3e3b
Show file tree
Hide file tree
Showing 27 changed files with 317 additions and 123 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ the following command:
Note that vermouth and Martinize2, in particular development versions, may contain bugs that cause it to produce
incorrect topologies. Check the produced output carefully!

Martinize2 and vermouth have [mdtraj][mdtraj] as optional dependency as an
alternative to dssp.

The behavior of the `pip` command can vary depending of the specificity of your
python installation. See the [documentation on installing a python
package][pipdoc] to learn more.
Expand Down Expand Up @@ -108,6 +111,7 @@ academic paper is left to our sole discretion.
[Martini tutorials]: http://cgmartini.nl/index.php/tutorials-general-introduction-gmx5
[Gromacs]: http://www.gromacs.org
[pypi_vermouth]: https://pypi.org/project/vermouth/
[mdtraj]: https://www.mdtraj.org/
[pipdoc]: https://packaging.python.org/tutorials/installing-packages/#installing-packages
[license]: https://github.com/marrink-lab/vermouth-martinize/blob/master/LICENSE
[github]: https://github.com/marrink-lab/vermouth-martinize
Expand Down
14 changes: 9 additions & 5 deletions bin/martinize2
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def write_gmx_topology(system, top_path, defines=(), header=()):
with deferred_open("{}.itp".format(moltype), "w") as outfile:
# here we format and merge all citations
header[-1] = header[-1] + "\n"
header.append("Pleas cite the following papers:")
header.append("Please cite the following papers:")
for citation in molecule.citations:
cite_string = citation_formatter(
molecule.force_field.citations[citation]
Expand Down Expand Up @@ -520,8 +520,10 @@ def entry():
secstruct_exclusion.add_argument(
"-dssp",
nargs="?",
const="dssp",
help="DSSP executable for determining structure",
const=True,
help="DSSP executable for determining structure. If this flag is given"
"but no executable is specified, the mdtraj library will be used"
"to compute the secondary structure, if it can be imported.",
)
secstruct_exclusion.add_argument(
"-ss",
Expand Down Expand Up @@ -890,8 +892,10 @@ def entry():
LOGGER.debug("Read molecule {}.", molecule, type="step")

target_ff = known_force_fields[args.to_ff]
if args.dssp is not None:
AnnotateDSSP(executable=args.dssp, savedir=".").run_system(system)
if args.dssp:
if not isinstance(args.dssp, str):
args.dssp = None
AnnotateDSSP(executable=args.dssp, savedir='.').run_system(system)
AnnotateMartiniSecondaryStructures().run_system(system)
elif args.ss is not None:
AnnotateResidues(
Expand Down
1 change: 1 addition & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pylint
hypothesis
hypothesis-networkx
codecov
mdtraj
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ install-requires = # ?? requires-dist?
scipy
zip-safe = False

[options.extras_require]
mdtraj = mdtraj

[build_sphinx]
source-dir = doc/source
build-dir = doc/build
Expand Down
2 changes: 1 addition & 1 deletion vermouth/citation_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def citation_formatter(citation, title=False):
<authors> [journal] <year>; [doi]
Note that the formatter cannot fromat latex
Note that the formatter cannot format latex
like syntax (e.g. a{\"} for ae)
"""
# first we split the author-list
Expand Down
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/elnedyn21/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ @article{M2polarizable
year={2010},
publisher={Public Library of Science}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/elnedyn22/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ @article{M2polarizable
year={2010},
publisher={Public Library of Science}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/elnedyn22p/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ @article{M2polarizable
year={2010},
publisher={Public Library of Science}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/martini22/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ @article{M2polarizable
year={2010},
publisher={Public Library of Science}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/martini22p/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ @article{M2polarizable
year={2010},
publisher={Public Library of Science}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/martini3001/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ @article{Martini3smallmolecules
year={2022},
publisher={Wiley Online Library}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/martini30b32/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ @misc{Martini3Beta
author={Souza, Paulo C T and Marrink, Siewert Jan},
year={2020}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
10 changes: 10 additions & 0 deletions vermouth/data/force_fields/martini30dev/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ @misc{Martini3Beta
author={Souza, Paulo C T and Marrink, Siewert Jan},
year={2020}
}
@article{MDTraj,
title={MDTraj: A Modern Open Library for the Analysis of Molecular Dynamics Trajectories},
author={McGibbon, Robert T. and Beauchamp, Kyle A. and Harrigan, Matthew P. and Klein, Christoph and Swails, Jason M. and Hernández, Carlos X. and Schwantes, Christian R. and Wang, Lee-Ping and Lane, Thomas J. and Pande, Vijay S.},
journal={Biophysical Journal},
volume={109},
number={8},
pages={1528 -- 1532},
year={2015},
doi={10.1016/j.bpj.2015.08.015}
}
Loading

0 comments on commit bae3e3b

Please sign in to comment.