When modeling complex molecular systems, it’s often crucial to identify specific structural groups that carry a formal charge. Whether you’re studying ion-binding mechanisms, charge distributions, or preparing your system for electrostatics calculations, filtering for charged entities quickly can save you valuable time 🔍.
The Node Specification Language (NSL) in SAMSON makes this task easy—no scripting needed, just a simple and compact query like sg.fc > 0 to find positively charged groups.
What is formalCharge in NSL?
The formalCharge attribute (short name: sg.fc) is part of the Structural Group attribute space in the NSL. It matches structural groups with a specific total formal charge. Whether you want only groups with a charge of +1, or those with a range between +2 and +4, NSL let’s you define this in just one clean line.
Here are some example queries that might come in handy:
sg.fc 0: Matches only neutral structural groupssg.fc 1: Matches groups with a formal charge of +1sg.fc -1: Find negatively charged groupssg.fc 2:4: Select groups with charges from +2 to +4not sg.fc 0: Exclude neutral groups
During model preparation, especially in workflows that involve parameterization or force field assignments, it’s helpful to verify whether charged groups are present where you expect—or to ensure there are none where you don’t.
When does this matter?
Charged groups can affect a range of molecular properties from solubility to binding affinity. Here are some situations where identifying formal charges instantly pays off:
- 📌 Checking protonation states in a biomolecular model before simulations
- 📌 Preparing input for quantum mechanical calculations
- 📌 Filtering molecules before docking studies to exclude (or include) charged ligands
Why use NSL instead of searching manually?
Using NSL eliminates the need for manual inspection or custom scripts to sort through potentially thousands of atoms or residues. You can run a live query inside the SAMSON interface, and instantly see your matching structural groups highlighted in the viewport.
By combining sg.fc with other NSL attributes—like sg.nat for the number of atoms, or sg.n for matching based on name—you can create complex filters without a single line of programming code.
For example, to find small structural groups named with an “L” prefix (like ligands), carrying a negative charge, try:
sg.n "L*" and sg.fc < 0
This will match structural groups whose names start with ‘L’ and have a negative total formal charge. Easy, quick, and efficient.
To learn more about the formalCharge attribute in SAMSON NSL, visit the official documentation. The full overview of structural group attributes can be found here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
