Here are the scripts I used to fit the Flory Huggins model to Ddx4 phase diagrams in our submitted manuscript on the structural and hydrodynamic properties of the protein.
Currently, the most simple form of the model is used and salt concentration is not taken into account in the fitting.
Tab separated concentration values e.g.
Temp | dilute | std | condensed | std |
---|---|---|---|---|
deg C | mg/mL | mg/mL | mg/mL | mg/mL |
where dilute is the concentration of protein in dilute phase, while condensed is the concentration of protein in the condensed (protein rich) phase. Concentrations are in mg/mL.
create a yaml file called fit_FH.yml
...
wt:
model:
!!python/object:__main__.FloryHuggins
N1: 153 # e.g. number of amino acids
N2: 1
rho: 1400
data: # you can run over multiple data sets
- "data_1.txt"
- "data_2.txt"
- "data_3.txt"
p0: [0.0001,0.8] # initial phi1/phi2 params for fitting
temp_range: [0.,100.] # in degrees C
outpath: "results_rho1400" # folder where script output is written
run python fit_FT.py
where
yielding