function s = ranpgru(str,pos,phase)
% s = ranpgru(str,pos,phase)
% Group of structures with positions pos.
% str :  String of Structure description to be replicated.
%        Allowed variables are pos, phase and the internal 
%        groupindex grix and also those variables that are 
%        assigned a value by the parametr par.
% pos :  There are three options for pos:
% pos = n*3-matrix of (x,y,z)-positions
% pos = n*2-matrix of (y,z)-positions
% pos = n*1-matrix of z-positions
% phase: vector of excitation phases,
%        in case of a scalar value all excitations 
%        will have that phase.
%        This variable can be used inside of str.
