Utilities

MembraneAnalysis.atom_leafletFunction
atom_leaflet(;
    pdb_file,
    lipids)

Determines the leaflet of each atom of the lipid in a bilayer based on vertical position of the head atoms in the PDB structure file. Outputs an array of ±1s.

Keyword arguments

  • pdb_file: PDB file;
  • lipids: a list of lipids of type Lipid as defined in lipids.jl;
MembraneAnalysis.atom_leaflet_dynamicFunction
atom_leaflet_dynamic(;
    coords,
    zs_m,
    Ls,
    pdb_file,
    lipids)

Dynamically determines the leaflet of each atom of the lipid in a bilayer based on vertical position of the head atoms in the trajectory coordinates. Outputs an array of ±1s.

Keyword arguments

  • coords: a 3 × N array of N atoms coordinates;
  • zs_m: bilayer midplane height;
  • Ls: a tuple of the (Lx, Ly) dimensions of the box;
  • pdb_file: PDB file;
  • lipids: a list of lipids of type Lipid as defined in lipids.jl;
MembraneAnalysis.box_dimensionsFunction
box_dimensions(;
    traj_file)

Calculates mean dimensions of the simulation box.

Keyword arguments

  • traj_file: trajectory file;
  • area_file: save area if not empty;
  • box_dims_file: save simulation box dimensions if not empty;
MembraneAnalysis.lipids_atoms_heightFunction
lipids_atoms_height(;
    pdb_file,
    traj_file,
    fs_file,
    output_dir,
    lipids)

Calculates the average distance of heavy atoms of each lipid from the midplane. Results for lipid "XXXX" will be saved to XXXX_zs.dat in output_dir.

Keyword arguments

  • pdb_file: PDB structure file;
  • traj_file: trajectory file;
  • fs_file: fluctuation spectrum file;
  • output_dir: output directory;
  • lipids: a list of lipids of type Lipid as defined in lipids.jl.
MembraneAnalysis.peptide_atoms_heightFunction
peptide_atoms_height(;
    pdb_file,
    traj_file,
    output_file,
    lipids,
    n_residues)

Calculates average distance of CA atoms of each residue of peptide from the midplane.

Keyword arguments

  • pdb_file: PDB structure file;
  • traj_file: trajectory file;
  • output_file: output file;
  • lipids: a list of lipids of type Lipid as defined in lipids.jli;
  • n_residues: number of residues in the peptide.
MembraneAnalysis.find_ref_atomsFunction
find_ref_atoms(;
    input_dir,
    lipids,
    z,
    tolerance=2)

Determines the nearest atom to a determined height (such as the neutral surface) for each lipid and returns a dictionary.

Keyword arguments

  • input_dir: directory with lipid atoms height files (e.g. XXXX_zs.dat for lipid "XXXX");
  • lipids: a list of lipids of type Lipid as defined in lipids.jl;
  • z: refrence surface height;
  • tolerance: maximum distance from z accepted, will produce a warning if exceeded.
MembraneAnalysis.voronoi_shellsFunction
voronoi_shells(;
    points,
    box_dims,
    center,
    n_shells)

Determines the voronoi shells around a center point from a set of 2-D points (not including the center). Returns a dictionary with a list of point indices for each shell.

Keyword arguments

  • points: a 2×N array of X and Y coordinates of the N points;
  • box_dims: a tuple of simulation box lateral dimensions, Lx and Ly;
  • cetner: coordinates of the center point;
  • n_shells: number of voronoi shells to be determined.