tools

tools

Standalone tools that are complementary to KIMMDY.

Functions

Name Description
build_examples Build example directories for KIMMDY from integration tests.
edgelist_to_dot_graph Convert a list of edges to a dot graph.
entry_point_build_examples Build examples from the command line.
entry_point_modify_top Modify topology file in various ways
get_build_example_cmdline_args Parse command line arguments.
get_modify_top_cmdline_args parse cmdline args for modify_top
modify_top Modify topology in various ways.
top_to_graph Convert a topology to a dot graph.
topology_to_edgelist Convert a topology to a list of edges for a dot graph.
write_top_as_dot Write a topology as a dot graph to a file.

build_examples

tools.build_examples(restore)

Build example directories for KIMMDY from integration tests.

Parameters

Name Type Description Default
restore str If True, overwrite input files in existing example directories. If “hard”, also delete output files. required

edgelist_to_dot_graph

tools.edgelist_to_dot_graph(ls, overlap='true')

Convert a list of edges to a dot graph.

entry_point_build_examples

tools.entry_point_build_examples()

Build examples from the command line.

entry_point_modify_top

tools.entry_point_modify_top()

Modify topology file in various ways

get_build_example_cmdline_args

tools.get_build_example_cmdline_args()

Parse command line arguments.

Returns

Type Description
Namespace parsed command line arguments

get_modify_top_cmdline_args

tools.get_modify_top_cmdline_args()

parse cmdline args for modify_top

modify_top

tools.modify_top(topology, out, parameterize=False, grappa_tag='latest', grappa_charge_model='amber99', removeH=None, gro=None, residuetypes=None, radicals=None, search_amber_rad=True, include=None, exclude=None)

Modify topology in various ways.

Parameters

Name Type Description Default
topology str Path to GROMACS top file required
out str Output topology file path, stem also used for gro. Can be relative to cwd. required
parameterize bool Parameterize topology with grappa after removing hydrogen False
grappa_tag str grappa model tag for parameterization. 'latest'
grappa_charge_model str grappa charge model for parameterization. 'amber99'
removeH Optional[list[int]] Remove one or more hydrogens by atom nrs in the top file. One based. None
gro Optional[str] GROMACS gro input file. Updates structure when deleting H. Output named like top output. None
residuetypes Optional[str] GROMACS style residuetypes file. Necessary for parameterization with non-amber atom types. None
radicals Optional[list[int]] Radicals in the system PRIOR to removing hydrogens with the removeH option. One based. Can be detected automatically in amber topologies. None
search_amber_rad bool Automatic radical search only implemented for amber. If you do use another ff, set this to false, and provide a list of radicals manually, if necessary. True
include Optional[str] Include certain GROMACS topology molecules in Reactive molecule. Reads molecule names from a csv file. None
exclude Optional[str] Exclude certain GROMACS topology molecules in Reactive molecule. Reads molecule names from a csv file. None

top_to_graph

tools.top_to_graph(top, overlap='true')

Convert a topology to a dot graph.

Can be used in notebooks to write a dot file and render with quarto.

topology_to_edgelist

tools.topology_to_edgelist(top)

Convert a topology to a list of edges for a dot graph.

write_top_as_dot

tools.write_top_as_dot(top, path, overlap='true')

Write a topology as a dot graph to a file.

Can be used in notebooks to write a dot file and render with quarto.

Back to top