可使用python脚本(下载解压后使用)。脚本内容如下:
#!/usr/bin/env amspython from scm.plams import * def main(): rkf = 'D:/ADF_DATA/Task/tes.results/ams.rkf' trajectory = Trajectory(rkf) for i, mol in enumerate(trajectory, 1): print(f"frame {i}") print(mol) if i == 10: break print("Extracting specific molecule") job = AMSJob.load_external(rkf) mol = job.results.get_history_molecule(67) print("Frame 67") print(mol) if __name__ == '__main__': main()
格式类似如下:
Frame 67 Atoms: 1 O 1.908476 8.810413 -6.653047 2 H 2.106662 7.954617 -6.974343 3 H 1.232036 9.136536 -7.258801 4 O 9.522390 -7.589808 0.525555 5 H -9.842508 -7.432060 -0.260436 6 H 10.049396 -7.189823 1.199989 7 O -6.144137 -9.116302 -5.367006 8 H -6.761021 -8.384682 -5.540695 9 H -6.852141 -9.705420 -4.975267 10 O -5.670043 5.852205 2.681984 11 H -4.767790 5.816332 2.282185 12 H -6.031881 6.774200 2.770605 13 O -0.376795 -1.178371 10.154385 …… 297 H -9.523604 -8.657806 -4.717627 298 O -8.354747 2.038060 -5.816646 299 H -7.418100 2.243509 -5.584667 300 H -8.711936 2.331389 -4.949967 Bonds: (1)--0.9--(2) (1)--0.9--(3) (4)--0.8--(5) (4)--0.9--(6) (7)--0.9--(8) (7)--0.8--(9) (10)--0.9--(11) (10)--0.9--(12) …… (292)--0.9--(293) (292)--0.9--(294) (295)--0.9--(296) (295)--0.9--(297) (298)--0.9--(299) (298)--0.9--(300) Lattice: 20.0000000000 0.0000000000 0.0000000000 0.0000000000 20.0000000000 0.0000000000 0.0000000000 0.0000000000 20.0000000000
其中Frame 67表示第67帧