xnn.ffnn.models.amoebalib.write_tinker_prm#
- xnn.ffnn.models.amoebalib.write_tinker_prm(lib, path, title=None, keep_numbers=False)[source]#
Write a library as a Tinker parameter file.
Atom types and classes are renumbered 1..N in library order (Tinker needs integers), or keep their own numbers with
keep_numbers; the mapping is returned so coordinate files can be written with matching type numbers. Torsion amplitudes are written divided bytorsionunitagain. The file is read by Tinker and by the LAMMPS AMOEBA package.- Parameters:
lib (AmoebaLibrary) – The library.
path (str or Path) – Output path.
title (str, optional) – The
forcefieldname written; default the library’s setting.keep_numbers (bool, optional) – Write the type and class names as they are, for a library whose names are Tinker’s integers (one read from a
.prmfile), so existing coordinate files stay valid.
- Returns:
{"types": {name: int}, "classes": {name: int}}.- Return type:
- Raises:
ValueError – With
keep_numbers, when a type or class name is not a positive integer or two names give the same number.