starling.utilities.write_starling_ensemble

write_starling_ensemble(ensemble_object, filename, compress=False, reduce_precision=None, compression_algorithm='lzma', verbose=True)[source]

Function to write the STARLING ensemble to a file in the STARLING format (.starling). This is actially just a dictionary with the amino acid sequence, the distance maps, and the SSProtein object if available.

Parameters:
  • ensemble_object (starling.structure.Ensemble) – The STARLING ensemble object to save to a file.

  • filename (str) – The filename to save the ensemble to; note this should not include a file extenison and if it does this will be removed

  • compress (bool) – Whether to compress the file or not. Default is False.

  • reduce_precision (bool) – Whether to reduce the precision of the distance map to a single decimal point and cast to float16 if possible. Default is None. Sets to False if compression is False, but True if compression is True.

  • compression_algorithm (str) – The compression algorithm to use. Options are ‘gzip’ and ‘lzma’. lzma gives better compression if reduce_precision is set to True, but actually ‘gzip’ is better if reduce_precision is False. ‘lzma’ is also slower than ‘gzip’. Default is ‘lzma’.

  • verbose (bool) – Flag to define how noisy we should be