From 0c9dc2fd92ec890113f709729537597d59389e1f Mon Sep 17 00:00:00 2001 From: Daniel Utt Date: Tue, 15 Aug 2023 15:12:28 +0200 Subject: [PATCH] Update --- .gitignore | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 29 +++---- 2 files changed, 232 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 68bc17f..c0e0359 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,168 @@ +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,pycharm,macos,windows,linux,python +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,pycharm,macos,windows,linux,python + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### PyCharm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PyCharm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# Azure Toolkit for IntelliJ plugin +# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij +.idea/**/azureSettings.xml + +### Python ### # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -158,3 +323,55 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +### VisualStudioCode ### +.vscode + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,pycharm,macos,windows,linux,python diff --git a/README.md b/README.md index efb711d..bc00905 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # pyiron File Reader -*OVITO* Python file reader for the h5 data containers written by *pyiron*. +OVITO Python file reader for the h5 data containers written by *pyiron*. ## Description -Python file reader for *OVITO* that reads structural data from the hdf5 containers written by [*pyiron*](https://pyiron.org/). After installation, *OVITO* will auto-detect *pyiron* files and open them for analysis and visualization. +Python file reader for OVITO that reads structural data from the hdf5 containers written by [*pyiron*](https://pyiron.org/). After installation, OVITO will auto-detect *pyiron* files and open them for analysis and visualization. Note that the *"status"* of the pyiron job needs to be *"finished"* before its file can be read. The following table gives an overview over all *particle properties* and *attributes* currently understood by this parser. Optional properties will be skipped if they are not included in the file **and** the parser is not in strict mode. @@ -25,7 +25,7 @@ The following table gives an overview over all *particle properties* and *attrib | `generic/temperature` | `Temperature` | 1 | x | | `generic/energy_tot` | `Total energy` | 1 | x | -The file reader can be installed either into *OVITO Pro* or the [*OVITO* Python module](https://pypi.org/project/ovito/) Python module using *pip*. +The file reader can be installed either into OVITO Pro or the [OVITO Python module](https://pypi.org/project/ovito/) Python module using *pip*. ## Parameters - `roundCell` / "Round cell to orthogonal": Round the off-diagonal components of the simulation cell to `0` if they are below a threshold value currently hard-coded to `1e-8` A. @@ -34,25 +34,26 @@ The file reader can be installed either into *OVITO Pro* or the [*OVITO* Python ## Example 1. [Example 01](Examples/example_01.py) loads the [`lmp.h5` structure file](Examples/example_01/lmp.h5) and prints all *particle properties* and *attributes* found therein. -The following image shows the same file in the *OVITO PRO* desktop application. +The following image shows the same file in the OVITO Pro desktop application. ![Example 01](Examples/example_01.png) ### Example data generation The example data was generated using the [`generate_example_data_01.py`](Examples/generate_example_data_01.py) script using `pyiron`. For more information visit their [website](https://pyiron.org/). ## Installation -- OVITO PRO built-in Python interpreter -``` -ovitos -m pip install --user git+https://github.com/nnn911/pyironFileReader.git -``` -- Standalone Python package or Conda environment -``` -pip install --user git+https://github.com/nnn911/pyironFileReader.git -``` -- Please note that the `--user` tag is recommended but optional and depends on your Python installation. +- OVITO Pro [integrated Python interpreter](https://docs.ovito.org/python/introduction/installation.html#ovito-pro-integrated-interpreter): + ``` + ovitos -m pip install --user git+https://github.com/nnn911/pyironFileReader.git + ``` + The `--user` option is recommended and [installs the package in the user's site directory](https://pip.pypa.io/en/stable/user_guide/#user-installs). + +- Other Python interpreters or Conda environments: + ``` + pip install git+https://github.com/nnn911/pyironFileReader.git + ``` ## Technical information / dependencies -- Tested with *OVITO* 3.9.0 +- Tested with OVITO 3.9.1 - Depends on: - `numpy` - `h5py`