mdciao.fragments.print_frag¶
-
mdciao.fragments.
print_frag
(frag_idx, top, fragment, fragment_desc='fragment', idx2label=None, return_string=False, resSeq_jumps=True, label_width=10, **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
label_width (int, default is 10) – The width in characters given to the label descriptor. You can set this to zero if you know
idx2label
is None for all printed linesreturn_string (bool, default is False) – Instead of printing, return the string
print_kwargs – Optional keyword arguments to pass to the print function, e.g. “end=”,”” and such
- Returns
- Return type
None or str, see return_string option