Bonds, Angles and Torsions from periodic structure

Hi all,

I have a "small" problem. I need to print out bonds, angles and torsions from periodic structure, but unfortunately I do not know how to do it.

Originally, I need to create so called mmol file given as follows:

==========

# FAU.xsd - zeolite structure supercell

#  Number of atoms

        4992

#         x            y          z            Ar           Q         sig        eps       FF      no

Si     23.225    3.071    0.890    28.0900   0.8646   3.2857   0.2100   Si_z     1

     *

     *

#  Number of bonds

        6144

     1     5   1.61500   2931.00                     #  Si_z-O_z

     1    78  1.61500   2931.00                     #  Si_z-O_z

     *

     *                         *** Up to this point, I know how to print it, but further on is a bit mistery! ***

#  Number of angles

       12288

     5      1    78    109.4700      418.00     #  O_z-Si_z-O_z

     *

     *

#  Number of torsions

       18432

   78       1     5     2    180.000    4.180   3     #O_z-Si_z-O_z-Si_z

   387     1     5     2    180.000    4.180   3     #O_z-Si_z-O_z-Si_z

==========

I know how to do it manually for each structure under Linux enviroment, but I would like to generate it for hundrets of structures from Materials Studio directly.

The problem appear earlier (https://community.accelrys.com/thread/5054), but for one part of the solution user need to Find Patterns tool to automatically create all of the angle monitors. Unfortunatelly, I do not know how to do it.

So, can someone help me with this? Basicly, it would be more appreciate to have a solution in script form, which is then much easier to apply for large number of files.

Thank you for your time!

Best regards,

Bojan