Dear Charith, this question is very common here in ResearchGate, even I've replied before. I suggest you better off search for the replies.
Edit: The use of the 'opt' keyword in a TD job depends on your needs, if you want relaxed excited states you must use 'opt', in vertical excitations is not required.
In the input file, just enter the keyword “td(nstates=20)”. This can be done both at a previously optimized geometry or at a frozen geometry taken, for example, from structural data.
X X 1 1.0 C 2 XC 1 A1 C 2 XC 1 A1 3 60.0 C 2 XC 1 A1 4 60.0 C 2 XC 1 A1 5 60.0 C 2 XC 1 A1 6 60.0
C 2 XC 1 A1 7 60.0 X 3 1.0 2 A1 1 0.0 H 3 HC 9 A1 2 180.0 H 4 HC 3 A2 2 180.0 H 5 HC 4 A2 2 180.0 H 6 HC 5 A2 2 180.0 H 7 HC 6 A2 2 180.0 H 8 HC 7 A2 2 180.0 A1 = 90.0 A2 = 120.0 XC = 1.3 HC = 1.08
(Remember to include an empty line at the end)
can be any available method or DFT functional (for example HF, MP2, B3LYP, PBE1PBE and so on); should be available for the atomic species of your molecule. In general the Minnesota family of DFT functions and the PBE0 functional are well suited for DFT calculations. As for the basis sets, I strongly suggest to consider large enough sets including diffuse functions.