Skip to content

A file reader & writer for OVITO surface meshes with their auxilliary information

License

Notifications You must be signed in to change notification settings

ovito-org/SurfaceMeshIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SurfaceMeshIO

OVITO extension to read/write surface meshes with all attached properties from/to a compressed numpy file.

The configuration of the visual element is not exported.

Example

The surface mesh created in examples/example_01.ovito can be exported using the export file dialog selecting the "Surface mesh file writer" format.

original mesh form the atomistic data

The resulting .npz file matches examples/example_01.npz. This file can be opened in OVITO Pro GUI. This reconstructs the surface mesh with all its properties.

mesh loaded from the npz file

Both import and export are also available from Python:

from ovito.io import import_file, export_file

# import npz file
pipeline = import_file("examples/example_01.npz")

from SurfaceMeshIO import SurfaceMeshFileWriter

# export npz file
export_file(data, "examples/example_01.npz", format=SurfaceMeshFileWriter, key=data.surfaces["surface"])

Installation

  • From the OVITO Pro using the extensions GUI

  • OVITO Pro integrated Python interpreter:

    ovitos -m pip install --user git+https://github.com/ovito-org/SurfaceMeshIO
    

    The --user option is recommended and installs the package in the user's site directory.

  • Other Python interpreters or Conda environments:

    pip install git+https://github.com/ovito-org/SurfaceMeshIO
    

Technical information / dependencies

  • Tested on OVITO version 3.12.0

Contact

Daniel Utt ([email protected])

About

A file reader & writer for OVITO surface meshes with their auxilliary information

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages