User Tools

Site Tools


Writing /users/jbklauda/pub/wiki/data/cache/6/6193a558dc90ed4c190004bf67ecff70.captchaip failed
edp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
edp [2026/08/23 22:10] – [Step 2: Automatically Get EDP Data] editedp [2026/08/27 18:29] (current) – edit
Line 291: Line 291:
  
 ===== Step 1: Edit Necessary Files ===== ===== Step 1: Edit Necessary Files =====
-a) Open ''config.py''. Read the contents and fill in the resns list, workspace fields, and analysis fields as directed in the comments. Any patched / conjugated lipids should be entered using a tuple containing the constituent residues. Lipids uniquely identified by their segid instead of resid should also be marked using a single-element tuple. +a) Open ''config.py''. Read the comments I left in the file; they explain everything in detail. Then fill in config_dict, workspace fields, and analysis fields as directed. 
  
-Example: AIPE and AMPG are standard CHARMM lipids with segid MEMB. If I had a custom lipid composed of ORN and LLL residues, here is how I would populate ''config.py''+Example: AIPE and AMPG are standard CHARMM lipids with segid MEMB. If I had a patched lipid composed of ORN and LLL residues with segids NAAA1, NAAA2, etc., here is how I would populate ''config.py''
 <code> <code>
 # resnames should be all caps (matches case in toppar files) # resnames should be all caps (matches case in toppar files)
-resns = ['AIPE', 'AMPG', ('ORN','LLL'),] # conform to Python syntax by surrounding strings with double or single quotes+config_dict = { 
 +    'MEMB':{ 
 +        'AIPE': (58.3686, 58.2105), 
 +        'AMPG': (61.0204, 59.9090), 
 +    }, 
 +    'NAAA':{ # for patched / conjugated lipid, set subresidues to have the same comp_sa 
 +        'ORN': (52.8182, 52.8821), 
 +        'LLL': (52.8182, 52.8821), 
 +    }, 
 +    'IONS': { 
 +        'POT': None, 
 +        'CLA': None, 
 +    }, 
 +    'TIP3':{ 
 +        'TIP3': None, 
 +    }, 
 +}
 </code> </code>
  
Line 305: Line 321:
 ===== Step 2: Automatically Get EDP Data ===== ===== Step 2: Automatically Get EDP Data =====
  
-a) If you already recentered your dcds in the component SA/lip analysis, simply copy the recenter directory from there and drop it into the current directory. Otherwise, run ''./1_recenter.scr''. This should take <5 minutes. Confirm that you have recentered the dcds in your recenter directory after the job finishes.\\+a) If you set recenter_dir = None in config.py, you will see a new recenter script and a directory be created. If not, skip to the next step. Run ''./recenter.scr''. This should take <5 minutes. Confirm that you have recentered the dcds in your recenter directory after the job finishes.\\
  
  
-b) Set up a conda environment with the MDAnalysis package. I'm assuming users have a conda installation set up. If not, see the Get Equilib Test page on the wiki. +b) Run ''1_atm_dens.scr''. The first time you run it, it will take a couple of minutes to set up a virtual environment with the MDAnalysis package installed. Then, it will automate all other steps and run for < 1 minute. You should now see the default plots, thickness data, and interdigitation data in the results folder. If you need NSLD data, all of the formatted .sim and .cmp files can be found inside the SimToEXP folder. Read more about SimToEXP in part VI of the legacy script instructions.
-<code> +
-# run these line by line (dont copy paste entire block into terminal) +
-conda create --name getedp python=3.10 numpy pandas -y +
-conda activate getedp +
-conda install -c conda-forge mdanalysis +
-# whenever you're done with the analysis, you can leave the environment using "conda deactivate" +
-</code> +
- +
-c) Run ''./run_edp.scr''. This completely automates steps 2-7 of the edp pipeline. You should see printed output explaining which steps are running. It will take <2 minutes. If everything went smoothly, you're essentially done! You can continue modifying plots by examining the comments in ''6_plot_edp.py'' or directly tweaking the code in ''src/plot_params.py''. If you set EXP_format = True in ''config.py'', you'll see a new directory called SimToEXP which contains the formatted files required for SimToEXP software. Details about the usage for SimToEXP are covered in Part V of the legacy scripts above, and it's not necessary for most. The results folder contains EDP_results.txt, which holds thickness and interdigitation results plus any plots.  +
- +
-Note: If you want to rerun steps individually, just run the numbered .scr or .py scripts. Verify that your lipids are assigned to the correct leaflet based on printed output or by checking ''memb_compositon.csv'' inside the sim_data folder.+
  
 ===== Additional Information ===== ===== Additional Information =====
Line 325: Line 330:
  
 === Overall Pipeline === === Overall Pipeline ===
- + 0_setup.py roughly validates the structure of all the fields in config.py before generating necessary files. 1_atm_dens.scr create a virtual Python environment, then runs 1_atm_dens.py to get .sim files with atom densities -> 2_calc_edp.py which applies the electron weights and groups atoms according to the .cmp files -> 3_analysis.py which computes thickness and interdigitation data -> 4_plot_edp.py which creates generic plots based on the edp data -> 5_exp_format.py which formats .cmp and .sim files to be usable in SimToEXP.
-  - **Edit ''config.py''** — resns list, charmm_dir, dyn_dir, dcd_range, bilayer_only, save_csv, EXP_format, charmm_version, job_time_limit +
-  - **''0_setup.py''** — validates config, generates ''recenter_vars.str'', ''toppar_temp.str'', ''recenter.csh'', ''system_info.txt''; creates subdirs +
-  - **''1_recenter.scr''** — submits ''recenter.csh'' (3-pass CHARMM recentering) -> recentered DCDs +
-  - **''2_run_gen_rtf.scr''** — atom labels + group classification (via ''atmlbl.py''/''cmp.py'') -> ''atmlbl_cmp_files/'' +
-  - **''3_bldsim.py''** — per-atom, per-leaflet density from DCDs -> ''sim_data/'' +
-  - **''4_calc_edp.py''** — electron weighting + group EDP -> ''edp_data/'' +
-  - **''5_analysis.py''** — thickness (DHH/DB/2DC) + interdigitation -> ''results/EDP_results.txt'' +
-  - **''6_plot_edp.py''** — EDP plots -> ''results/*.png'' +
-  - **''7_exp_format.py''** — SimToEXP formatting, only if ''EXP_format = True'' -> ''SimToEXP/'' +
- +
-=== Comparison with the Legacy Scripts === +
-Pros:  +
-The legacy scripts only worked for symmetric bilayers involving some glycero and sphingo lipids. It also used nested loop structures to get z-coordinate data for all atoms in the simulation, whereas this script directly greps the dcds, turning a 1-6 hour job into a 30-second job.  +
- +
-Cons: +
-The plotting scripts are already heavily customized. For those not comfortable with Python and Matplotlib, it may be easier to import *.dat files with edp data into Excel as CSV files and plot there, or use any alternative software. (Removed old generate Excel script because all *.dat files are already in CSV format, which is easily read into Excel).+
  
 === How to Interpret Last 2 Columns in Thickness Results ====== === How to Interpret Last 2 Columns in Thickness Results ======
Line 351: Line 340:
  
 === Formulas for Self and Hetero Interdigitation === === Formulas for Self and Hetero Interdigitation ===
-rho is the raw EDP, i denotes the lipid +{{:new_interdig_formulas.png}}
- +
-Self-Interdigitation for Symmetric Bilayers \\ +
-{{:self-interdigitation-formula.png}} +
- +
-Hetero-Interdigitation for Any Bilayer \\ +
-{{:hetero-interdigitation-formula.png}} +
edp.1787537442.txt.gz · Last modified: 2026/08/23 22:10 by edit