I want to know the percentages of secondary structure for my protein that I have already done simulation on with GROMACS but I need the commands for the percentages.
You can use the STRIDE server (http://webclu.bio.wzw.tum.de/cgi-bin/stride/stridecgi.py) to obtain each residue secondary structure, but you can only upload one pdb at a time. Also, you can use the GROMACS tool do_dssp, which gives you the amount of residues per secondary structure (i.e. 87 residues with a-helix, 50 b-sheet, etc) and has the advantage of using the whole trajectory.
Ok, so you should use the do_dssp with the flag -sc. This will give you a .xvg file containing the total amount of residues that has secondary structure and also separated by type of secondary structure. You can use the software xmgrace with the flag -nxy to open this file.
STRIDE is an standard option. Also you can use SS-map, a program that incorportaes STRIDE and also another definitons for define the secondary structure. The only that you need is give a PDB as input. https://www.landesbioscience.com/journals/idp/article/25323/
Anyway you can use the gromacs optioon do_dssp with the flag -sc as Conrado said, but other methods are mroe accurate than the incorporated by gromacs and is easy acces to them, because Gromacs allows to generate PDBs abd so on with the trjconv tool.
(1) generate consecutive average structure, say in 2ps blocks, using trjconv with -dt and -sep options; (2) generate a .dat file from do_dssp using those 2ps ave structures; (3) move all contents of each .dat file into a common .dat file. (4) opening your common .dat file in, say Excel, should give you in each row, DSSP assignments showing E. S, T, B; each column representing each residue. (5) again if you use EXCEL, COUNTIF will do the work for you for each sec struc you want counted and percentaged. Or you can write out a script to do all of above without havibng to import the .dat file into another software.