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. Every model except MTRecord (see the Record model) is parameterized with Creamer united-atom radii; MTRecord was parameterized against, and expects, Richards united-atom radii instead (to match SurfaceRacer, which was used to compute its own ASA reference values). By default, each call to mvalue or transfer_free_energy recomputes the SASA from scratch, using whichever radii the requested model needs, 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)SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
Number of particles: 513
Total SASA: 4234.168
Output of dots: false sasa_desnat = sasa_particles(CreamerUnitedAtomRadii, desnat_state)SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
Number of particles: 513
Total SASA: 9248.048
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)MValue{MoeserHorinek} - 69 residues - cosolvent: "urea"
Total m-value: -1.2025213 kcal mol⁻¹
Backbone contributions: -0.675961 kcal mol⁻¹
Side-chain contributions: -0.5265603 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")MValue{AutonBolen} - 69 residues - cosolvent: "tmao"
Total m-value: 2.5198605 kcal mol⁻¹
Backbone contributions: 3.2425573 kcal mol⁻¹
Side-chain contributions: -0.7226967 kcal mol⁻¹or a residue selection,
m_acidic = mvalue(sasa_native, sasa_desnat, "urea"; sel="acidic")MValue{AutonBolen} - 8 residues - cosolvent: "urea"
Total m-value: -0.015120842 kcal mol⁻¹
Backbone contributions: -0.10998993 kcal mol⁻¹
Side-chain contributions: 0.09486909 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)SASA{CreamerUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
Number of particles: 513
Total SASA: 4234.168
Output of dots: false t_urea = transfer_free_energy(sasa_native2, "urea")TransferFreeEnergy{AutonBolen} - 69 residues to 1M "urea".
Total transfer free energy: -0.73953044 kcal mol⁻¹
Backbone contributions: -0.98496306 kcal mol⁻¹
Side-chain contributions: 0.24543259 kcal mol⁻¹t_tmao = transfer_free_energy(sasa_native2, "tmao")TransferFreeEnergy{AutonBolen} - 69 residues to 1M "tmao".
Total transfer free energy: 1.3157648 kcal mol⁻¹
Backbone contributions: 2.2729914 kcal mol⁻¹
Side-chain contributions: -0.95722663 kcal mol⁻¹Reusing precomputed SASAs with the Record model (MTRecord)
MTRecord needs Richards, not Creamer, united-atom radii, so precompute the SASA with RichardsUnitedAtomRadii instead:
sasa_native_richards = sasa_particles(RichardsUnitedAtomRadii, native_state)SASA{RichardsUnitedAtomRadii, 3, Vector{Atom{Nothing}}}
Number of particles: 513
Total SASA: 4241.489
Output of dots: false The resulting SASA{RichardsUnitedAtomRadii} object can be reused across cosolvents, exactly as with the Creamer-radii SASAs above, by passing model=MTRecord:
t_urea_record = transfer_free_energy(sasa_native_richards, "urea"; model=MTRecord)TransferFreeEnergy{MTRecord} - 69 residues to 1M "urea".
Total transfer free energy: -0.8054449 kcal mol⁻¹
Backbone contributions: -0.35466087 kcal mol⁻¹
Side-chain contributions: -0.45078403 kcal mol⁻¹t_betaine_record = transfer_free_energy(sasa_native_richards, "betaine"; model=MTRecord)TransferFreeEnergy{MTRecord} - 69 residues to 1M "betaine".
Total transfer free energy: 0.972637 kcal mol⁻¹
Backbone contributions: 0.92392546 kcal mol⁻¹
Side-chain contributions: 0.048711527 kcal mol⁻¹The same applies to MTRecordDenaturedModel, which is itself just a pair of SASA{RichardsUnitedAtomRadii} objects (native and fully-extended chain) computed once at construction and reused for every cosolvent passed to mvalue — see Denaturation m-values.
Enforced radii compatibility
Passing a SASA object computed with the wrong radii parameterization for the requested model raises an informative error (naming the model and the radii type it expects), ensuring that m-values and transfer free energies are never silently computed from incompatible surface areas. For example, MTRecord requires RichardsUnitedAtomRadii, while every other model requires CreamerUnitedAtomRadii; passing one where the other is expected raises an ArgumentError instead of silently returning a wrong result.