The utils module

This module contains some utility functions/classes that are directly written in Python. Every object described here is contained in the same module and can be accessed as baggianalysis.utils.object.

print_bondfile

Print the bondfile relative to the given system.

print_detailed_polymer_topology

Print the topology for the given system.

baggianalysis.utils.print_bondfile(filename, system, shift_indexes=False)

Print the bondfile relative to the given system. The bondfile will contain 2N lines, where N is the number of particles.

Parameters
  • filename (str) – The name of the file that will be printed.

  • system (System) – The system whose bonds will be printed.

  • shift_indexes (bool) – Whether indexes should be shifted by one. This is used to transform zero-based indexes to one-based for e.g. Fortran compatibility. Defaults to False.

baggianalysis.utils.print_detailed_polymer_topology(filename, system, shift_indexes=False)

Print the topology for the given system. The bondfile will contain 2N + 1 lines, where N is the number of particles.

Parameters
  • filename (str) – The name of the file that will be printed.

  • system (System) – The system whose bonds will be printed.

  • shift_indexes (bool) – Whether indexes should be shifted by one. This is used to transform zero-based indexes to one-based for e.g. Fortran compatibility. Defaults to False.