Installing Python Packages in SAMSON—What Molecular Modelers Need to Know

When using SAMSON for molecular modeling, integrating powerful Python packages can significantly improve your workflow, especially if you’re automating simulations, analyzing data, or integrating machine learning into your research. However, choosing the right environment and knowing how to manage Python packages isn’t always straightforward—especially if your platform is more visual and less about command-line interfaces.

Fortunately, SAMSON provides a built-in Python Package Manager, accessible through its integrated Python Console, helping you install, update, and uninstall Python packages directly within the platform. Here’s how it works—and how you can take advantage of it to enhance your modeling projects.

Simplified Package Installation, Right Where You Code

No need to configure virtual environments or deal with command-line terminals. Once you open the Python Console (navigate to Interface > Python Console in SAMSON), just go to Edit > Manage packages… to launch SAMSON’s Python Package Manager:

Manage packages...

From there:

  • Type the name of the package you want to install.
  • Click Install. Done.

It’s the same as using pip install package-name, but fully integrated into SAMSON’s interface.

Advanced Use: Versions and Flags

Need a specific version, or want to upgrade to the latest one? The Package Manager accepts standard pip syntax:

  • scikit-learn==0.24.2 installs an exact version.
  • numpy>=1.20.0 installs with minimum version constraints.
  • matplotlib --upgrade upgrades packages when available.

This is especially useful when you rely on stability or compatibility in scientific workflows.

Package Manager: install a Python package

Working with Local Packages

Many researchers develop their own tools or scripts and want to test them within SAMSON. You can install local packages too:

  • Select the local folder with your setup.py.
  • Choose whether you want to install it in editable mode.
  • Click Install.

Package Manager: install a local Python package

Editable mode is ideal if you’re still developing your script, because it reflects changes in real time—no need to reinstall repeatedly.

Uninstalls Are Easy Too

To remove a package, just type its name and click Uninstall. This works for both PyPI and locally installed tools. It lets you keep your environment clean while adapting to different research needs.

Why This Matters

For molecular modelers, jumping between environments—SAMSON for modeling, terminals for package installs, notebooks for analysis—can disrupt productivity and raise compatibility issues. With a unified package management system embedded directly in the modeling platform, SAMSON removes that friction.

Whether you’re running simulations that require numpy, building deep learning models with tensorflow, or creating interactive visualizations with matplotlib, you’ll be able to install everything you need right where you work—with no context switching.

To explore all scripting features, check out the official SAMSON Scripting Documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.