Skip to content

Commit

Permalink
Using improved version of Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Oct 22, 2023
1 parent 3b2cde9 commit 0a43a9e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build-docs:
runs-on: ubuntu-latest
container: ghcr.io/ifilot/sphinx:v0.5.0
container: ghcr.io/ifilot/sphinx:v0.6.0
steps:
- uses: actions/checkout@v3
- name: Build documentation
Expand Down
4 changes: 2 additions & 2 deletions docs/community_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Community guidelines
********************

* Contributions to :program:`PyQInt` are always welcome and appreciated. Before doing
* Contributions to :program:`PyTessel` are always welcome and appreciated. Before doing
so, please first read the `CONTRIBUTING <https://github.com/ifilot/pyqint/blob/master/CONTRIBUTING.md>`_
guide.
* For reporting issues or problems with the software, you are kindly invited to
`to open a new issue on Github with the bug tag <https://github.com/ifilot/pyqint/issues/new?labels=bug>`_.
* If you seek support in using :program:`PyQInt`, please
* If you seek support in using :program:`PyTessel`, please
`open an issue with the question tag <https://github.com/ifilot/pyqint/issues/new?labels=question>`_.
* If you wish to contact the developers, please send an e-mail to i.a.w.filot@tue.nl.
45 changes: 42 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,54 @@
PyTessel: isosurface generation tool
====================================

.. image:: https://img.shields.io/github/v/tag/ifilot/pytessel?label=version
:alt: GitHub tag (latest SemVer)
.. image:: https://anaconda.org/ifilot/pytessel/badges/version.svg
:target: https://anaconda.org/ifilot/pytessel
.. image:: https://img.shields.io/pypi/v/pytessel?color=green
:target: https://pypi.org/project/pytessel/
.. image:: https://github.com/ifilot/pytessel/actions/workflows/build.yml/badge.svg
:target: https://github.com/ifilot/pytessel/actions/workflows/build.yml
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg
:target: https://www.gnu.org/licenses/gpl-3.0

:program:`PyTessel` is a Python package for building isosurfaces from 3D scalar
fields.
fields. It is originally designed to create isosurfaces of (molecular) orbitals
and electron densities, but is agnotistic with respect to data input.

To construct an isosurface, :program:`PyTessel` requires a scalar field and a
description of the unit cell wherein the scalar field resides. A very succinct
example of its operation is illustrated by the script below

.. code:: python
from pytessel import PyTessel
import numpy as np
def main():
pytessel = PyTessel()
# generate some data
x = np.linspace(0, 10, 50)
# the grid is organized with z the slowest moving index and x the fastest moving index
grid = np.flipud(np.vstack(np.meshgrid(x, x, x, indexing='ij')).reshape(3,-1)).T
R = [5,5,5]
scalarfield = np.reshape(np.array([gaussian(r,R) for r in grid]), (len(x),len(x),len(x)))
unitcell = np.diag(np.ones(3) * 10.0)
vertices, normals, indices = pytessel.marching_cubes(scalarfield.flatten(), scalarfield.shape, unitcell.flatten(), 0.1)
pytessel.write_ply('test.ply', vertices, normals, indices)
def gaussian(r, R):
return np.exp(-(r-R).dot((r-R)))
if __name__ == '__main__':
main()
The isosurface is represented by thee arrays, containing vertex coordinates,
the normals at those vertices and a list of indices containing the polygons
(here triangles) that compose the isosurface. :program:`PyTessel` offers the
option to save the isosurface as a `.ply file <https://en.wikipedia.org/wiki/PLY_(file_format)>`_.

:program:`PyTessel` has been developed at the Eindhoven University of Technology,
Netherlands. :program:`PyTessel` and its development are hosted on `github
Expand Down

0 comments on commit 0a43a9e

Please sign in to comment.