openmolecules.org

 
Home » DataWarrior » Functionality » Functionality request: MPO score
Re: Functionality request: MPO score [message #1082 is a reply to message #737] Thu, 17 September 2020 17:59 Go to previous messageGo to previous message
mcmc
Messages: 18
Registered: April 2018
Junior Member
Below is a macro that will calculate the MPO score, based on the six underlying parameters that should already be present in DW.
cLogP, TPSA, HB donor and MW can be calculated within DW. But the most_basic_pKa and cLogD will have to be calculated elsewhere (unless you are one of the happy few to have that unlocked in DW).
The property names need to match exactly of course, so you may need to have to edit the names in the macro before executing it (or change the column aliases to match the macro).

EDIT: update 5 jan 2022. There was a typo in the original post, affecting MPO calculations for compounds with 40 < PSA < 60. Now corrected.

<macro name="MPO_score">
<task name="addCalculatedValues">
columnName=MPO_cLogP
isOverwrite=false
formula=min(1,max(0,2.5-0.5*cLogP_DW))
</task>
<task name="addCalculatedValues">
columnName=MPO_TPSA
isOverwrite=false
formula=if(PSA_DW > 40, min(1, max(0, 1 + (1/(120-90))*(90-PSA_DW))), min(1, max(0, 1-0.05*(40-PSA_DW))))
</task>
<task name="addCalculatedValues">
columnName=MPO_cLogD
isOverwrite=false
formula=min(1, max(0, 1 + (1/(4-2))*(2 - cLogD_74)))
</task>
<task name="addCalculatedValues">
columnName=MPO_MW
isOverwrite=false
formula=min(1, max(0, 1 + (1/(500-360))*(360 - MW)))
</task>
<task name="addCalculatedValues">
columnName=MPO_HBD
isOverwrite=false
formula=min(1, max(0, 1 + (1/(3.5-0.5))*(0.5 - HDonors)))
</task>
<task name="addCalculatedValues">
columnName=MPO_pKa
isOverwrite=false
formula=min(1, max(0, 1 + (1/(10-8))*(8 - MostBasicpKa)))
</task>
<task name="addCalculatedValues">
columnName=MPO_Score
isOverwrite=false
formula=MPO_HBD+MPO_MW+MPO_TPSA+MPO_cLogD+MPO_cLogP+MPO_pKa
</task>
</macro>

[Updated on: Wed, 05 January 2022 10:14]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Opening a .csv file
Next Topic: How to perform general R group searches in DW
Goto Forum:
  


Current Time: Tue May 14 01:20:55 CEST 2024

Total time taken to generate the page: 0.03759 seconds