Write coordinate and topology data from a loaded molecule to a file

  • molid (int) – Molecule ID to read data into
  • filetype (str) – File type of coordinate data
  • filename (str) – Path to coordinate data
  • first (int) – First frame to read. Defaults to 0 (first frame)
  • last (int) – Last frame to read, or -1 for the end. Defaults to -1
  • stride (int) – Frame stride. Defaults to 1 (read all frames)
  • selection (atomsel) – Atom indices to write. Defaults to all atoms.Returns:
  • (int) – Number of frames written