When you’re working with molecular structures that contain multiple conformations, it’s easy to get lost in long lists of data, especially in large systems. Whether you’re preparing datasets, designing filters for simulations, or just trying to isolate a subset of meaningful conformational states, you may want to target only the conformations that match specific constraints—like their number of atoms.
That’s where the Node Specification Language (NSL) in SAMSON can help. More specifically, using the conformation.numberOfAtoms attribute (short name: co.nat) allows you to filter conformations efficiently and precisely. It’s simple, but powerful.
🔍 A common challenge: too many conformations
Imagine you’re analyzing a trajectory of a large molecule that has been sampled into 500 conformations. Some of these may represent unfolded states and contain far fewer atoms due to clipping or extraction errors. Visual inspection is tedious and error-prone.
Instead, you can write a quick NSL query to analyze or hide conformations that don’t meet a certain atom count criterion.
📘 How to use conformation.numberOfAtoms in NSL
The syntax is designed to be concise. Here are the basics:
co.nat > 100: matches conformations with more than 100 atomsco.nat 100:200: matches conformations with between 100 and 200 atoms
For example, if you want to isolate only medium-sized conformations for your analysis, something like co.nat 150:300 will immediately filter them for you.
📈 What this enables
This feature integrates seamlessly into your modeling workflow:
- Pre-selection of relevant conformations for machine learning datasets, before exporting data to external formats
- Filtering out erroneous or incomplete states that may skew your electrostatic or energy calculations
- Speeding up visualization by loading only subsets that matter, enhancing clarity during presentations or publications
Combined with other filters
The real power comes when combining co.nat with other filters like co.selected or co.n (the name). For example:
|
1 |
co.nat > 250 and co.n "Folded*" |
This will return only conformations with more than 250 atoms and names starting with “Folded”—a useful trick when working with naming conventions.
Tips for effective usage
- Use exact numbers to target known conformations.
- Combine with wildcards in names (e.g.,
co.n "State_*") for precise batch selection. - Test queries in smaller datasets before applying them on wider selections.
To learn more about this and other NSL filters specific to conformations in SAMSON, check the full documentation at this page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
