molsysmt.molecular_mechanics.get_forces#

molsysmt.molecular_mechanics.get_forces(molecular_system, element='atom', selection='all', magnitude=False, engine='OpenMM', syntax='MolSysMT', skip_digestion=False)[source]#

Calculating the atomic forces acting on the molecular system.

Parameters:
  • molecular_system (molecular system) – Molecular system in any supported MolSysMT format.

  • element (str, default='atom') – Structural element level to query (‘atom’, ‘group’, ‘component’, ‘molecule’, ‘chain’, ‘entity’).

  • selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.

  • magnitude (bool, default=False) – Whether to return the scalar magnitude of forces.

  • engine (object, default='OpenMM') – Argument engine.

  • syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).

  • skip_digestion (bool, default=False) – Whether to skip MolSysMT’s internal argument digestion mechanism.

Returns:

NumPy array of force vectors with shape (n_atoms, 3) in canonical units (kJ/(mol*nm)).

Return type:

quantity

Added in version 1.0.0.