Contents of the OBJ and MTL Output Files
CHAP uses the Wavefront OBJ geometry file format and the associated Wavefront MTL material library format to represent the geometry of a channel’s permeation pathway and its colour coding according to various properties such as channel radius or channel hydrophobicity. The following paragraphs will not repeat the definition of the Wavefront format as such, but rather describe how it is used by CHAP to export pathway geometries.
Each output.obj
file generated by CHAP contains only one object record
(denoted by o
) and a unique set of vertices and vertex normals (denoted by v
and vn
respectively). These are three-vectors of Cartesian coordinates given
in Angstroms for compatibility with the units used by most common molecular
graphics packages. Currently, CHAP also writes numbers to the vertex weight
field, but these are not meaningful and will be deprecated in future releases.
Note that CHAP does not write any texture vertices (vt
records).
Following the definition of vertices and vertex normals, the output.obj
file
defines the triangular faces (records denoted by f
) that make up the pathway
surface. The face records belong to different groups (denoted by g
), where
each group of faces represents one of the following pathway properties:
Property | Description |
---|---|
radius |
Radius of the pathway through the structure defined in the input topology. Rescaled to the interval [0, 1] before colour scale mapping. |
avg_radius |
Time-averaged pathway radius. Rescaled to the interval [0, 1] before colour scale mapping. |
avg_pl_hydrophobicity |
Time-averaged hydrophobicity due to pore-lining residues. Rescaled to the interval [-1, 1] before colour scale mapping. |
avg_pf_hydrophobicity |
Time-averaged hydrophobicity due to pore-facing residues. Rescaled to the interval [-1, 1] before colour scale mapping. |
avg_density |
Time-averaged solvent density. Rescaled to the interval [0, 1] before colour scale mapping. |
avg_energy |
Time-averaged solvent free energy. Rescaled to the interval [0, 1] before colour scale mapping. |
As all properties are mapped onto the same surface geometry, the faces in each
group reference identical vertices and vertex normals, but are interspersed with
different usemtl
directives. Each usemtl
directive references a material
defined in the output.mtl
file linked by the mtllib
record at the beginning
of the output.obj
file. The output.mtl
file specifies the precise material
to use for a face, where each material only specifies the face colour. Note that
this is due to the specification of the OBJ format, which does not permit
per-vertex colours.
Face colours are calculated by averaging the (internally known) colours of the
three vertices defining a face. The vertex colours themselves are determined by
first calculating the value of the respective pathway property at the position
of a vertex (in pathway coordinates) and using the colour scales in
chap/share/data/palletes/default.json
to obtain corresponding RGB colours.
These RGB colours are then written to the output.mtl
file as the ambient
(Ka
), specular (Ks
), and diffuse (Kd
) colours of the respective material.
Note however that when loading CHAP output into VMD or PyMOL, only the ambient
colour will be used and the exact appearance of the surface will depend on the
scene settings of the respective viewer.
- Previous
- Next