Quickly Find the Right Chains Using Attributes in SAMSON

When working with complex molecular systems, one of the recurring frustrations for molecular modelers is navigating large structures with dozens (or hundreds) of chains. Whether you’re prepping for simulations, visual analysis, or editing molecular systems, trying to find specific chains based on meaningful criteria (like size, composition, or visibility) can lead to a lot of manual effort.

The Node Specification Language (NSL) in SAMSON offers a way to overcome this. Specifically, chain attributes make it easy to filter just the chains you care about, without manually searching through a model tree or graphical selections. If you’re not already using this feature, this post will walk you through the basics so you can work faster and more precisely.

Why filter by chain attributes?

Imagine you’ve imported a large protein complex and want to focus only on chains with more than 100 residues, or those that are invisible, or ones with a high carbon count. Manually clicking through the model tree is slow, prone to errors, and isn’t scalable. Chain filtering lets you:

  • Quickly isolate chains based on chemical content (like C, H, O count)
  • Filter based on visibility, selection, or material settings
  • Find chains with partial or formal charges within a range
  • Combine filters logically for advanced queries

How this works in NSL

In NSL, the c prefix is used to denote attributes related to chains. For instance, if you want to select chains with more than 130 residues:

If you want chains with an ID between 2 and 4, or chain ID 6:

Need to find chains with fewer than 3 segments?

Want chains that are visible and have their selection flag turned off?

These attributes can be combined using logical operators to build powerful queries. For example, to find chains with more than 10 structural groups and a partial charge greater than 1.5:

Quick reference to useful attributes

Here are some helpful attributes and their abbreviations you can use in chain queries:

  • c.id – chain ID
  • c.nr – number of residues
  • c.ns – number of segments
  • c.nsg – number of structural groups
  • c.fc, c.pc – formal and partial charges
  • c.nC, c.nH, c.nO, etc. – atom counts
  • c.h, c.v – hidden and visible flags
  • c.sf, c.selected – selection flags

Real use case: Focus on chains with specific composition

If you’re validating a model generated by a prediction algorithm and want to identify chains with carbon counts outside an expected range, simply run:

This approach lets you spot potential outliers in seconds, which is especially useful when you’re preparing a system for energy minimization or molecular dynamics.

Conclusion

Chain attributes in NSL make it much easier to navigate complex molecular structures. Whether you’re refining a simulation input, checking structure validity, or visualizing just the chains you care about, this filtering method can save a lot of time and effort.

To delve deeper into each chain attribute and explore more examples, visit the full documentation page here: https://documentation.samson-connect.net/users/latest/nsl/chain/

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

Comments are closed.