xnn.ffnn.models.amoebalib.read_tinker_xyz#

xnn.ffnn.models.amoebalib.read_tinker_xyz(path, library=None, type_map=None)[source]#

Read a Tinker .xyz coordinate file (atoms with types and bonds).

Parameters:
  • path (str or Path) – The file: a title line (atom count), an optional cell line, then one line per atom with index, name, x, y, z, atom type and the indices of the bonded atoms.

  • library (AmoebaLibrary, optional) – Used to translate the file’s integer types to the library’s type names (when the library keeps Tinker’s integers, as a library read from a .prm file does) and to assign the elements.

  • type_map (dict, optional) – {integer type: type name} translation (as returned by write_tinker_prm(), inverted), taking precedence over the library’s own names.

Returns:

positions (N, 3) in Angstrom (a list of lists), symbols, atomic_numbers, types (names), bonds (i, j) pairs with i < j, cell (None or the six lattice parameters) and title.

Return type:

dict