Hi, Thanks for both of your reply.
File 1 is: 3 C 1 CUR C19 1 0.200 12.0110 4 CR1 1 CUR C20 1 -0.060 12.0110 5 HC 1 CUR H20 1 0.060 1.0080 File 2 is: ATOM 2 H20 CUR 1 30.338 28.778 -6.812 1.00 0.00 ATOM 4 C20 CUR 1 31.394 28.922 -7.039 1.00 0.00 ATOM 5 C19 CUR 1 31.790 29.357 -8.323 1.00 0.00 I wish to get: ATOM 5 C19 CUR 1 31.790 29.357 -8.323 1.00 0.00 ATOM 4 C20 CUR 1 31.394 28.922 -7.039 1.00 0.00 ATOM 2 H20 CUR 1 30.338 28.778 -6.812 1.00 0.00 The dictionary is C19 C20 H20 sequence read from file 1 field 5. rearrange the file 2 field 3 following the sequence of C19, C20, H20. Thanks.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor