fairmd.lipids.api module
API functions for analyzing the FAIRMD Lipids Databank.
Functionality are organized into few groups:
Class
UniverseConstructor, which help one to create MDAnalysis.Universe from Databank’sSystemFunctions that extract computed properties:
Functions that extract post-processed properties:
Auxiliary functions for better interface with MDAnalysis
- fairmd.lipids.api.get_thickness(system: System) float[source]
Get thickness for a simulation defined with
systemfrom thethickness.json.- Parameters:
system – Simulation object.
- Returns:
membrane thickess (nm) or raise exception
- fairmd.lipids.api.get_eqtimes(system: System) dict[source]
Return relative equilibration time for each lipid of
system.- Parameters:
system – Simulation object.
- Returns:
dictionary of relative equilibration times for each lipid
- fairmd.lipids.api.get_OP(system: System) dict[source]
Return a dictionary with the order parameter data for each lipid in
system.- Parameters:
system – Simulation object.
- Returns:
dictionary contaning, for each lipid, the order parameter data: average OP, standard deviation, and standard error of mean. Contains None if
LipidNameOrderParameters.jsonmissing.
- fairmd.lipids.api.get_FF(system: System) ndarray[source]
Get numpy table of FormFactor curve.
- Parameters:
system – Simulation object
- Returns:
(q,FF,err) numpy table
- fairmd.lipids.api.get_mean_ApL(system: System) float[source]
Calculate average area per lipid for a system.
- Parameters:
system – Simulation object.
- Returns:
area per lipid (Å^2)
- fairmd.lipids.api.get_total_area(system: System) float[source]
Return area of the membrane in the simulation box.
- Parameters:
system – Simulation object.
- Returns:
area of the system (Å^2)
- exception fairmd.lipids.api.UniverseConstructError[source]
Bases:
ExceptionSpecific error for UniverseConstructor
- class fairmd.lipids.api.UniverseConstructor(s: System)[source]
Bases:
objectClass operating with downloading and constructing Universe for the
System.To use this class, one instantinate it with a particular system, and then download.
s = systems.loc(120) uc = UniverseConstructor(s) uc.download_mddata()
After this, the pointer
uc.pathswill show which files are available to work with. Finally, you can runuc.build_universe()to get theMDAnalysis.Universeobject.- property paths: dict[str, str | None]
Return dicts of absolute paths of downloaded files.
Allowed fields are: struc, traj, top, energy. If they are not
None, then the corresponding file is downloaded and the full path is the value.
- fairmd.lipids.api.mda_gen_selection_mols(system: System, molecules: Container[Molecule] | None = None) str[source]
Return a MDAnalysis selection string covering all the molecules (default None means “lipids”).
- Parameters:
system – FAIRMD Lipids dictionary defining a simulation.
molecules – container of molecule objects to be included in the selection.
- Returns:
a string using MDAnalysis notation that can used to select all lipids from the
system.
- fairmd.lipids.api.mda_read_trj_tilt_angles(resname: str, a_name: str, b_name: str, universe: Universe)[source]
Calculate the AB vector angles with respect to membrane normal from the simulation.
- Parameters:
resname – residue name of the molecule for which the P-N vector angle will be calculated
a_name – name of the A atom in the simulation
b_name – name of the B atom in the simulation
universe – MDAnalysis universe of the simulation to be analyzed
- Returns:
tuple (angles of all molecules as a function of time, time averages for each molecule, the average angle over time and molecules, the error of the mean calculated over molecules)