rstoolbox.io.write_rosetta_fragments

rstoolbox.io.write_rosetta_fragments(df, frag_size=None, n_frags=200, prefix='rosetta_frags', strict=False)

Writes a Rosetta fragment-file (new format) from an appropiate FragmentFrame.

Supports varying size fragment sets.

Parameters:
  • df (DesignFrame) – Selected set of fragments that have to be written.
  • frag_size (int) – Size of the fragments.
  • n_frags (int) – Number of fragments per frame. Default are 200 fragments per frame.
  • prefix (str) – Prefix for the fragment file.
  • strict (bool) – If False (default), it will assume the FragmentFrame starts in 1 and contains the same n_frags at each position. Otherwise, it adapts to the actual content of the FragmentFrame. Also, strict==True will print new fragments format while strict==False will print the old fragments format.
Returns:

str - name of the newly generated file.

Raises:
AttributeError:If strict==False and no frag_size is provided.