Skip to content

Commit

Permalink
🚀 ready for v0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
avrabyt committed Sep 29, 2022
1 parent 1f78c66 commit b12b235
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
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
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +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.2",
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",
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
1 change: 1 addition & 0 deletions st_speckmol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import ipywidgets as widgets
from ipywidgets import embed
import ipyspeck
from .version import __version__

def speck_plot(_xyz, wbox_height="700px",
wbox_width="800px",
Expand Down
1 change: 1 addition & 0 deletions st_speckmol/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.6'

0 comments on commit b12b235

Please sign in to comment.