j-brady / FloryHuggins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Flory Huggins Phase Diagram Fitting

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.

Input data

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.

Run using a yaml file

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

Tips

Theory

equation

equation

equation

where

equation

yielding

equation

About


Languages

Language:Python 100.0%