diff --git a/README.md b/README.md index 9478d0c..50c9246 100644 --- a/README.md +++ b/README.md @@ -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") @@ -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) ``` @@ -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 diff --git a/app.py b/app.py index 27aaf2d..54f030e 100644 --- a/app.py +++ b/app.py @@ -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(''' --------- diff --git a/pages/Example-1-Basic.py b/pages/Example-1-Basic.py index a372f42..dcd4e46 100644 --- a/pages/Example-1-Basic.py +++ b/pages/Example-1-Basic.py @@ -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._ @@ -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") @@ -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) ''' ) diff --git a/pages/Example-2-Parameters-Usage.py b/pages/Example-2-Parameters-Usage.py index 1804174..4a5ef35 100644 --- a/pages/Example-2-Parameters-Usage.py +++ b/pages/Example-2-Parameters-Usage.py @@ -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._ @@ -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") @@ -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") ''' ) diff --git a/pages/Example-3-Playground.py b/pages/Example-3-Playground.py index 294259d..3909da3 100644 --- a/pages/Example-3-Playground.py +++ b/pages/Example-3-Playground.py @@ -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._ @@ -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): diff --git a/setup.py b/setup.py index 5212bcd..7d40157 100644 --- a/setup.py +++ b/setup.py @@ -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="avrab.yt@gmail.com", 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=[], diff --git a/st_speckmol/__init__.py b/st_speckmol/__init__.py index f5c96b7..8c95f36 100644 --- a/st_speckmol/__init__.py +++ b/st_speckmol/__init__.py @@ -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", diff --git a/st_speckmol/version.py b/st_speckmol/version.py new file mode 100644 index 0000000..0a85db4 --- /dev/null +++ b/st_speckmol/version.py @@ -0,0 +1 @@ +__version__ = '0.0.6' \ No newline at end of file