In Multisim -- I don't know for other spice simulator --, when assigning the pin numbers... you assign them in the order that they appear in the ".subckt" line. Since that is the order of the mapping procedure into a symbol.
Let me be more clear... your first line is like:
.SUBCKT MAT02 1 2 3 5 6 7
So, when mapping to a symbol that has 6 pins... spice sees the above line as 1, 2, 3, 4, 5, 6. Your assignment should then be:
Assignment Pin number
C1 1
B1 2
E1 3
E2 5 << 4
B2 6 << 5
C2 7 << 6
Inside the SPICE code, it will still be 1, 2, 3, 5, 6, 7.... but from the symbol it will take those signals from 1, 2, 3, 4, 5, 6. In that order. Another example for this is, suppose that first line has these pins... 1, 13, 4, 6, 9, 10..... when you map them, you will still map them considering that 1 is 1, 13 is 2, 4 is 3, 6 is 4, 9 is 5 and 10 is 6.
I hope this helps....
Nestor