A faster way to find the right structures in crowded folders

A crowded molecular project can make a simple question surprisingly time-consuming: which folders contain the structures I actually need? You might be looking for small molecules within a size range, folders with a particular number of chains, or structures whose total charge falls within a useful interval. Opening folders one at a time turns these checks into repetitive manual work.

In SAMSON, the Node Specification Language (NSL) lets you describe folder criteria as expressions. The folder attribute space uses f as its short name and matches folder nodes only. That makes it useful for narrowing a search by properties such as atom counts, composition, chains, residues, and charge.

Start with the size of the structure

If you need to screen folders by atom count, use f.nat, the short name for numberOfAtoms. For example, f.nat 100:200 matches folders with between 100 and 200 atoms. If you want to exclude larger structures, f.nat < 1000 expresses that upper bound.

This can be a practical first pass when a collection contains structures of very different sizes. Rather than relying on a folder name or remembering which entries you have already inspected, specify the range you care about. The same pattern applies to many of the integer-valued folder attributes.

Use counts to describe what you’re looking for

Atom count is only one way to narrow a collection. If the number of chains matters, use f.nc: f.nc < 3 matches folders with fewer than three chains, while f.nc 2:4 selects the documented range of two to four. For residues, f.nr > 100 finds folders with more than 100 residues. For molecules, f.nm 2:4 matches folders with between two and four molecules.

These criteria help turn a vague search into a testable one. For instance, “a structure with a substantial number of residues” can become a residue-count query, while “a folder containing only a small number of chains” can become a chain-count query. The right attribute depends on what the structure represents and what you are trying to compare.

Screen by elemental composition or charge

When composition is more important than overall size, folder attributes include counts for carbon, hydrogen, nitrogen, oxygen, sulfur, and coarse-grained atoms. Their short names include f.nC, f.nH, f.nN, f.nO, f.nS, and f.ncga. For example, f.nO 10:20 matches folders with between 10 and 20 oxygen atoms. These count attributes work like numberOfAtoms.

Charge can also be part of the search. Use f.fc for total formal charge and f.pc for total partial charge. For example, f.fc 6:8 looks for folders whose structures have a formal charge between 6 and 8; f.pc 1.5:2.0 looks for a total partial charge between 1.5 and 2.0. These are distinct attributes, so choose the one that matches the charge quantity relevant to your task.

Make the query reflect the decision

A useful habit is to begin with the property that would eliminate the most irrelevant folders, then refine your search based on the question at hand: size, number of chains, residue count, elemental composition, or charge. The examples above are individual expressions; check the NSL syntax documentation for how to combine conditions when you need several criteria at once.

Folder attributes also inherit general node properties, including name, visible, and selected. These can help describe folders by their names or current state, while the structure-specific attributes focus on what the folders contain.

For the full attribute reference and additional examples, see the SAMSON folder attributes documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.