-1
每個文件我有一個PDB文件代表軌跡文件看起來像提取PDB trajctory
REMARK GENERATED BY TRJCONV
TITLE Protein in water t= 400.00000
REMARK THIS IS A SIMULATION BOX
CRYST1 99.547 99.547 99.547 90.00 90.00 90.00 P 1 1
MODEL 1
ATOM 1 N PRO A 1 46.850 67.380 57.030 1.00 0.00
ATOM 2 H1 PRO A 1 46.230 66.770 56.500 1.00 0.00
ATOM 3 H2 PRO A 1 46.420 68.290 56.940 1.00 0.00
ATOM 4 CD PRO A 1 47.060 66.780 58.360 1.00 0.00
TER
ENDMDL
REMARK GENERATED BY TRJCONV
TITLE Protein in water t= 800.00000
REMARK THIS IS A SIMULATION BOX
MODEL 10
ATOM 1 N PRO A 1 46.850 67.380 57.030 1.00 0.00
ATOM 2 H1 PRO A 1 46.230 66.770 56.500 1.00 0.00
ATOM 3 H2 PRO A 1 46.420 68.290 56.940 1.00 0.00
ATOM 4 CD PRO A 1 47.060 66.780 58.360 1.00 0.00
TER
ENDMDL
REMARK GENERATED BY TRJCONV
TITLE Protein in water t= 1200.00000
REMARK THIS IS A SIMULATION BOX
MODEL 100
ATOM 1 N PRO A 1 46.850 67.380 57.030 1.00 0.00
ATOM 2 H1 PRO A 1 46.230 66.770 56.500 1.00 0.00
ATOM 3 H2 PRO A 1 46.420 68.290 56.940 1.00 0.00
ATOM 4 CD PRO A 1 47.060 66.780 58.360 1.00 0.00
TER
ENDMDL
我想打印的信息
MODEL 1
[all info]
TER
ENDMDL
對於所有的車型。保留文件的格式。我試過這個
awk '/MODEL 1/,/ENDMDL/' test.pdb
但是我的文件太大了,不可能手動完成。我想每個模式作爲模型1,模型2等保存自己的座標信息,直到ENDMDL
謝謝你,但我要保存的每個模型model1.pdb,MODEL2。 pdb等。如果我使用這個代碼,我只能得到單個文件。 – user2451501
是的,它有助於將所有要求添加到問題中。 –
非常感謝你:) – user2451501