Skip to content

Commit

Permalink
Merge pull request #14 from avrabyt/dev0.0.5.2
Browse files Browse the repository at this point in the history
Dev0.0.5.2
  • Loading branch information
avrabyt authored Sep 29, 2022
2 parents af44183 + b12b235 commit 9e20bde
Show file tree
Hide file tree
Showing 11 changed files with 457 additions and 167 deletions.
132 changes: 127 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,131 @@
# production
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

dist
# misc
# C extensions
*.so
.DS_Store

# Distribution / packaging
*.egg-info
__pycache__
build/*
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Try the app, for different examples.
``` python
import streamlit as st
import glob
from st_speckmol import spec_plot
from st_speckmol import speck_plot

# Example files path
ex_files = glob.glob("examples/*.xyz")
Expand All @@ -48,7 +48,7 @@ with st.sidebar:
f = open(example_xyz,"r")
example_xyz = f.read()

res = spec_plot(example_xyz)
res = speck_plot(example_xyz)

```

Expand All @@ -69,7 +69,7 @@ res = spec_plot(example_xyz)

## Related library - [Stmol](https://github.com/napoles-uach/stmol)

During the development of the related and popular library [Stmol](https://github.com/napoles-uach/stmol), we introduced `speck_plot()` function for easy usage of both libraries simultaneously. However, the entire StSpeckmol has not yet been merged and extra(read new) functions such as `add_spec_param` is only available with this library.
During the development of the related and popular library [Stmol](https://github.com/napoles-uach/stmol), we introduced `speck_plot()` function for easy usage of both libraries simultaneously. However, the entire StSpeckmol has not yet been merged and extra(read new) functions such as `add_speck_param` is only available with this library.

```python
# Installation of Stmol
Expand Down
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
st.sidebar.header(":sparkles: Install")
st.sidebar.code('''pip install st-speckmol''')
st.sidebar.subheader(':rocket: Usage')
st.sidebar.code('from st_speckmol import spec_plot')
st.sidebar.markdown(":heavy_check_mark: Quick Note: The module is **'spec_plot'** not ~~spec**k**_plot~~")
st.sidebar.code('from st_speckmol import speck_plot')
st.sidebar.markdown(":heavy_check_mark: Quick Note: The function `spec_plot` will be deprecated in furture release. Instead use `speck_plot`")

st.sidebar.markdown('''
---------
Expand Down
8 changes: 4 additions & 4 deletions pages/Example-1-Basic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import streamlit as st
import glob
from st_speckmol import spec_plot
from st_speckmol import speck_plot

st.markdown('''# st-speckmol :package:
_A Streamlit **Component** for creating Speck molecular structures within Streamlit Web app._
Expand All @@ -14,13 +14,13 @@
example_xyz = f.read()
st.sidebar.info(example_xyz.splitlines()[1])

res = spec_plot(example_xyz)
res = speck_plot(example_xyz)
with st.sidebar.expander('Code', expanded=False):
st.code(
'''
import streamlit as st
import glob
from st_speckmol import spec_plot
from st_speckmol import speck_plot
# Example files path
ex_files = glob.glob("xyz_mol_examples/*.xyz")
Expand All @@ -30,6 +30,6 @@
example_xyz = f.read()
st.sidebar.info(example_xyz.splitlines()[1])
res = spec_plot(example_xyz)
res = speck_plot(example_xyz)
'''
)
8 changes: 4 additions & 4 deletions pages/Example-2-Parameters-Usage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import streamlit as st
import glob
from st_speckmol import spec_plot
from st_speckmol import speck_plot

st.markdown('''# st-speckmol :package:
_A Streamlit **Component** for creating Speck molecular structures within Streamlit Web app._
Expand All @@ -26,14 +26,14 @@
'bonds': bond ,'bondShade' : bondShade,
'brightness': brightness, 'relativeAtomScale':relativeAtomScale,
}
res = spec_plot(example_xyz,_PARAMETERS = _PARAMETERS,wbox_height="500px",wbox_width="500px")
res = speck_plot(example_xyz,_PARAMETERS = _PARAMETERS,wbox_height="500px",wbox_width="500px")

with st.expander('Code',expanded=False):
st.code(
'''
import streamlit as st
import glob
from st_speckmol import spec_plot
from st_speckmol import speck_plot
# Example files path
ex_files = glob.glob("xyz_mol_examples/*.xyz")
Expand All @@ -55,6 +55,6 @@
'bonds': bond ,'atomShade' : atomShade,
'brightness': brightness, 'relativeAtomScale':relativeAtomScale,
}
res = spec_plot(example_xyz,_PARAMETERS = _PARAMETERS,wbox_height="500px",wbox_width="500px")
res = speck_plot(example_xyz,_PARAMETERS = _PARAMETERS,wbox_height="500px",wbox_width="500px")
'''
)
4 changes: 2 additions & 2 deletions pages/Example-3-Playground.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import streamlit as st
from st_speckmol import spec_plot
from st_speckmol import speck_plot

st.markdown('''# st-speckmol :package:
_A Streamlit **Component** for creating Speck molecular structures within Streamlit Web app._
Expand All @@ -18,7 +18,7 @@
value = example_xyz, height = 200)

st.code(_xyz.splitlines()[1])
res = spec_plot(_xyz)
res = speck_plot(_xyz)

with st.sidebar.expander("Notes:",expanded=True):

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
# read the contents of your README file
with open("README.md", "r", encoding='utf8') as fh:
long_description = fh.read()

exec(open('st_speckmol/version.py').read())
setuptools.setup(
name="st_speckmol",
version="0.0.5.1",
version=__version__,
author="Avratanu Biswas",
author_email="[email protected]",
description="Streamlit component for for Speck molecule visualization.",
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/avrabyt/Specklit",
# url = "https://github.com/avrabyt/st-speckmol/tree/dev0.0.5.2",
packages=setuptools.find_packages(),
include_package_data=True,
classifiers=[],
Expand Down
Loading

0 comments on commit 9e20bde

Please sign in to comment.