A little script that prints out possible permutations of the like atoms in simple molecule(s). The molecule(s) here is something like [H2O]3 or [H2O]2[Na]2. For [H2O]2 (water dimer), for example, the output is as follows:
# # input = '[H2O]2' # # 2 of 'H2O' (3 atoms : H H O) # # molecules: # # 0 -> H2O # 1 -> H2O # # permutations of the molecules: # # 0 1 # 1 0 # # atoms: # # 0 -> H # 1 -> H # 2 -> O # 3 -> H # 4 -> H # 5 -> O # # permutations of the atoms for a fixed order of the molecules: # # 0 1 2 3 4 5 # 0 1 2 4 3 5 # 1 0 2 3 4 5 # 1 0 2 4 3 5 # # permutations of the atoms for different arrangements of the molecules: # 0 1 2 3 4 5 0 1 2 4 3 5 1 0 2 3 4 5 1 0 2 4 3 5 3 4 5 0 1 2 4 3 5 0 1 2 3 4 5 1 0 2 4 3 5 1 0 2 # 8 total
Download the script here or run it via CGI: