When working with a molecular design platform like SAMSON, the ability to customize your workflow with Python packages can significantly enhance automation, reproducibility, and analysis. However, managing these packages efficiently can sometimes be a challenge. SAMSON addresses this pain point by providing an integrated Python Package Manager, seamlessly built into its environment. Here’s how you can effectively use this feature.
Why Python Package Management Matters
Adding the right Python packages to your workflow can unlock advanced functionalities like deep learning, visualization, bioinformatics, and statistical analysis. Whether you’re a researcher running simulations or an educator creating interactive exercises, the ability to install, upgrade, or remove Python packages simplifies your setup and helps you focus on your molecular modeling task.
How to Access the Package Manager
Using SAMSON’s Python Package Manager is straightforward. Simply open the Python Console through Interface > Python Console and navigate to Edit > Manage packages…. This will launch the Package Manager window:

Installing New Python Packages
Adding packages to SAMSON is as simple as providing the package name and clicking Install. The Package Manager uses pip under the hood, so you can install packages from PyPI or even specify versions:
- Install a specific version:
foo==1.2.0 - Install a minimum version:
foo>=2.1.0 - Include
pipflags, e.g.,foo --upgradeto upgrade to the latest version

Installing Local Python Packages
If you need to integrate a local Python package—such as one you’re actively developing—the Package Manager has you covered. Simply provide the path to a valid local package (e.g., with a setup.py file) and click Install. You can also install in the editable or develop mode (pip install -e) for a more dynamic setup where edits to the package are immediately reflected without reinstallation:

Note
If you don’t need to modify the source code of the package, it’s recommended to skip the editable mode for simplicity.
Be cautious on macOS, as packages installed in editable mode might not load on relaunching SAMSON. Uninstalling and reinstalling them or registering paths with sys.path might solve this issue.
Uninstalling Packages
Removing unwanted packages is just as easy; provide the package name and click Uninstall. This works for both PyPI-installed and local packages, keeping your environment clean and efficient.
Conclusion
Managing Python packages in SAMSON streamlines molecular design workflows, avoiding common frustrations and enabling advanced customization. Whether you’re fine-tuning simulations or exploring new analytical tools, SAMSON’s integrated package manager simplifies this process for scientists and educators alike. For a deeper dive into Python scripting with SAMSON, check out the official documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
