XBS file format =============== hofmann can read the ``.bs`` and ``.mv`` file formats from the original XBS_ ball-and-stick viewer by Methfessel (1995). .. _XBS: https://www.ccl.net/cca/software/X-WINDOW/xbs/ The ``.bs`` format ------------------ A ``.bs`` file defines atoms, species styles, and bond rules as a sequence of keyword lines. Blank lines and lines starting with ``*`` are comments. ``atom`` ~~~~~~~~ Defines an atom position:: atom Example:: atom C 0.000 0.000 0.000 atom H 1.155 1.155 1.155 ``spec`` ~~~~~~~~ Sets the display radius and colour for a species:: spec Colour can be: - A single float for grey (``0.0`` = black, ``1.0`` = white) - Three floats for RGB (each in ``[0, 1]``) - A CSS colour name Example:: spec C 1.000 0.7 spec H 0.700 1.00 spec O 0.900 1.0 0.0 0.0 ``bonds`` ~~~~~~~~~ Declares a bond detection rule between two species:: bonds Bonds are detected between all atom pairs of the given species whose distance falls within ``[min_len, max_len]``. Example:: bonds C H 0.000 3.400 0.109 1.00 bonds H H 0.000 2.800 0.109 1.00 ``poly`` ~~~~~~~~ Declares a coordination polyhedron rule:: poly [alpha] [colour] Polyhedra are drawn around atoms of species ```` using bonded neighbours as vertices. The optional ``alpha`` sets face transparency (default 0.4). Colour can be a grey float or three RGB floats; if omitted, the centre atom's colour is used. Example:: poly Ti 0.3 0.5 0.7 1.0 Complete example (CH4) ~~~~~~~~~~~~~~~~~~~~~~ :: atom C 0.000 0.000 0.000 atom H 1.155 1.155 1.155 atom H -1.155 -1.155 1.155 atom H 1.155 -1.155 -1.155 atom H -1.155 1.155 -1.155 spec C 1.000 0.7 spec H 0.700 1.00 bonds C H 0.000 3.400 0.109 1.00 bonds H H 0.000 2.800 0.109 1.00 The ``.mv`` format ------------------ The ``.mv`` format stores multi-frame trajectories (e.g. from molecular dynamics). Each frame is introduced by a ``frame`` line, followed by coordinates for all atoms listed sequentially: :: frame