Internal Notes

Hi David,
   I do this every couple years as a sanity check (good idea after the code wanders away from us now and then). I'm redoing the straight density calculations (showing my work below) to ensure they agree with what you have and with what is in the code:
Short answers:
Most things agree.  
I reworked your math and my version (maybe I did both wrong) for the surface molarity and get a much smaller number.  1.66e-10mol/dm**2  Which is for a very dense system- i.e., all proteins in the surface, so we'd often have very small numbers on the order of 10^-14 for many surface proteins
We can live with this and come up with a 16 bit input system, or an exponential input system to handle these small numbers, or we could define surfaceMolarity (sM) as moles/m^2.... that would only get us down to 10^-8 though, and I like the consistency of sticking with decimeters.

Double check on your math details:
Error I think I spotted:  (soluble)
You didn't take the cubic root to get your average distance.... should be 1.18nm, but otherwise all agrees for Soluble

Error I think I spotted:  (surface)
For your math, I get a different answer 1.66e-8 mol/dm**2 that agrees with my version.
membrane proteins in my painting are about 10 nm apart (90 molecules in a circle of radius 150 nm)
this corresponds to a surface molarity of (1 molecule/ (10e-9 m)**2) * (1 mol/6.022e23 molecule) * (1e-1 m/dm)**2 = 1.66e-6 mol/dm**2

1 molecule/ (10e-9 m)**2) * (1 mol/6.022e23 molecule) * (1e-1 m/dm)**2 = 
1 molecule/ (1e-8m)**2      * (1 mol/6.022e23 molecule) * (1e-2 m/dm**2) = 
(1e16 molecule/m**2)        * (1.660e-24 mol/molecule) * (1e-2 (m/dm**)2) =  1.66e-10mol/dm**2


My work:
SOLUBLE (VOLUMES)
M = moles/L
6.022e23 ingredients/mole

uPy works in Å by default (not ideal for mesoscale, but works with all molecular viewers that way), so given a volume in Å^3
1L = (10cm)^3
1cm = 10^(-2)m
1Å = 10^(-10)m
1cm = 10^(8)Å
10cm = 10^(9)Å
1L = (10cm)^3 = (10^(9)Å)^3 = 10^(27)Å^3

M = 6.022x10^23/L = [6.022x10^23] / [10^(27)Å^3] = 6.022x10(-4)ing/Å^3
numberIngredientsToPack = [0.0006022 ing/Å^3] * [volume Å^3]

volume / ingredient in 1M = 1ing / 0.0006022 ing/Å^3 = 1660Å^3 * 1nm^3/1000Å^3 = 1.6nm^3
AGREES with your equation below. 

Average distance between molecules is cubic root 3√(1.6nm^3) = 11.8Å = 1.18nm

If proteins are 10nm apart, what is Molarity?:
10nm = 100Å
100Å/protein
1L volume side = 10^9Å/side
proteins/side = [10^9Å/side] / [100Å/protein] = 10^7proteins/side
1L has (10^7proteins)^3 = 10^21 proteins/L
6.022x10^23 proteins/mole
M = 10^21 proteins/L / 6.022x10^23 proteins/mole = 0.166x10^-2 moles/L 
M = 1.66e-3 moles/L 
AGREES with your equation below. 


SURFACES:
If we go with sM = moles/decimeter^2
10cm = 10^(9)Å
1dm^2 = 10^18Å^2

M = 6.022x10^23/L = [6.022x10^23] / [10^(18)Å^2] = 6.022x10(5)ing/Å^2
numberIngredientsToPack = [6.022^5 ing/Å^2] * [SurfaceArea Å^2]

volume / ingredient in 1sM = 1ing / 6.022^5 ing/Å^2 = 602200Å^2 * 1nm^2/100Å^2 = 6022nm^2
AGREES with your equation below

If proteins are 10nm apart, what is surfaceMolarity (sM)?:
10nm = 100Å
100Å/protein
1dm area side = 10^9Å/side
proteins/side = [10^9Å/side] / [100Å/protein] = 10^7proteins/side
1dm^2 has (10^7proteins)^2 = 10^14 proteins/dm^2
6.022x10^23 proteins/mole
M = 10^14 proteins/dm^2 / 6.022x10^23 proteins/mole = 0.166x10^-9 moles/dm^2 
M = 1.66e-10 moles/dm^2
DISAGREES with your equation below, see my rework of the math to see if you agree at top.. 

G
Comments