// // q_psa.svl QuaSAR PSA // // 18-feb-2014 (rk) changed db_mol to atoms for input // 03-oct-2005 (sk) removed vdw_sa // 18-may-2004 (ns) enable count primary amine as H-bond donner // 27-apl-2004 (ns) bugfixed // 20-apl-2004 (ns) merged svl // 16-mar-2004 (ns) added H-bond_acc, H-bond_don descriptors // 08-dec-2003 (jg) change PSA(Polar) to PSA_S(Polar) // now PSA(Polar) is calculated without S // 05-dec-2003 (jg) PSA(Non Polar) renamed to PSA(Non_Polar) // to avoid clash in QuaSAR Evolution // 12-mar-2001 (jg) revised // 04-jul-1999 (jg) created as 'q_m_area.svl' // // COPYRIGHT (C) 2014 RYOKA SYSTEMS INC. ALL RIGHTS RESERVED. // // PERMISSION TO USE, COPY, MODIFY AND DISTRIBUTE THIS SOFTWARE IS HEREBY // GRANTED PROVIDED THAT: (1) UNMODIFIED OR FUNCTIONALLY EQUIVALENT CODE // DERIVED FROM THIS SOFTWARE MUST CONTAIN THIS NOTICE; (2) ALL CODE DERIVED // FROM THIS SOFTWARE MUST ACKNOWLEDGE THE AUTHOR(S) AND INSTITUTION(S); (3) // THE NAMES OF THE AUTHOR(S) AND INSTITUTION(S) NOT BE USED IN ADVERTISING // OR PUBLICITY PERTAINING TO THE DISTRIBUTION OF THE SOFTWARE WITHOUT // SPECIFIC, WRITTEN PRIOR PERMISSION; (4) ALL CODE DERIVED FROM THIS SOFTWARE // BE EXECUTED WITH THE MOLECULAR OPERATING ENVIRONMENT (MOE) LICENSED FROM // RYOKA SYSTEMS INC. // // RYOKA SYSTEMS INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS // SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, // AND IN NO EVENT SHALL RYOKA SYSTEMS INC. BE LIABLE FOR ANY // SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER // RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF // CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // // q_psa.svl calculates van der Waals surface area of Polar and non-Polar atoms. // Polar atoms are simply defined as N, O and H bonded to these elements. // Non-Polar atoms are C and H bonded to C. // // Ref: J. Med. Chem., 1998, 41, 5382 - 5392 // // vdw Radii were modified based on the following reference: // Pharmaceutical Research, vol. 16, No. 10, 1999, p. 1520-1526. #set title 'QuaSAR PSA Descriptor' #set class 'QuaSAR' #set version 'RSI 2014.02.18' function SelectionExtendBonded; function SphereSurfaceArea; function AtomSurfaceArea; const vdwR = tag tr [ ['H',1.50], ['HO',1.10], ['HN',1.125], ['C',1.90], ['c',1.94], ['N',1.82], ['O',1.74], ['S',2.11] ]; function QuaSAR_list_PSA_Descriptors [] = tr [ [ 'H-bond_acc', 'H bond acceptor', '2D', [] ], [ 'H-bond_don', 'H bond donor', '2D', [] ], [ 'PSA(Polar)', 'vdw Surface Area of -NH(x) ' 'or -OH(x)', 'i3D', [] ], [ 'PSA_S(Polar)', 'vdw Surface Area of -NH(x) ' 'or -OH(x) or S', 'i3D', [] ], [ 'PSA(Non_Polar)', 'vdw Surface Area of Non ' 'Polar Atoms (without S)', 'i3D', [] ], [ 'PSA_S(Non_Polar)', 'vdw Surface Area of Non ' 'Polar Atoms (with S)', 'i3D', [] ] ]; function QuaSAR_acalc_PSA_Descriptors [atoms, codes, parm] local desc = zero codes; if not length atoms then return desc; endif // no atoms? local el = aElement atoms; local geom = aGeometry atoms; local rad = el_VDW_Radius el; local All_N = (aElement atoms)=='N'; local All_O = (aElement atoms)=='O'; local All_S = (aElement atoms)=='S'; local All_C = (aElement atoms)=='C' and (aGeometry atoms) == 'sp3'; local All_c = (aElement atoms)=='C' and (aGeometry atoms) == 'sp2'; local All_N_O = All_N + All_O; local All_H = (aElement atoms)=='H'; local Polar_HO = All_H and (aElement aBonds atoms == 'O'); Polar_HO = mput [Polar_HO,not ((app length Polar_HO) == 1),0]; local Polar_HN = All_H and (aElement aBonds atoms == 'N'); Polar_HN = mput [Polar_HN, not ((app length Polar_HN) == 1),0]; local Polar_H = Polar_HO or Polar_HN; rad = mput [rad,el == 'H',vdwR.H]; rad = mput [rad,Polar_HO,vdwR.HO]; rad = mput [rad,Polar_HN,vdwR.HN]; rad = mput [rad,(el == 'C' and geom == 'sp2'),vdwR.c]; rad = mput [rad,el == 'C' and geom == 'sp3',vdwR.C]; rad = mput [rad,el == 'N',vdwR.N]; rad = mput [rad,el == 'O',vdwR.O]; rad = mput [rad,el == 'S',vdwR.S]; local All_P1 = Polar_H + All_N + All_O + All_S; local All_P2 = Polar_H + All_N + All_O; local All_NP = not All_P2; local AllvdwSurface = SphereSurfaceArea [aPos atoms, rad, 2]; desc | codes == 'H-bond_acc' = add cat apt eqE[ ['O', 'N'], nest aElement atoms ]; desc | codes == 'H-bond_don' = add cat apt sm_Match [ ['[#7H1]', '[#7H2Q1]','[#8H1]'], nest atoms ]; desc | codes == 'PSA_S(Polar)' = add (AllvdwSurface|All_P1); desc | codes == 'PSA(Polar)' = add (AllvdwSurface|All_P2); desc | codes == 'PSA_S(Non_Polar)' = add (AllvdwSurface|not All_P2); desc | codes == 'PSA(Non_Polar)' = add (AllvdwSurface|not All_P1); return desc; endfunction