! mcff_templates
!	Template file of potential type assignment templates for the mcff 
!       forcefield (March-1995)
!

type: ?
  ! anything	
  template: (>*)
end_type

type: lp
  !lone pair
  template: (>L (-*))
end_type

type:c
  ! generic SP3 carbon
  template: (>C)
  atom_test:1
        hybridization:SP3
  end_test
end_type

type: c3
  ! sp3 carbon with 3 h's 1 heavy
  template: (>C(-H)(-H)(-H)(-*))
  atom_test:5
    disallowed_elements:H
  end_test
end_type

type:c2
  ! sp3 carbon with 2 H's, 2 Heavy's
  template:(>C(-H)(-H)(-*)(-*))
  atom_test:4
    disallowed_elements:H
  end_test
  atom_test:5
    disallowed_elements:H
  end_test
end_type

type:co
  ! sp3 carbon in acetals
  template:(>C(-O)(-O)(-*)(-*))
end_type

type:coh
  ! sp3 carbon in acetals with hydrogen
  template:(>C(-O)(-O)(-H)(-*))
end_type

type: c1
  ! sp3 carbon with 1 H 3 heavies
  template: (>C(-H)(-*)(-*)(-*))
  atom_test:3
    disallowed_elements:H
  end_test
  atom_test:4
     disallowed_elements:H
  end_test
  atom_test:5
     disallowed_elements:H
  end_test
end_type

type: c3m
  ! sp3 carbon in 3-membered ring
  template: (>C)
  atom_test:1
    hybridization:SP3
    ring:PLANAR(3)
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c4m
  ! sp3 carbon in 4-membered ring
  template: (>C)
  atom_test:1
    hybridization:SP3
    ring:NON_PLANAR(4)
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c4m
  ! sp3 carbon in 4-membered ring
  template: (>C)
  atom_test:1
    hybridization:SP3
    ring:PLANAR(4)
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c3h
  ! sp3 carbon in 3-membered ring with hydrogens
  template: (>C(-H))
  atom_test:1
    hybridization:SP3
    ring:PLANAR(3)
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c4h
  ! sp3 carbon in 4-membered ring with hydrogens
  template: (>C(-H))
  atom_test:1
    hybridization:SP3
    ring:NON_PLANAR(4)
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c4h
  ! sp3 carbon in 4-membered ring
  template: (>C(-H))
  atom_test:1
    hybridization:SP3
    ring:PLANAR(4)
    aromaticity:NON_AROMATIC
  end_test
end_type

type:c_a
  !general amino acid alpha carbon (sp3)
  template: (>C(-N(-*))(-C[~O])(~*)(~*))
end_type

type: cg
  ! sp3 alpha carbon in glycine
  template: (>C(-H)(-H)(-C[~O])(-N(-H)))
end_type
	
type: c=2
    ! non aromatic doubly bonded carbon
    template: (>C(=*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-*)(-N(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-N(-*)(-*))(-N(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-N(-*)(-*))(-C(-*)(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-*)(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type

type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-*)(-C))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      hybridization:SP3
    end_test
end_type
	
type: c=
    ! non aromatic end doubly bonded carbon
    template: (>C(=*)(-C)(-C))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      hybridization:SP3
    end_test
    atom_test:4
      hybridization:SP3
    end_test
end_type

type: c=1
    ! non aromatic, next to end doubly bonded carbon
    template: (>C(=C(-*)(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: c=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>C(=C(-N(-*)(-*))(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>C(=C(-N(-*)(-*))(-C(-*)(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>C(=C(-*)(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type

type: c=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>C(=C(-C)(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      hybridization:SP3
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type
	
type: c=1
    ! non aromatic, next to  end doubly bonded carbon
    template:(>C(=C(-C)(-C))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      hybridization:SP3
    end_test
    atom_test:4
      hybridization:SP3
    end_test
end_type


type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C[=N(-N(-*)(-*))](-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C[=N(-C(-*)(-*)(-*))](-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C[=N(-*)](-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-N(-*)(-*))(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-C(-*)(-*)(-*))(-C(-*)(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-C(-*)(-*)(-*))(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-*)(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-*)(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: c=1
    ! non aromatic carbon doubly bonded to an end nitrogen
    template: (>C(=N(-*)(-C(-*)(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type:cp
  ! SP2 aromatic carbon with partial double bond
  template:(>C)
  atom_test:1
    hybridization: SP2
    aromaticity:AROMATIC
  end_test
end_type

type:cp
  ! This is used for aromatic carbons that fail the aromaticity test because
  ! the current ring checker is to lame to figure on a ring with more than
  ! seven or eight sides. The NON_AROMATIC test is to eliminate the conflict
  ! with the above 'cp' definition. This can be removed when the ring checker
  ! is made more robust.
  template: [>C(-*)(:*)(:*)]
  atom_test:1
    hybridization:SP2
    aromaticity:NON_AROMATIC
  end_test
end_type

type: c5
  ! Sp2 aromatic carbon in 5-membered ring
  template:(>C)
  atom_test:1
    hybridization:SP2
    aromaticity:AROMATIC
    ring:PLANAR(5)
  end_test
end_type


type:ci
  ! sp2 aromatic carbon in charged imidazole ring (His+)
  template: (>C(:N(-H)(:C))(:N(-H)(:C)))
  atom_test:1
     hybridization:SP2
     aromaticity:AROMATIC
     ring:PLANAR(5)
  end_test
  atom_test:2
    hybridization:SP2
    aromaticity:AROMATIC
    ring:PLANAR(5)
  end_test	
  atom_test:4
    hybridization: SP2
      aromaticity:AROMATIC
      ring:PLANAR(5)
   end_test
   atom_test:5
     hybridization:SP2
     aromaticity:AROMATIC
     ring:PLANAR(5)
   end_test
   atom_test:6
     hybridization: SP2
     aromaticity:AROMATIC
     ring:PLANAR(5)
   end_test

   atom_test:7
     hybridization: SP2
     aromaticity:AROMATIC
     ring:PLANAR(5)
   end_test
end_type

type: ci
   ! Carbon in charged imidazole ring
   template:(>C(=N(-C(=C(-N)))(-H)))
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
end_type

type: ci
   ! Carbon in charged imidazole ring
   template:(>C(-N(-C(=N(-H)(-C)))))
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:6
      ring:PLANAR(5)
   end_test
end_type

type: ci
   ! Carbon in charged imidazole ring
   template:(>C(=C(-N(-C(=N(-C)(-H))))))
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
   atom_test:6
      ring:PLANAR(5)
   end_test
end_type




type: cs
  ! SP2 aromatic carbon in 5 membered ring next to S
  template:(>C(~S))
  atom_test:1
    hybridization:SP2
    aromaticity:AROMATIC
    ring:PLANAR(5)
  end_test
  atom_test:2
    hybridization:SP2
    aromaticity:AROMATIC
    ring:PLANAR(5)
  end_test	
end_type

type: cr
   ! c in neutral arginine 
   template: (>C (=N(-*)) (-N(-H)(-H)) (-N(-H)(-H)) )
end_type

type: c+
   ! c in guanidinium group
   template: (>C (=N(-*)(-*)) (-N(-H)(-H)) (-N(-H)(-H)) )
end_type

type: c+
   ! c in guanidinium group
   template: (>C (:N(-*)(-*)) (:N(-H)(-H)) (:N(-H)(-H)) )
end_type

type: c-
   ! c in charged carboxylate
   template: [>C[:O][:O](-*)]
end_type

type: c-
   ! c in charged carboxylate
   ! How do we indicate that the second O has nothing bonded to it ?
   ! what makes it not match COOH ?
   template: [>C[=O][-O](-*)]
end_type

type: ct
   ! sp carbon   involved in a triple bond
   template: (>C(#*))
end_type

type: na
    ! sp3 nitrogen in amines
    template: (>N (-*)(-*)(-*))
    atom_test:1
      hybridization:SP3
    end_test
end_type


type: n+
  ! sp3 nitrogen in protonated amines
  template: (>N(-H)(-*)(-*)(-*))
  atom_test:1
    hybridization:SP3
  end_test
end_type

type: n4
  ! sp3 nitrogen with 4 substituents
  template: (>N(-*)(-*)(-*)(-*))
  atom_test:1
    hybridization:SP3
  end_test
  atom_test:2
    disallowed_elements:H
  end_test
  atom_test:3
    disallowed_elements:H
  end_test
  atom_test:4
    disallowed_elements:H
  end_test
  atom_test:5
    disallowed_elements:H
  end_test
end_type

type: nb
    ! sp2 nitrogen in aromatic amines
    template: (>N(~C)(-*)(-*))
    atom_test: 1
      hybridization: SP2
      Aromaticity:NON_AROMATIC
    end_test
    atom_test: 2
      hybridization: SP2
      Aromaticity: AROMATIC
    end_test
end_type

type: nb
    ! sp2 nitrogen in aromatic amines
    template: (>N(~C(:*)(:*))(-*)(-*))
    atom_test: 1
      hybridization: SP2
      Aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      hybridization: SP2
      Aromaticity:NON_AROMATIC
    end_test
end_type

type: n
    ! generic sp2 nitrogen (in amids))
    template: (>N(-*))
    atom_test: 1
      hybridization: SP2
      aromaticity: NON_AROMATIC
    end_test
end_type

type: n3m
    ! sp3 nitrogen in 3- membered ring
    template: (>N(-*)(-*)(-*))
    atom_test: 1
      hybridization: SP3
      aromaticity: NON_AROMATIC
      ring:PLANAR(3)
    end_test
end_type

type: n4m
    ! sp3 nitrogen in 4- membered ring
    template: (>N(-*)(-*)(-*))
    atom_test: 1
      hybridization: SP3
      aromaticity: NON_AROMATIC
      ring:PLANAR(4)
    end_test
end_type

type: n4m
    ! sp3 nitrogen in 4- membered ring
    template: (>N(-*)(-*)(-*))
    atom_test: 1
      hybridization: SP3
      aromaticity: NON_AROMATIC
      ring:NON_PLANAR(4)
    end_test
end_type

type: n3n
    ! sp2 nitrogen in 3- membered ring
    template: (>N(~*)(-*)(-*))
    atom_test: 1
      hybridization: SP2
      aromaticity: NON_AROMATIC
      ring:PLANAR(3)
    end_test
end_type

type: n4n
    ! sp2 nitrogen in 3- membered ring
    template: (>N(~*)(-*)(-*))
    atom_test: 1
      hybridization: SP2
      aromaticity: NON_AROMATIC
      ring:PLANAR(4)
    end_test
end_type

type: n4n
    ! sp2 itrogen in 4- membered ring
    template: (>N(~*)(-*)(-*))
    atom_test: 1
      hybridization: SP2
      aromaticity: NON_AROMATIC
      ring:NON_PLANAR(4)
    end_test
end_type

type: np
  ! sp2 nitrogen in 5- or 6- membered ring 
  ! not bonded to hydrogen
  template: [>N(~*)(~*)]
  atom_test:1
    hybridization:SP2
    aromaticity:AROMATIC
  end_test
atom_test:2
    disallowed_elements:P H
  end_test
atom_test:3
    disallowed_elements:P H
  end_test
end_type

type: np
  ! sp2 nitrogen in 5- or 6- membered ring 
  ! not bonded to hydrogen
  template: [>N(:*)(:*)]
  atom_test:1
    hybridization: SP2
    aromaticity:NON_AROMATIC
  end_test
atom_test:2
    hybridization: SP2
    aromaticity:NON_AROMATIC
    disallowed_elements:P H
  end_test
atom_test:3
    hybridization: SP2
    aromaticity:NON_AROMATIC
    disallowed_elements:P H
  end_test
end_type

type: npc
  ! sp2 nitrogen in 5- or 6- membered ring 
  ! bonded to a heavy atom
  template: [>N(~*)(~*)(~*)]
  atom_test:1
    hybridization:SP2
    aromaticity:AROMATIC
  end_test
atom_test:2
    disallowed_elements:H
  end_test
atom_test:3
    disallowed_elements:H
  end_test
atom_test:4
    disallowed_elements:H
  end_test
end_type

type: npc
  ! sp2 nitrogen in 5- or 6- membered ring 
  ! bonded to a heavy atom
  template: [>N(:*)(:*)(~*)]
  atom_test:1
    hybridization: SP2
    aromaticity:NON_AROMATIC
  end_test
atom_test:2
    hybridization: SP2
    aromaticity:NON_AROMATIC
    disallowed_elements:H
  end_test
atom_test:3
    hybridization: SP2
    aromaticity:NON_AROMATIC
    disallowed_elements:H
  end_test
atom_test:4
    disallowed_elements:H
  end_test
end_type

type: nh
  ! sp2 nitrogen in 5-or 6-  membered ring
  ! with  hydrogen attached
  template: (>N(-H))
  atom_test: 1
    hybridization: SP2
    aromaticity: AROMATIC
   end_test
end_type

type: nh+
  ! protonated  nitrogen in 6- membered ring 
  ! with  hydrogen attached
  template: (>N(-H))
  atom_test: 1
    hybridization: SP2
    aromaticity: AROMATIC
      ring:PLANAR(6)
   end_test
end_type

type: nho
  ! sp2 nitrogen in 6-  membered ring
  ! next to a carbonyl group and with a hydrogen
  ! attached
  template: (>N(~C[=O])(-H))
  atom_test: 1
    hybridization: SP2
    aromaticity: AROMATIC
      ring:PLANAR(6)
   end_test
end_type

type: nho
  ! sp2 nitrogen in 6-  membered ring
  ! next to a carbonyl group and with a hydrogen
  ! attached
  template: (>N(~C[:O])(-H))
  atom_test: 1
    hybridization: SP2
    aromaticity: AROMATIC
      ring:PLANAR(6)
   end_test
end_type


type: n2
    !sp2 nitrogen (NH2) in guanidinium group (HN=C(NH2)2)
    template: (>N(-H)(-H)(-C(=N(-*))(-N(-H)(-H))))
    atom_test: 1
	aromaticity: NON_AROMATIC
	hybridization:SP2
    end_test
end_type

type: n=2
  ! sp2 nitrogen in neutral arginine (double bond)
  template: (>N(=*))
  atom_test: 1
    hybridization:SP2
    aromaticity:NON_AROMATIC
  end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: [>N(=*)(-N(-*)(-*))]
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: [>N(=*)(-C(-*)(-*)(-*))]
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: [>N(=*)(-*)]
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-N(-*)(-*))(-N(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-C(-*)(-*)(-*))(-C(-*)(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-C(-*)(-*)(-*))(-N(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-*)(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-*)(-N(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: n=
    ! non aromatic end double bonded nitrogen
    template: (>N(=*)(-*)(-C(-*)(-*)(-*)))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:2
      disallowed_elements:O,S
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: n=
    ! phosphazene nitrogen
    template: [>N(:P)(:P)]
end_type

type: n=1
    ! non aromatic, next to end doubly bonded carbon
    template: (>N(=C(-*)(-N(-*)(-*))))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: n=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>N(=C(-N(-*)(-*))(-N(-*)(-*))))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: n=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>N(=C(-N(-*)(-*))(-C(-*)(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: n=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>N(=C(-*)(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type

type: n=1
    ! non aromatic, next to end doubly bonded carbon
    template:(>N(=C(-C)(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      hybridization:SP3
    end_test
    atom_test:4
      disallowed_elements:N,C
    end_test
end_type
	
type: n=1
    ! non aromatic, next to  end doubly bonded carbon
    template:(>N(=C(-C)(-C))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      hybridization:SP3
    end_test
    atom_test:4
      hybridization:SP3
    end_test
end_type


type: n=1
    ! non aromatic nitrogen doubly bonded to an end nitrogen
    template: (>N(=N(-N(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: n=1
    ! non aromatic nitrogen doubly bonded to an end nitrogen
    template: (>N(=N(-C(-*)(-*)(-*)))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
end_type

type: n=1
    ! non aromatic nitrogen doubly bonded to an end nitrogen
    template: (>N(=N(-*))(-*))
    atom_test:1
        aromaticity:NON_AROMATIC
    end_test
    atom_test:3
      disallowed_elements:N,C
    end_test
end_type

type: n1
    !sp2 nitrogen in charged arginine
    template: (>N(-*)(-*)(=C(-N(-H)(-H))(-N(-H)(-H))))
    atom_test:1
	hybridization:SP2
        aromaticity:NON_AROMATIC
    end_test
end_type


type: ni
   ! Nitrogen in charged imidazole ring
   template:(>N(-H)(:C)(:C(:N(-H))))
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
end_type

type: ni
   ! Nitrogen in charged imidazole ring
   template:[>N(=C(-N(-C(=C))))(-H)(-C)]
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
   atom_test:7
      ring:PLANAR(5)
   end_test
end_type


type: ni
   ! Nitrogen in charged imidazole ring
   template:(>N(-C(=C(-N(=C)(-H))))(-C)(-*))
   atom_test:1
      ring:PLANAR(5)
   end_test
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
   atom_test:7
      ring:PLANAR(5)
   end_test
end_type

type:nt
  ! sp nitrogen involved in a triple bond
   template:(>N(#*))
end_type

type:nz
  ! sp nitrogen in N2
   template:[>N[#N]]
end_type

type:o
   ! generic SP3 oxygen  in alcohol, ether,or  acid group
   template (>O)
   atom_test:1
   end_test
end_type

type oh
   ! oxygen bonded to hydrogen
   template: (>O(-H)(-*))
end_type

type:oc
   !  SP3 oxygen  in ether or acetals
   template (>O(-C)(-C))
   atom_test:1
    aromaticity:NON_AROMATIC
   end_test
end_type

type:oe
   !  SP3 oxygen  in ester 
   template (>O(-C(=O))(-C))
   atom_test:1
    aromaticity:NON_AROMATIC
   end_test
end_type

type:oe
   !  SP3 oxygen  in ester 
   template (>O(:C[:O])(-C))
   atom_test:1
    aromaticity:NON_AROMATIC
   end_test
end_type

type:o3e
   !  SP3 oxygen  in three membered ring
   template (>O(-C)(-C))
   atom_test:1
     ring:PLANAR(3)
     aromaticity:NON_AROMATIC
   end_test
end_type

type:o4e
   ! SP3 oxygen  in non-planar four  membered ring
   template (>O(-C)(-C))
   atom_test:1
     ring:NON_PLANAR(4)
     aromaticity:NON_AROMATIC
   end_test
end_type

type:o4e
   ! SP3 oxygen  in planar four memberedd ring
   template (>O(-C)(-C))
   atom_test:1
     ring:PLANAR(4)
     aromaticity:NON_AROMATIC
   end_test
end_type

type: o=
   ! oxygen double bonded to O, N,C,S,P 
   template: (>O(=*))
   atom_test:2
      allowed_elements: O,N,C,S,P
   end_test
end_type

type: o-
   ! partial double oxygen bonded to something then bonded to 
   ! another  partial double oxygen
   template: [>O(:*[:O])]
   atom_test:2
      allowed_elements: C,P
   end_test
end_type

type: o-
   ! double bonded oxygen in charged carboxylate COO-
   ! or charged phosphate POO-
   template: [>O(=*[-O])]
   atom_test:2
      allowed_elements: C,P
   end_test
end_type

type: o-
   ! single bonded oxygen in charged carboxylate COO-
   ! or charged phosphate POO-
   template: [>O[-*[=O]]]
   atom_test:2
      allowed_elements: C,P
   end_test
end_type

type: op
   ! SP2 aromatic in 5 membered ring
   template:(>O)
   atom_test:1
    hybridization: SP2
    aromaticity:AROMATIC
    ring:PLANAR(5)
  end_test
end_type

type: op
   ! SP2 aromatic in 5 membered ring
   template:(>O(:*)(:*))
   atom_test:1
    hybridization:SP2
    aromaticity:NON_AROMATIC
    ring:PLANAR(5)
  end_test
end_type

type: o*
    !oxygen in water
    template (>O(-H)(-H))
end_type

type:h
  ! generic hydrogen 
  template: (>H (-*) )
  atom_test:2
    allowed_elements:C,Si,H
  end_test
end_type

type:hc
  ! hydrogen bonded to carbon
  template: (>H (-C) )
end_type

type:hs
  ! hydrogen bonded to sulfur
  template: (>H (-S) )
end_type

type:hsi
  ! hydrogen bonded to silicon
  template: (>H (-Si) )
end_type

type:hp
  ! hydrogen bonded to phosphorus
  template: (>H (-P) )
end_type

type:h*
  ! hydrogen bonded to fluorine, nitrogen, Oxygen
  template: (>H(-*))
  atom_test:2
    allowed_elements:O,N,F
  end_test
end_type

type:ho
  ! hydrogen bonded to oxygen
  template: (>H(-O))
end_type

type: hi
   ! Hydrogen in charged imidazole ring
   template:(>H(-N(:C)(:C(:N(-*)))))
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
end_type

type: hi
   ! Hydrogen in charged imidazole ring
   template:(>H(-N(=C(-N(-H)(-C(=C))))(-C)))
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:6
      ring:PLANAR(5)
   end_test
   atom_test:7
      ring:PLANAR(5)
   end_test
   atom_test:8
      ring:PLANAR(5)
   end_test
end_type

type: hi
   ! Hydrogen in charged imidazole ring
   template:(>H(-N(-C(=C(-N(=C)(-H))))(-C)))
   atom_test:2
      ring:PLANAR(5)
   end_test
   atom_test:3
      ring:PLANAR(5)
   end_test
   atom_test:4
      ring:PLANAR(5)
   end_test
   atom_test:5
      ring:PLANAR(5)
   end_test
   atom_test:6
      ring:PLANAR(5)
   end_test
   atom_test:8
      ring:PLANAR(5)
   end_test
end_type

type:hw
  ! hydrogen in water
  template: (>H(-O(-H)))
end_type


type:hn
  ! hydrogen bonded to nitrogen
  template: (>H (-N) )
end_type

type:h+
  ! charged hydrogen in cations
  template: (>H (-N(-*)(-*)(-*)) )
end_type

type:dw
  ! deuterium in heivy water
  template: (>D(-O(-D)))
end_type


type:s
    ! sp3 sulfur
    template: (>S)
end_type

type:sc
  ! sp3 sulfur in methionines (C-S-C) group
  template: (>S(-C)(-C))
end_type

type:s3e
   ! sulfur  in three membered ring
   template (>S(-C)(-C))
   atom_test:1
     ring:PLANAR(3)
     aromaticity:NON_AROMATIC
   end_test
end_type

type:s4e
   ! sulfur  in four  membered ring
   template (>S(-C)(-C))
   atom_test:1
     ring:PLANAR(4)
     aromaticity:NON_AROMATIC
   end_test
end_type

type:s4e
   ! sulfur  in three membered ring
   template (>S(-C)(-C))
   atom_test:1
     ring:NON_PLANAR(4)
     aromaticity:NON_AROMATIC
   end_test
end_type

type:s1
  ! sp3 sulfur involved in (S-S) group of disulfides
  template: (>S(-S))
end_type

type:sh
  ! sp3 sulfur in sulfhydryl (-SH) group (e.g. cysteine)
  template: (>S(-H)(-*))
  atom_test:3
    disallowed_elements:S
  end_test
end_type
   
type: sp
    ! sulfur in an aromatic ring (e.g. thiophene)
    template: (>S)
    atom_test:1
      aromaticity: AROMATIC
      hybridization:SP2
      ring: PLANAR(5)
    end_test
end_type

type: sp
    ! sulfur in an aromatic ring (e.g. thiophene)
    template: (>S(:*)(:*))
    atom_test:1
      hybridization:SP2
      aromaticity:NON_AROMATIC
      ring: PLANAR(5)
    end_test
end_type

type: s'
   ! S in thioketone group
   template: (>S(=*))
   atom_test:2
      allowed_elements: C,P,N,O
   end_test
end_type

type: sf
   ! S in sulfonate group
   template: (>S(=O)(=O)(-*)(-*))
    atom_test:1
      hybridization:SP3
      aromaticity:NON_AROMATIC
    end_test
  atom_test:4
    disallowed_elements:S
  end_test
  atom_test:5
    disallowed_elements:S
  end_test
end_type

type: s-
   ! partial double sulfur bonded to something then bonded to 
   ! another  partial double oxygen or sulfur
   template: [>S(:*[:*])]
   atom_test:2
      allowed_elements: C,P
   end_test
   atom_test:3
     allowed_elements: O,S
   end_test
end_type

type: s-
   ! double bonded sulfur in charged phosphate PSS- or PSO-
   template: [>S(=*[-*])]
   atom_test:2
      allowed_elements: C,P
   end_test
   atom_test:3
     allowed_elements: O,S
   end_test
end_type

type: s-
   ! single bonded sulfur in charged phosfur  PSS- or PSO-
   template: [>S[-*[=*]]]
   atom_test:2
      allowed_elements: C,P
   end_test
   atom_test:3
     allowed_elements: O,S
   end_test
end_type


type: ca+
  ! calcium ion
  template: [>Ca]
end_type

type: f
  !fluorine  atom
  template: (>F (-*))
end_type

type: cl
  !chlorine atom 
  template: (>Cl (-*))
end_type

type: Cl
  !chlorine ion
  template: [>Cl]
end_type

type: br
  !bromine atom 
  template: (>Br (-*))
end_type

type: Br
  !bromine ion
  template: [>Br]
end_type

type: i
  !iodine atom
  template: (>I (-*))
end_type

type: p
   ! General phosphorous atom
   template: (>P)
end_type

type: p=
   ! phopsphorous with double bond
   template: [>P (=*) (-*) (-*) (-*)]
   atom_test: 2
     allowed_elements: O,S,N
   end_test
end_type

type: p=
   ! phopsphorous with double bond
   template: [>P (:N) (:N) (-*) (-*)]
end_type

type: si
  !silicon atom
  template: (>Si)
end_type

!
! THE FOLLOWING DEFINITIONS ARE TAKEN FROM PFF
!

type: o_1
   ! carbonyl oxygen
   template: (>O (=C(~*)(~*)) )
end_type

type: oo 
   ! carbonyl oxygen of carbonates
   template: (>O (=C(-O)(-O)) )
end_type

type: o_2 
   ! ester oxygen 
   template: (>O (-C (=O)) (-*))
   atom_test: 4
       allowed_elements: C, H
   end_test
end_type

type: oz 
   ! ester oxygen in carbonate
   template: (>O (-C (=O)(-O)) (-*))
   atom_test: 5
       allowed_elements: C, H
   end_test
end_type

type:c_0
    ! aldehydes and ketones carbonyl carbon
    template: (>C (=O) (-*) (-*))
    atom_test:1
        hybridization:sp2
    end_test
    atom_test:2
      allowed_elements: O,S
    end_test
    atom_test:3
        allowed_elements: C, H 
    end_test
    atom_test:4
        allowed_elements: C, H
    end_test
end_type

type:c_1
    ! amide, acid and ester carbonyl carbon
    template: (>C (=O) (~*) (~*))
    atom_test:1
        hybridization:sp2
    end_test
    atom_test:2
      allowed_elements: O,S
    end_test
    atom_test:3
        allowed_elements: C, H
    end_test
    atom_test:4
        allowed_elements: O, N
    end_test
end_type

type:c_2
    ! carbamate, urea carbonyl carbon
    template: (>C (=O) (~*) (~*))
    atom_test:1
        hybridization:sp2
    end_test
    atom_test:3
        allowed_elements: N
    end_test
    atom_test:4
        allowed_elements: O, N
    end_test
end_type

type:cz 
    ! carbonate carbonyl carbon
    template: (>C (=O) (-O) (-O))
    atom_test:1
        hybridization:sp2
    end_test
end_type

type: n_2
   ! nitrogen in carbamate
   template: (>N (~C(=O)) (-H) (~*))
   atom_test: 1
     aromaticity:NON_AROMATIC
   end_test
   atom_test: 5
       allowed_elements: C, H
   end_test
end_type

type:hn2
  ! hydrogen bonded to nitrogen
  template: (>H (-N (~C(=O)(-*)) (~*)))
  atom_test: 2
     aromaticity:NON_AROMATIC
  end_test
  atom_test: 5
      allowed_elements: O, N, C, H
  end_test
  atom_test: 6
      allowed_elements: C, H
  end_test
end_type

type:ho2
  ! hydroxyl hydrogen
  template: (>H (-O (-C(=O)) ) )
end_type

type: osi
   ! oxygen in siloxane
   template: (>O (-Si) (-*) )
   atom_test: 3
       allowed_elements: Si, H 
   end_test
end_type

type: sio
   ! siloxane silicon
   template: (>SI (-O) (-*) (-*) (-*) )
   atom_test: 3
       allowed_elements: O, C, H
   end_test
   atom_test: 4
       allowed_elements: O, C, H
   end_test
   atom_test: 5
       allowed_elements: O, C, H
   end_test
end_type

type: he
  ! Helium    
  template: (>He)
end_type

type: ne
  ! Neon atom
  template: (>Ne)
end_type

type: ar
  ! Argon atom
  template: (>Ar)
end_type

type: kr
  ! Krypton atom
  template: (>Kr)
end_type

type: xe
  ! Xenon atom
  template: (>Xe)
end_type

type: sz
  ! silicon atom in zeolites (SiO4 tetrahedron)
  template: (>Si(-O)(-O)(-O)(-O))
end_type

type: az
  ! aluminium atom in zeolites (AlO4 tetrahedron)
  template: (>Al(-O)(-O)(-O)(-O))
end_type

type:ob
  ! oxygen in a Al-(OH)-Si bridge
  template: [>O(-Al)(-Si)(-H)]
end_type

type:oas
  ! oxygen in an Al-O-Si bridge
  template: [>O(-Al)(-Si)]
end_type

type:oss
  ! oxygen in a Si-O-Si bridge
  template: [>O(-Si(-O)(-O)(-O))(-Si(-O)(-O)(-O))]
end_type

type:osh
  ! oxygen in silanol groups
  template: [>O(-Si(-O)(-O)(-O))(-H)]
end_type

type:oah
  ! oxygen in AlOH groups
  template: [>O(-Al)(-H)]
end_type

type:hos
  ! hydrogen in silanol groups
  template: (>H [-O(-Si(-O)(-O)(-O))] )
end_type

type:hoa
  ! hydrogen in AlOH groups
  template: (>H [-O(-Al)] )
end_type

type:hb
  ! hydrogen in bridging OH groups
  template: (>H [-O(-Al)(-Si)] )
end_type

type: Al
  ! Aluminium Metal
  template: (>Al)
end_type

type: Na
  ! Sodium Metal
  template: (>Na)
end_type

type: Pt
  ! Platinum Metal
  template: (>Pt)
end_type

type: Pd
  ! Palladium Metal
  template: (>Pd)
end_type

type: Au
  ! Gold Metal
  template: (>Au)
end_type

type: Ag
  ! Silver Metal
  template: (>Ag)
end_type

type: Sn
  ! Tin Metal
  template: (>Sn)
end_type

type: K 
  ! Potassium Metal
  template: (>K)
end_type

type: Li
  ! Lithium Metal
  template: (>Li)
end_type

type: Mo
  ! Molybdenum Metal
  template: (>Mo)
end_type

type: Fe
  ! Iron Metal
  template: (>Fe)
end_type

type: W
  ! Tungsten Metal
  template: (>W)
end_type

type: Ni
  ! Nickel Metal
  template: (>Ni)
end_type

type: Cr
  ! Chromium Metal
  template: (>Cr)
end_type

type: Cu
  ! Copper Metal
  template: (>Cu)
end_type

type: Pb
  ! Lead Metal
  template: (>Pb)
end_type


precedence:
(?
  (h(hsi)(hc)) 
  (hs)
  (hp)
  (h*(ho(hw)(ho2)(hos)(hoa)(hb))(hn(hn2)(h+(hi))(hi))) 
  (cp(c5(ci(c_0)(c_1)(c_2)(cz))(c_0)(c_1)(c_2)(cz)(cs(c_0)(c_1)(c_2)(cz)))(c_0)(c_1)(c_2)(cz)(c-))
  (c=2(ci(c_0)(c_1)(c_2)(cz))(c_0)(c_1)(c_2)(cz)(c-) (cr(c+))) (cr(c+)) (c+)
  (c=2(c=1(c=(cr(c+))))(c=(cr(c+)))(cr(c+)))
  (c_0)(c_1)(c_2)(cz)(c-)(ct)(ci)
  (c(c1(c_a(c3m(c3h))(c4m(c3m)(c4h(c3h))))(co(coh))(c3m(c3h))(c4m(c3m)(c4h(c3h)))))
  (c(c2(c_a(cg(c3m(c3h))(c4m(c3m)(c4h(c3h)))))(co(coh))(c3m(c3h))(c4m(c3m)(c4h(c3h)))))
  (c(c3)(c_a(c3m(c3h))(c4m(c3m)(c4h(c3h))))(co(coh))(c3m(c3h))(c4m(c3m)(c4h(c3h)))) 
  (o(osi(oss)(osi(osh)))(oas)(oh(o_2(oz))(o*)(osi(ob))(osi(oss)(osh(osi)))(oas)(oah))(oc(oe(o_2(oz)))(o3e)(o4e))(oe(o_2(oz)))(o3e)(o4e)(op)(o=(o-)(o_1(oo)))(o-))(o3e)(o4e)(op)(o=(o-))(o-)(oh(o_2(oz))) 
  (na(n+)(n4)(n3m)(n4m)) (n(n3n)(n4n)(nb(n_2)(n3n)(n4n))) (nb(n_2)(n3n)(n4n))
  (np) (nh(ni)(nh+(nho))) (n2) (ni) (nt(nz)) (na(npc)) (npc) (n(npc))
  (n(np(ni))(nh(ni)(nh+(nho)))(ni)(n2)(nb(n_2)(np(ni))(nh(ni)(nh+(nho)))(ni)))
  (n=2(n=1(n=(n1)))(n=(n1))(n1))(n1)
  (n(n_2)(n=2(n=1(n=(n1)))(n=(n1)))(n1))(n1)
  (n=)
  (s(sc(s'(sf))(sp)(s3e)(s4e)(sh(s'(sf))(s3e)(s4e))(s1(s3e)(s4e)))(sh(s'(sf))(s3e)(s4e))(s1(s3e)(s4e))(s'(sf))(sp))
  (p(p=))
  (si(sio(sz)))
  (ca+)
  (f)
  (cl)(Cl)
  (br)(Br)
  (i)
  (he)
  (ne)
  (ar)
  (kr)
  (xe)
  (lp)
  (dw)
  (Al(az))
  (Na)
  (Pt)
  (Pd)
  (Au)
  (Ag)
  (Sn)
  (K)
  (Li)
  (Mo)
  (Fe)
  (W)
  (Ni)
  (Cr)
  (Cu)
  (Pb)
)
end_precedence

