I have a long txt file and I am interested in a specific lines. The segement that I am interested in is something like:
Activities in Cartesian coordinate
mode 1 ( 0.000000000 0.346863768 0.194956009 ) ( 0.346863768 0.000000000 -0.000000000 ) ( 0.194956009 -0.000000000 0.000000000 ) ( 0.346863768 0.000000000 -0.000000000 ) ( 0.000000000 -0.346863768 0.194956009 ) ( -0.000000000 0.194956009 -0.000000000 ) ( 0.187247036 0.000000000 0.000000000 ) ( 0.000000000 0.187247036 0.000000000 ) ( 0.000000000 0.000000000 -0.893848809 ) mode 2 ( 0.000000000 -0.346863768 0.194956009 ) ( -0.346863768 0.000000000 0.000000000 ) ( 0.194956009 0.000000000 0.000000000 ) ( -0.346863768 -0.000000000 0.000000000 ) ( -0.000000000 0.346863768 0.194956009 ) ( 0.000000000 0.194956009 -0.000000000 ) ( 0.187247036 0.000000000 0.000000000 ) ( 0.000000000 0.187247036 0.000000000 ) ( 0.000000000 0.000000000 -0.893848809 ) mode 3 ( -0.000000000 0.292966545 -0.197313262 ) ( 0.292966545 0.000000000 0.000000000 ) ( -0.197313262 0.000000000 0.000000000 ) ( 0.292966545 -0.000000000 0.000000000 ) ( -0.000000000 -0.292966545 -0.197313262 ) ( 0.000000000 -0.197313262 -0.000000000 ) ( -0.182193022 -0.000000000 0.000000000 ) ( -0.000000000 -0.182193022 0.000000000 ) ( 0.000000000 0.000000000 0.894144988 ) mode 4 ( 0.000000000 -0.292966545 -0.197313262 ) ( -0.292966545 0.000000000 -0.000000000 ) ( -0.197313262 -0.000000000 -0.000000000 ) ( -0.292966545 0.000000000 -0.000000000 ) ( 0.000000000 0.292966545 -0.197313262 ) ( -0.000000000 -0.197313262 0.000000000 ) ( -0.182193022 -0.000000000 0.000000000 ) ( -0.000000000 -0.182193022 0.000000000 ) ( 0.000000000 0.000000000 0.894144988 )
I want to take each mode and store the 3×3 matrices that correspond to in a variable that have a name like modeij. i is the number of the mode, and j is the index of each matrix.
I hope to hear from you.
Best Answer