Ring class

class AaronTools.ring.Ring(frag, name=None, end=None)

Attributes:

  • name

  • atoms

  • end

__init__(frag, name=None, end=None)
Parameters:
  • frag – can be either a file sub, a geometry, or an atom list

  • name (str) – name of the object

  • end (list(Atom)) – defines which part of the ring is not part of the fragment

classmethod from_string(name, end_length, end_atom=None, form='smiles')

create ring fragment from string :param str name: identifier for ring :param int end_length: number of atoms in ring end :param end_atom: identifiers identifier for ring end :param str form: type of identifier (smiles, iupac)

classmethod list(include_ext=False)

list rings in the ring library

copy()

creates a new copy of the geometry

Parameters:
  • atoms (list(Atom)) – atoms to copy defaults to all atoms

  • name (str) – defaults to NAME_copy

  • comment (str) – comment to add to the copy, defaults to self’s comment

  • copy_atoms (bool) – passed to _fix_connectivity, defaults to True

find_end(path_length, start=[])

finds a path around self

Parameters:
  • path_length (int) – length of path in atoms to be traced

  • start (list(Atom)) – atom(s) to start on when tracing

Returns:

atoms in path as well as distance along path

Return type:

appended as a comment on self