In molecular dynamics simulation how one can extract the angle distribution of moving species near surfaces? If not what "Perl script" could be used in extracting the angels for understanding orientation of molecules toward surfaces.
You simply need to write your own code which will extract conformations placed by surfaces and compute dihedrals. You can implement in the same code or write a separate one for making the distributions. For that you can use any programming language you can, not just Perl.
You could also use a tool developed in my previous group, you can find it here: https://gcm.upc.edu/en/members/luis-carlos/angula/ANGULA. You could take a look at a paper using it:
Article On the positional and orientational order of water and metha...
In that paper you can see how the molecules close to the surface of Indole molecules are defined and studied.
Regarding to the surface. What kind of surface do you work with?
There is an implementation to define intrinsic surfaces, so you can define the molecules close to an arbitrary surface, and then you could apply the orientational analysis on those molecules.
Article Layer-by-layer and intrinsic analysis of molecular and therm...