mdciao.fragments.print_frag
- mdciao.fragments.print_frag(frag_idx, top, fragment, fragment_desc='fragment', idx2label=None, just_return_string=False, resSeq_jumps=True, residue_string_width=10, fragment_string_width=6, **print_kwargs)
Pretty-printing of fragments of an
mtraj.topology
- Parameters:
frag_idx (int or str) – Index or name of the fragment to be printed
top (
Topology
or string) – Topology or string (=AA sequence) to “grab” the residue-names from when informingfragment (iterable of indices) – The fragment in question, with zero-indexed residue indices
fragment_desc (str, default is “fragment”) – How to call the fragments, e.g. segment, block, monomer, chain
idx2label (iterable or dictionary) – Pass along any consensus labels here
resSeq_jumps (bool, default is True) – Inform whether the fragment contains jumps in the resSeq
residue_string_width (int, default is 10) – The width in characters given to the residue descriptor. You can set this to zero if you know idx2label is None for all printed lines
fragment_string_width = int, default is 6 – The width in characters given to the fragment name.
just_return_string (bool, default is False) – Instead of printing, just return the string
print_kwargs – Optional keyword arguments to pass to the print function, e.g. “end=”,”” and such
- Return type:
None or str, see return_string option