#################################################################
# Key Interaction Defination used in LigBuilder                 #
#################################################################
#================================================================
# Supported Symbol: DEFINE, IF, IFNOT, OR, AND, THEN, {, }
#================================================================
# Group Defination:
# DEFINE (GroupName)    MinLogP MaxLogP
# {
#   Tripos Atom Type
# }
# p.s. LogP is calculated by XLogP
#----------------------------------------------------------------
# example:
# DEFINE (StrongHydrophobic)  0.5 3.0       // C.ar C.1 I whose logp among 0.5~3.0 are defined as StrongHydrophobic group
# {
#       C.ar
#       C.1
#       I
# }
#================================================================
# Key Interaction Defination:
# IF/IFNOT Receptor
# {
#   {
#       Condition String (ID From To Type)
#   }
#   AND/OR
#   {
#       Condition String
#   }
# }
# THEN Priority
#
# Here,
# IF/IFNOT: If the condition is TRUE/FALSE
#
# Receptor: The receptor id, default is 1 for single receptor
#
# THEN  Priority: Positive to encourage, negative to penalize
#
# Condition String: (ID From To Type)
# The 1st column: Receptor Atom ID
# The 2nd column: Distance From
# The 3rd column: Distance To
# The 4th column: Ligand Atom Type
#                 (A):Acceptor
#                 (D):Donor
#                 (P):Polar
#                 (H):Hydrophobic
#                 (Any):Any
#                 (Heavy):Heavy atoms
#                 (XXX):Group XXX defined by user
#                 Type:Tripos Atom Type
#----------------------------------------------------------------
# example:
# IF 1                        if condition in { } is true for receptor 1
# {   
#     {
#         101 3.0 7.2 (D)     if a donor atom of the ligand is near the atom 101 of receptor(3.0~7.2 Angstrom)
#     }
#     OR
#     {
#         103 4.1 6.2 C.ar    if an atom(C.ar type) of the ligand is near the atom 103 of receptor(4.1~6.2 Angstrom)
#     {
# }
# THEN +0.8                   if the first OR the second conditions is true for receptor 1, add 0.8 priority
# 
# IFNOT 2                     if condition in { } is NOT true for receptor 2
# {
#     {
#         106 3.5 5.4 (P)
#     }
#     AND
#     {
#        {
#            158 2.2 6.3 (Any)
#        }
#        AND
#        {
#            174 2.2 6.3 O.3
#        }
#     {
# }
# THEN -1.2                  if the first AND the second AND the third conditions are NOT true for receptor 2, minus 1.2 priority
#
#================================================================
# Avaliable Atom Type : Refer to DEFINE (Any) 
#================================================================
###############################
#   Group Defination          #
###############################
DEFINE (Any)    -10.0 10.0
{
    C.3  
    C.2  
    C.1  
    C.cat
    C.ar 
    H    
    N.4  
    N.3  
    N.2  
    N.1  
    N.ar 
    N.pl3
    N.am 
    O.3  
    O.2  
    O.co2
    P.3  
    S.3  
    S.2  
    S.o  
    S.o2 
    F    
    Cl   
    Br   
    I    
    Du   
    Un   
    H.spc
}

DEFINE (Heavy)  -10.0   10.0
{
    C.3  
    C.2  
    C.1  
    C.cat
    C.ar 
    N.4  
    N.3  
    N.2  
    N.1  
    N.ar 
    N.pl3
    N.am 
    O.3  
    O.2  
    O.co2
    P.3  
    S.3  
    S.2  
    S.o  
    S.o2 
    F    
    Cl   
    Br   
    I    
}
DEFINE (P) -10.0  10.0
{
    N.4
    N.3
    N.2
    N.1
    N.pl3
    N.am
    O.3
    O.2
    O.co2
    C.cat
    S.2
    S.o
    S.o2
    P.3
}
DEFINE (D)  -10.0   10.0
{
    N.4
    N.3
    N.2
    N.pl3
    N.am
    O.3
}
DEFINE (A)  -10.0   10.0
{
    N.3
    N.2
    N.1
    O.3
    O.2
    O.co2
}
DEFINE (H)  0.2     10.0
{
    C.3  
    C.2  
    C.1  
    C.ar 
    N.4  
    N.3  
    N.2  
    N.1  
    N.ar 
    N.pl3
    N.am 
    O.3  
    O.2  
    O.co2
    P.3  
    S.3  
    S.2  
    S.o  
    S.o2 
    F    
    Cl   
    Br   
    I    
}
###############################
#   Key Interaction           #
###############################
