As already mentioned you should run dssp, which is the most common algorithm for this job. There are several implementations available on the market. I would use the mdtraj library ()
In ambertools14 there is a command "Secstruct" (please go through the manual) which uses dssp to calculate secondary structure as well as able to generate data compatible for gnuplot.
I have generated dssp generated files but still unable to plot graph by gnuplot it seems like .dssp file are not compatible with gnuplot. Dear aditya Can you describe me a bit if you had tried that..
The .gnu file generated by the secstruc command which is standard in the CPPTRAJ software suite, has to be manually adapted in order to be correctly plotted. Moreover, I found that removing line 5 was sufficient 'cboptics'.
What you stated is exactly my challenge, my .gnu file from CPPTRAJ fails to plot in GNUPLOT. I have removed "cbtics" as you suggested but my plot remained empty. Kindly find my .gnu file for advice.