Hi there,
The attached zip file contains two scripts for analysing the positions of centroids using radial distribution functions. Each script reads in a polymer structure containing repeat units and defines a centroid for each repeat unit.
RDF Single performs a single radial distribution calculation of all the repeat units.
RDF Pairs performs multiple calculations for each pair of chemically unique repeat units in the polymers, defined by their subunit name.
From a Perl perspective, RDF Pairs demonstrates a way of adding unique values to an array and a very simple way of combining them to get unique pairs. No doubt there are more refined Perl-ish ways of doing these things but.....
These scripts require Materials Studio 4.2 and uses the Materials Visualizer and Forcite Trajectory Analysis tools.
Best regards,
Stephen