Filtering Molecular Models by Partial Charge for Cleaner Simulations

When preparing molecular systems for simulation or analysis, one often faces large sets of structural models from databases or previous computational experiments. These models may vary widely in their structural, chemical, and electrostatic properties. One important attribute that scientists often want to control is the partial charge of the system.

Why does this matter? In electrostatic simulations, docking routines, or charge-dependent optimizations, eliminating or isolating molecules with extreme or undesired partial charge values can help reduce computational overhead or numerical instability. But doing this manually across a large dataset can be tedious and error-prone.

Fortunately, the Node Specification Language (NSL) in SAMSON makes it easy to automate this task using partialCharge filters.

What is partialCharge in SAMSON?

The structuralModel.partialCharge attribute (short name: sm.pc) matches molecular models based on the sum of their partial charges. You can use this to select or exclude structural models depending on their total partial charge—useful for filtering charged or neutral systems before simulation.

How to use it

Here are some examples of how you can query structural models based on their partial charge:

  • sm.pc 1: Matches structural models whose total partial charge is exactly 1.
  • sm.pc 1.5:2.0: Selects structural models with total partial charge between 1.5 and 2.0 (inclusive).
  • sm.pc > 1.5: Matches models with a partial charge greater than 1.5.

This can be incredibly helpful if, for example, you want to identify high-charge species that might interfere with electrostatic simulations or visually highlight highly charged molecules in a collection of systems.

How this improves your workflow

Let’s say you’re importing hundreds of structural models from public databases. You want to isolate molecules that are nearly neutral in partial charge to run specific types of simulations. Instead of checking each model manually, simply run:

This selects all structural models with a near-neutral total partial charge, excluding molecules that would otherwise complicate the analysis.

Even more useful: You can combine this with other NSL filters. Want models that are neutral and under a certain size? Try this:

This would select near-neutral molecules with fewer than 200 atoms, ideal for lightweight simulations or training machine learning models.

Where to learn more

To get a full overview of available structural model attributes, visit the SAMSON documentation on structural model attributes. You’ll find other useful attributes like numberOfAtoms, formalCharge, and numberOfHydrogens that can also help streamline your workflow.

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

Comments are closed.