API reference for writers submodule
API reference for writers submodule#
Provide functions to write the Order Parameters into files.
- buildh.writers.pandasdf2pdb(df)#
Return a string in PDB format from a pandas dataframe.
- Parameters
df (pandas dataframe with columns "atnum", "atname", "resname", "resnum",) – “x”, “y”, “z”
- Returns
A string representing the PDB.
- Return type
str
- buildh.writers.write_OP(fileout, dic_atname2genericname, dic_OP, resname)#
Write the order parameters into a file.
The output style comes from J. Melcr’s script from NMRLipids project (https://github.com/NMRLipids/MATCH/blob/master/scripts/calcOrderParameters.py)
- Parameters
fileout (str) – name of the output file
dic_atname2genericname (ordered dictionary) – dict of correspondance between generic H names and PDB names.
dic_OP (ordered dictionary) – Each key of this dict is a couple carbon/H with the OP values as a list.
resname (str) – lipid residue name taken from the json file.
- buildh.writers.write_OP_alternate(fileout, universe_woH, dic_OP, resname)#
Write the order parameters into a file with an alternate style.
This style comes from A. Pineiro’s script from NMRLipids project (https://github.com/NMRLipids/MATCH/blob/master/scratch/opAAUA_prod.py)
- Parameters
fileout (str) – name of the output file
universe_woH (MDAnalysis universe instance) – This is the universe without hydrogen.
dic_OP (ordered dictionary) – Each key of this dict is a couple carbon/H with the OP values as a list.
resname (str) – lipid residue name taken from the json file.