pierrepo / grodecoder

GroDecoder extracts and identifies the molecular components of a structure file (PDB or GRO) issued from a molecular dynamics simulation.
https://grodecoder.streamlit.app/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

New method of lipid selection (for AA model) in the database for `is_lipid` #65

Closed KarinDuong closed 3 months ago

KarinDuong commented 3 months ago

Because sometimes the file alias and database alias do not match (because the GRO file trims the name if it's more than 4 characters). So with the current method, even if the formula is in the database but the resname/alias does not match (because was cut) : it will not select a lipid, then the molecular_type will stay unknown. For example: SB3-14 is cut to SB3-1 in the GRO file 4ZRY.gro, and I know it's this one (because there are also SB3-10 and SB3-12) because the formula matches.

The actual method is : selected_row = lipid_csml_charmm_gui.loc[ (lipid_csml_charmm_gui["Alias"] == res_name_graph) & (lipid_csml_charmm_gui["Formula"] == formula_graph) ]

So my new method will be : selected_row = lipid_csml_charmm_gui.loc[(lipid_csml_charmm_gui["Alias"].apply(lambda x: res_name_graph in x)) & (lipid_csml_charmm_gui["Formula"] == formula_graph)]

pierrepo commented 3 months ago

Could we close this issue?

KarinDuong commented 3 months ago

yes