chisurf.fio.structure.density module

chisurf.fio.structure.density.open_dx(density: 'np.array', ro: 'np.array', rn: 'np.array', dr: 'np.array') → 'str'[source]

Returns a open_dx string compatible with PyMOL

Parameters
  • density (array) – 3d-grid with values (densities)

  • ro (array) – origin (x, y, z)

  • rn (array) – number of grid-points in x, y, z

  • dr (array) – grid-size (dx, dy, dz)

Return type

str

Returns

string

chisurf.fio.structure.density.save_bvox(data: 'np.ndarray', filename: 'str') → 'None'[source]

Saves as 3D voxel array containing for instance densities as a bvox (binary voxel) file that can be opened in Blender.

Parameters
  • data (ndarray) – A 3D density map

  • filename (str) – The output filename

Return type

None

Returns

chisurf.fio.structure.density.write_open_dx(filename: 'str', density: 'np.array', r0: 'np.array', nx: 'int', ny: 'int', nz: 'int', dx: 'float', dy: 'float', dz: 'float') → 'None'[source]

Writes a density into a dx-file

Parameters
  • filename (str) – output filename

  • density (array) – 3d-grid with values (densities)

  • density

  • r0 (array) – origin (x, y, z)

  • nx (int) –

  • ny (int) –

  • nz (int) –

  • dx (float) –

  • dy (float) –

  • dz (float) –

Return type

None

Returns