User Tools

Site Tools


Writing /users/jbklauda/pub/wiki/data/cache/6/6193a558dc90ed4c190004bf67ecff70.captchaip failed
hydrogen_bonds_for_multi-component_bilayers

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
hydrogen_bonds_for_multi-component_bilayers [2026/08/03 05:15] – edithydrogen_bonds_for_multi-component_bilayers [2026/10/11 23:01] (current) – Large update to the modern workflow edit
Line 15: Line 15:
  
 Python Package (Recommended)\\ Python Package (Recommended)\\
-Download Script: {{ ::hb_asym_mult_lip.tar.gz |}}+Download Script: {{ ::hb_asym_lipids_v2.tar.gz |}}
  
 ======Legacy Workflow===== ======Legacy Workflow=====
Line 275: Line 275:
  
 ======Modern Python Workflow====== ======Modern Python Workflow======
-This workflow is designed to automate the old workflow by generating optimized CHARMM files based on a few inputs describing your membrane system. This wiki covers what's necessary, but feel free to check out ''DEVELOPERS_NOTES.md'' for a very detailed explanation of the Python pipeline (viewable via any Markdown extension or simply convert it to html/pdf). Any questions can be directed to ezhang32@umd.edu. As a heads up, the terms "lipid type" and "lipid headgroup" will be used interchangeably in the instructions below.+This workflow is designed to automate the old workflow by generating optimized CHARMM files based on a few inputs describing your membrane system. This wiki covers what's necessary, but feel free to ask me anything at ezhang32@umd.edu. As a heads up, the terms "lipid type" and "lipid headgroup" will be used interchangeably in the instructions below.
  
 =====Step 1: Edit Neccesary Files===== =====Step 1: Edit Neccesary Files=====
Line 282: Line 282:
 Definitions for typical 4/5/6-tailed Lipid A are also included as patched lipids. To use these, update the headgroup key (the segid base in your PSF, without the trailing number) and the resname key nested underneath it (matching the resname in your PSF/toppar files). Definitions for typical 4/5/6-tailed Lipid A are also included as patched lipids. To use these, update the headgroup key (the segid base in your PSF, without the trailing number) and the resname key nested underneath it (matching the resname in your PSF/toppar files).
  
-To add h-bond definitions for a new lipid type, add an entry to ''standard_dict'' (if it's uniquely defined by resid) or ''patched_dict'' (if it spans multiple residues and is uniquely defined by segid), mirroring the structure of the existing entries. Bottom line, if your lipid is uniquely identified by its resid, then use the standard_dict. If your psf shows the lipid being uniquely identified by the segid, use the patched_dict. An example is shown below.+To add h-bond definitions for a new lipid type, add an entry to ''standard_dict'' (if it's uniquely defined by resid) or ''patched_dict'' (if it spans multiple residues and is uniquely defined by segid), mirroring the structure of the existing entries. Bottom line: if your lipid is uniquely identified by its resid, then use the standard_dict. If your psf shows the lipid being uniquely identified by the segid, use the patched_dict. An example is shown below.
 <code> <code>
 # adding a standard lipid (or protein) type called CUSTOM that has an OH and C=O group # adding a standard lipid (or protein) type called CUSTOM that has an OH and C=O group
Line 309: Line 309:
 </code> </code>
  
-1.2 Open ''config.py'' to define your system. First, navigate to standard_dict. The resnames subdictionary (subdict) holds lipid types as keys and lists of corresponding resnames as values. Note: for patched lipid types, the assigned value can only be a list with a single tuple entry that holds all the patched/conjugated residues for that segid. The top_counts and bot_counts subdicts use the same keys as the resnames subdicts, but contain non-negative integers instead of resnames to specify the quantity of each lipid in the top and bottom leaflets of your membrane. Below is an example:+1.2 Open ''config.py'' to define your system. First, navigate to standard_dict. The resnames subdictionary (subdict) holds lipid types as keys and lists of corresponding resnames as values. Note: for patched lipid types, the assigned value can only be a list with a single tuple entry that holds all the patched/conjugated residues for that segid. You no longer need to specify the lipid counts per leaflet, as this is checked at runtime. Below is an example:
 <code> <code>
 # top leaflet: 10 4-chained lipid A, 10 5-chained lipid A, 10 6-chained lipid A # top leaflet: 10 4-chained lipid A, 10 5-chained lipid A, 10 6-chained lipid A
 # bottom leaflet: 30 POPE, 30 AIPE, 20 POPG, 20 NAAA (patched ornithine lipid) # bottom leaflet: 30 POPE, 30 AIPE, 20 POPG, 20 NAAA (patched ornithine lipid)
-config_dict = { +resnames = { 
-    'resnames': { +    'PE': ['AIPE'], 
-        'PE': ['POPE','AIPE'], +    'PG': ['AMPG'], 
-        'PG': ['AMPG'], +    'NAAA': [('ORN', 'LLL')], 
-        'NAAA':[('ORN', 'LLL')], +    'LPSA': [('LIPA4',)], 
-        'LPSA':[('LIPA4',)], +    'LPSB': [('LIPA5',)], 
-        'LPSB':[('LIPA5',)], +    'LPSC': [('LIPA6',)],
-        'LPSC':[('LIPA6',)], +
-    }, +
-    'top_counts': { +
-        'PE': [0, 0], +
-        'PG': [0], +
-        'NAAA': [0], +
-        'LPSA':[10], +
-        'LPSB':[10], +
-        'LPSC':[10], +
-    }, +
-    'bot_counts': { +
-        'PE': [30, 30], +
-        'PG': [20], +
-        'NAAA': [20], +
-        'LPSA':[0], +
-        'LPSB':[0], +
-        'LPSC':[0], +
-    },+
 } }
 </code> </code>
  
-1.3 Stay in ''config.py'' and specify the dcd_range, charmm_dir, dyn_dir, asymmetric, num_blocks, output_csv, and compress_data fields as outlined in the comments.+1.3 Stay in ''config.py'' and specify the dcd_range, charmm_dir, dyn_dir, recenter_dir, asymmetric, num_blocks, output_csv, and other fields as outlined in the comments.
  
 =====Step 2: Run Scripts===== =====Step 2: Run Scripts=====
-2.1 Run ''./0_setup.scr''. This generates the directories that store your data and CHARMM scripts. I've also coded lots of error handling and validation functions, so it should catch most of the errors in config.py and hbond_defs.py if they exist. Simply re-run the script once you fix all the errors, if any occur.+2.1 Run ''./0_setup.scr''. This generates the directories that store your data and CHARMM scripts. I've also coded lots of error handling and validation functions, so it should catch most of the errors in config.py and hbond_defs.py if they exist. Simply re-run the script once you fix all the errors, if any occur. If you set recenter_dir = None, then it should generate ''./recenter.scr''. Run it, and wait for it to finish before continuing.
  
-2.2 Run ''./1_calc_hb_run.scr'' to submit your slurm scripts. They can take from 1-6 hours depending on the size of your system. By default, the Slurm jobs are set with an 8-hour time limit, which should be enough, but feel free to manually edit ''1_calc_hb_run.csh'' which is located in your freshly generated directories, to change Slurm specifics such as increasing the job time or running on the scavenger queue instead of the standard queue.+2.2 Run ''./1_hbonds.scr'' to submit a slurm job. This used to take up to 6-12 hours, but has been optimized to run in under a minute!
  
-2.3 Once all Slurm jobs finish running, run ''2_analysis.scr''. This merges data, runs statistics, and compresses data if specified. If you navigate to the *-hbonds directories, you should *.txt files with your hbond data, heatmaps for all and pairwise lipid h-bond interactions, and CSV files if specified earlier in config.py. If you want to see which donors and acceptors are bonding the most, look at the pair number for all-hbonds or the DN-AC pairing in all/inter-hbond results and determine the corresponding group based on your ''def_dn_ac.str'' file. It's worth noting that whenever it says normalized, it means the raw h-bond data was divided by the __donor__ lipid count in your system. Here's some sample asymmetric inter-hbond output. The results for a symmetric bilayer are similar (just averaged across leaflets): +2.3 Once it finishes, run ''2_analysis.scr''. This merges data, runs statistics, and plots data if specified. If you navigate to the results directory, you should now see *-hbonds directories; they should contain *.txt files with your hbond data, heatmaps for all and pairwise lipid h-bond interactions, and CSV files if specified earlier in config.py. There's also an hbond_key.txt file which shows which donor/acceptor symbols in the tables correspond to which atoms. It's worth noting that whenever it says normalized, it means the raw h-bond data was divided by the donor lipid count. The pairwise affinity tables/heatmaps provides a better metric since its normalized against both donors and acceptors. 
-<code> +
---- Top Leaflet Aggregate Pairwise Inter-lipid Hbond Interactions --- +
-DLip     ALip     N_avg    N_se     N_avg/lip N_se/lip +
-AIPE     AIPE     40.5140  0.6165   0.3585    0.0055   +
-AIPE     AMPG     9.7620   0.2851   0.0864    0.0025   +
-AIPE     ORN      34.9095  0.5685   0.3089    0.0050   +
-AMPG     AIPE     4.5250   0.1493   0.1810    0.0060   +
-AMPG     AMPG     1.2820   0.0803   0.0513    0.0032   +
-AMPG     ORN      1.8625   0.1378   0.0745    0.0055   +
-ORN      AIPE     34.3005  0.5171   0.5532    0.0083   +
-ORN      AMPG     9.6245   0.2501   0.1552    0.0040   +
-ORN      ORN      25.2025  0.5834   0.4065    0.0094  +
  
---- Bottom Leaflet Aggregate Pairwise Inter-lipid Hbond Interactions --- 
-DLip     ALip     N_avg    N_se     N_avg/lip N_se/lip 
-AIPE     AIPE     35.2030  0.4736   0.3353    0.0045   
-AIPE     AMPG     12.4245  0.1884   0.1183    0.0018   
-AIPE     ORN      30.8595  0.6351   0.2939    0.0060   
-AMPG     AIPE     6.8320   0.1324   0.1846    0.0036   
-AMPG     AMPG     2.3940   0.1175   0.0647    0.0032   
-AMPG     ORN      2.7050   0.1255   0.0731    0.0034   
-ORN      AIPE     30.5265  0.7185   0.5263    0.0124   
-ORN      AMPG     13.9795  0.3651   0.2410    0.0063   
-ORN      ORN      20.5845  0.4912   0.3549    0.0085   
- 
---- Top Leaflet Normalized Inter-lipid Hbond Interactions --- 
-Lip      Nlip   DN_avg/lip DN_se/lip AC_avg/lip AC_se/lip Tot_avg/lip Tot_se/lip 
-AIPE     113    0.7539     0.0057    0.3436     0.0042    1.0974      0.0073     
-AMPG     25     0.3068     0.0093    0.7755     0.0127    1.0822      0.0176     
-ORN      62     1.1150     0.0112    0.5931     0.0089    1.7081      0.0137     
- 
---- Top Leaflet Raw Inter-lipid Hbond Interactions --- 
-Lip      Nlip   DN_avg   DN_se    AC_avg   AC_se    Tot_avg  Tot_se   
-AIPE     113    85.1855  0.6454   38.8255  0.4782   124.0110 0.8248   
-AMPG     25     7.6695   0.2329   19.3865  0.3178   27.0560  0.4409   
-ORN      62     69.1275  0.6927   36.7720  0.5525   105.8995 0.8501   
- 
---- Bottom Leaflet Normalized Inter-lipid Hbond Interactions --- 
-Lip      Nlip   DN_avg/lip DN_se/lip AC_avg/lip AC_se/lip Tot_avg/lip Tot_se/lip 
-AIPE     105    0.7475     0.0064    0.3558     0.0067    1.1033      0.0108     
-AMPG     37     0.3225     0.0041    0.7136     0.0096    1.0361      0.0116     
-ORN      58     1.1222     0.0068    0.5787     0.0109    1.7009      0.0137     
- 
---- Bottom Leaflet Raw Inter-lipid Hbond Interactions --- 
-Lip      Nlip   DN_avg   DN_se    AC_avg   AC_se    Tot_avg  Tot_se   
-AIPE     105    78.4870  0.6699   37.3585  0.6986   115.8455 1.1339   
-AMPG     37     11.9310  0.1530   26.4040  0.3535   38.3350  0.4298   
-ORN      58     65.0905  0.3944   33.5645  0.6329   98.6550  0.7965   
-</code> 
  
  
hydrogen_bonds_for_multi-component_bilayers.txt · Last modified: 2026/10/11 23:01 by edit