File Formats#

This page documents all file formats supported by Mosaic, their specifications, and usage details.

Volume Formats#

MRC (.mrc, .map)#

  • Type: Binary

  • Description: Standard format for electron microscopy density maps

  • Header: Contains voxel size, grid dimensions, origin coordinates

  • Byte Order: Machine-dependent, typically little-endian

  • Data Types: 8-bit, 16-bit, 32-bit, float

  • Specification: http://www.ccpem.ac.uk/mrc_format/mrc2014.php

EM (.em)#

  • Type: Binary

  • Description: IMAGIC EM format for microscopy data

  • Header: 512 bytes header with dimensions and metadata

  • Data Types: 8-bit, 16-bit, 32-bit float

HDF5 (.h5)#

  • Type: Binary hierarchical container (created using PyTME)

  • Description: General-purpose scientific data format

  • Structure: Groups, datasets, and attributes

  • Data Types: Supports all primitive types

  • Compression: Supports various compression methods

Point Cloud Formats#

CSV (.csv, .xyz)#

  • Type: ASCII text

  • Delimiter: Comma (,)

  • Structure: X,Y,Z[,ID] per line

  • Header: Optional first line with column names

  • Example:

    x,y,z,id
    1.234,5.678,9.012,0
    2.345,6.789,0.123,0
    

TSV (.tsv)#

  • Type: ASCII text

  • Delimiter: Tab character

  • Structure: PyTME orientations format with coordinates and euler angles

  • Header: Required first line with column names including ‘euler’ for orientations

  • Columns: x, y, z, euler_x, euler_y, euler_z, score, detail

  • Example:

    x y z euler_x euler_y euler_z score detail
    100.0 200.0 300.0 45.0  90.0  0.0 0.85  -1
    150.0 250.0 350.0 30.0  85.0  15.0  0.92  -1
    

PDB (.pdb)#

  • Type: ASCII text

  • Description: Protein Data Bank format for atomic coordinates

  • Structure: Fixed-width columns with atom records

  • Key Records: ATOM, HETATM for coordinates; HEADER, TITLE for metadata

  • Coordinates: Columns 31-38 (x), 39-46 (y), 47-54 (z) in Ångströms

  • Specification: https://www.wwpdb.org/documentation/file-format

  • Example:

    ATOM      1  N   ALA A   1      20.154  16.967  10.000  1.00 20.00           N
    ATOM      2  CA  ALA A   1      21.618  17.000  10.000  1.00 20.00           C
    ATOM      3  C   ALA A   1      22.109  18.430  10.000  1.00 20.00           C
    

GRO (.gro)#

  • Type: ASCII text

  • Description: GROMACS coordinate format for molecular dynamics

  • Structure: Title line, atom count, atom records, box vectors

  • Format: Fixed-width columns with residue info and coordinates

  • Coordinates: Positions typically in nanometers

  • Specification: https://manual.gromacs.org/current/reference-manual/file-formats.html

  • Example:

    Generated by gmx pdb2gmx
         2
        1ALA      N    1   2.015   1.697   1.000
        1ALA     CA    2   2.162   1.700   1.000
       2.50000   2.50000   2.50000
    

STAR (.star)#

  • Type: ASCII text

  • Description: Relion 4 data format for particle metadata

  • Structure: Header with column definitions followed by data

  • Key Columns: - _rlnCoordinateX, _rlnCoordinateY, _rlnCoordinateZ - _rlnAngleRot, _rlnAngleTilt, _rlnAnglePsi

  • Example:

    data_
    loop_
    _rlnCoordinateX #1
    _rlnCoordinateY #2
    _rlnCoordinateZ #3
    _rlnAngleRot #4
    _rlnAngleTilt #5
    _rlnAnglePsi #6
    100.0 200.0 300.0 45.0 90.0 0.0
    

CIF (.cif)#

  • Type: ASCII text

  • Description: Crystallographic Information File format

  • Structure: Data blocks with loop definitions

  • Domain: Atomic structures with positions and orientations

Mesh Formats#

OBJ (.obj)#

  • Type: ASCII text

  • Structure: Lists of vertices, faces and normals

  • Prefix: ‘v’ for vertices, ‘f’ for faces, ‘vn’ for normals

  • Specification: http://paulbourke.net/dataformats/obj/

  • Example:

    v 1.0 0.0 0.0
    v 0.0 1.0 0.0
    v 0.0 0.0 1.0
    f 1 2 3
    

PLY (.ply)#

  • Type: ASCII or binary

  • Description: Stanford polygon format

  • Header: Defines element types and counts

  • Data: Vertices and faces with properties

  • Specification: https://www.loc.gov/preservation/digital/formats/fdd/fdd000501.shtml

  • Example Header:

    ply
    format ascii 1.0
    element vertex 3
    property float x
    property float y
    property float z
    element face 1
    property list uchar int vertex_indices
    end_header
    

STL (.stl)#

Trajectory Formats#

TSI (.tsi, .q)#

  • Type: ASCII text

  • Description: Topology files with time series data

  • Structure: Version, box dimensions, vertices, faces

  • Specification: weria-pezeshkian/FreeDTS

  • Example:

    version 1.1
    box 100.0 100.0 100.0
    vertex 1000
    1 10.0 20.0 30.0
    ...
    triangle 1500
    3 0 1 2
    ...
    

VTU (.vtu)#

  • Type: XML-based

  • Description: VTK unstructured grid files

  • Structure: Points, cells, and data arrays

  • Features: Supports cell and point data attributes

Session Format#

Pickle (.pickle)#

  • Type: Binary

  • Description: Python serialization format

  • Content: Complete Mosaic session with all objects

  • Compatibility: Python version dependent

  • Security: Only open pickles from trusted sources

See Also#

Import and Export for import and export options