One common challenge in molecular modeling is navigating large datasets of conformations—especially when analyzing or comparing molecular structures with vastly different complexities. Sometimes all a modeler wants is to isolate conformations of similar complexity, or to filter out conformations that are too large for specific simulations or visual assessments. Fortunately, the Node Specification Language (NSL) in SAMSON includes a simple yet powerful feature to solve this: the numberOfAtoms attribute.
With co.nat (the short form of conformation.numberOfAtoms), you can easily query and filter conformations based on their atom count, directly in the SAMSON interface. This can save a lot of time when preparing systems for analysis or visualization.
Why filter by the number of atoms?
- Performance: Conformations with fewer atoms are often faster to simulate or visualize.
- Focus: In large projects, it’s useful to focus only on conformations of a certain size range.
- Batch Processing: Apply specific tasks (e.g., geometry optimization or property evaluation) only to conformations that meet practical size constraints.
How to use co.nat in NSL
The co.nat attribute lets you specify the number of atoms using simple expressions. Here are a few useful examples:
co.nat > 100: Selects conformations with more than 100 atoms.co.nat 100:200: Selects conformations with atom counts between 100 and 200, inclusive.co.nat <= 50: Selects conformations with 50 or fewer atoms.
These expressions can be included directly into search or filter commands in SAMSON’s NSL-powered interfaces, such as node selection or scripting tools.
Combine filters for more control
You can also combine the co.nat filter with other NSL attributes. For instance:
co.nat > 100 and co.sf: Conformations with more than 100 atoms that have the selectionFlag enabled.co.n "A*" and co.nat < 150: Conformations whose names start with ‘A’ and contain fewer than 150 atoms.
Combining these filters gives molecular modelers a fine degree of control over complex systems. You can rapidly isolate specific structural types based on size, state, or naming conventions.
Keep your workspace clean
By eliminating large, unwanted conformations early on, you speed up not only the processing but even the navigation within your molecular workspace. If your simulation or visualization tool becomes sluggish, consider filtering by co.nat to reduce complexity without compromising your results.
To explore more about how to work with conformation attributes in NSL, visit the official SAMSON documentation:
https://documentation.samson-connect.net/users/latest/nsl/conformation/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
