vermouth.bin.martinize2 module

High level API for Martinize2

vermouth.bin.martinize2.entry()[source]

Parses commandline arguments and performs the logic.

vermouth.bin.martinize2.martinize(system, mappings, to_ff, delete_unknown=False, disordered_regions=None)[source]

Convert a system from one force field to another at lower resolution.

vermouth.bin.martinize2.maxwarn(value)[source]

Given a maxwarn specification, split it in a warning type, and the number to ignore.

>>> maxwarn('3')
(None, 3)
>>> maxwarn('general:15')
('general', 15)
>>> maxwarn('inconsistent-data')
('inconsistent-data, None)
Parameters:

value (str) – A warning type and a count, separated by a colon.

Returns:

A warning type and the associated count to ignore. Either element can be None if not specified.

Return type:

tuple[str, int]

Raises:

argparse.ArgumentTypeError

vermouth.bin.martinize2.pdb_to_universal(system, delete_unknown=False, force_field=None, modifications=None, mutations=None, bonds_from_name=True, bonds_from_dist=True, bonds_fudge=1, write_graph=None, write_repair=None, write_canon=None)[source]

Convert a system read from the PDB to a clean canonical atomistic system.

vermouth.bin.martinize2.read_system(path, ignore_resnames=(), ignh=None, modelidx=None)[source]

Read a system from a PDB or GRO file.

This function guesses the file type based on the file extension.

The resulting system does not have a force field and may not have edges.