Suitename is primarily a self-contained program to be run from the command line. But the module suites.py makes its functions available as a library for use by other CCTBX programs. Presuming that a model has been loaded through DataManager.get_model or similar means, the following functions are available:

parseOptions(optionString, errorFile=None)
Use optionString to modify the defaults given in philOptions above. Returns a Python object that has an attribute for every option listed. The string provided looks like a command line with the command and the file name missing, for example: "chart=true noinc=true causes=true".  Use the philOptions definition at the top of suites.py as a guide for what options may be used.  errorFile, if given, collects any error messages.

setOptions(options):
Set the options to be used throughout the remaining operations.  The options object may be the result of parseOptions above or the result of an argparse parse_args operation. But it must contain the complete set of names as listed in philOptions.

getResidueDihedrals(model_manager, altcode, errorFile=None)
Calculate the dihedral angles along the backbone chain of the model, returning a list of Residue objects. errorFile, if given, collects any error messages.

(From the suiteninput module)
buildSuites(residues)
Calculate the suites, which lie between the residues, returning a list of Suite objects.

compute(suites)
This does the core work of Suitename, providing the results as annotations, i.e. additional attributes attached to each Suite object. These are:
bin
cluster
distance
suiteness
situation	as string describing how the cluster assignment was arrived at
issue		an indicator of the problem, if the suite was rejected
comment	a string sometimes carrying extra information

As well as storing information in the Suite objects, Suitename gathers statistics in its internal data structures, the Bin and Cluster objects (see suitenamedefs.py, suiteninit.py). The next two functions relate to these.

finalStats()
Collect information from the Cluster objects and summarize it in their parent objects, the Bins.

clearStats()
Clear all statistical information, resetting it to zeros as at the beginning of Suitename. Note that if one does multiple compute operations without a clearStats in between, the statistics will be a summary of all compute operations done.

write(outFile, suites)
Write the Suitename information to an output file in one of the standard Suitename formats, as specified in the options.