High-throughput calculations with precomputed SASAs

The m-value and transfer free energy calculations both require computing the solvent accessible surface area (SASA) of the protein atoms using Creamer united-atom radii. By default, each call to mvalue or transfer_free_energy recomputes the SASA from scratch, which dominates the runtime. When only the cosolvent, selection, or model changes between calls — but the atomic coordinates stay fixed — the SASA can be computed once and reused.

Computing the SASA with Creamer radii

Pass CreamerUnitedAtomRadii as the first argument to sasa_particles to obtain a SASA{CreamerUnitedAtomRadii} object that is compatible with both mvalue and transfer_free_energy:

using PDBTools
native_state = read_pdb(PDBTools.MJC_NATIVE, "protein")
desnat_state = read_pdb(PDBTools.MJC_DESNAT, "protein")
sasa_native  = sasa_particles(CreamerUnitedAtomRadii, native_state)
PDBTools.SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
    Number of particles: 999
    Total SASA: 4234.1675
    Output of dots: false 
sasa_desnat  = sasa_particles(CreamerUnitedAtomRadii, desnat_state)
PDBTools.SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
    Number of particles: 1007
    Total SASA: 9145.468
    Output of dots: false 

Reusing precomputed SASAs for m-values

Pass the two SASA{CreamerUnitedAtomRadii} objects directly to mvalue instead of the atom arrays. All keyword arguments (model, sel, backbone, sidechain, parallel) work identically:

m_urea = mvalue(sasa_native, sasa_desnat, "urea"; model=MoeserHorinek)
PDBTools.MValue{MoeserHorinek} - 69 residues - cosolvent: "urea"
    Total m-value: -1.2157167 kcal mol⁻¹
    Backbone contributions: -0.713593 kcal mol⁻¹
    Side-chain contributions: -0.5021237 kcal mol⁻¹

The same precomputed SASAs can be queried immediately without repeating the geometry computation, with a different cosolvent

m_tmao   = mvalue(sasa_native, sasa_desnat, "tmao")
PDBTools.MValue{AutonBolen} - 69 residues - cosolvent: "tmao"
    Total m-value: 2.772848 kcal mol⁻¹
    Backbone contributions: 3.444488 kcal mol⁻¹
    Side-chain contributions: -0.6716401 kcal mol⁻¹

or a residue selection,

m_acidic = mvalue(sasa_native, sasa_desnat, "urea"; sel="acidic")
PDBTools.MValue{AutonBolen} - 8 residues - cosolvent: "urea"
    Total m-value: -0.021918729 kcal mol⁻¹
    Backbone contributions: -0.08974668 kcal mol⁻¹
    Side-chain contributions: 0.06782795 kcal mol⁻¹

Reusing precomputed SASAs for transfer free energies

For transfer_free_energy, a single structure is used, so only one SASA is precomputed:

sasa_native2 = sasa_particles(CreamerUnitedAtomRadii, native_state)
PDBTools.SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
    Number of particles: 999
    Total SASA: 4234.1675
    Output of dots: false 
t_urea = transfer_free_energy(sasa_native2, "urea")
PDBTools.TransferFreeEnergy{AutonBolen} - 69 residues to 1M "urea".
    Total transfer free energy: -0.7395303 kcal mol⁻¹
    Backbone contributions: -0.98496294 kcal mol⁻¹
    Side-chain contributions: 0.2454326 kcal mol⁻¹
t_tmao = transfer_free_energy(sasa_native2, "tmao")
PDBTools.TransferFreeEnergy{AutonBolen} - 69 residues to 1M "tmao".
    Total transfer free energy: 1.3157649 kcal mol⁻¹
    Backbone contributions: 2.2729914 kcal mol⁻¹
    Side-chain contributions: -0.9572266 kcal mol⁻¹

Enforced radii compatibility

Passing a SASA object computed with any other radii parameterization raises an informative error, ensuring that m-values and transfer free energies are never silently computed from incompatible surface areas.