grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
553 stars 138 forks source link

Write optimization log and md trajectory as PDB #211

Open awvwgk opened 4 years ago

awvwgk commented 4 years ago

Is your feature request related to a problem? Please describe. For visualisation of protein dynamics or geometry optimizations the PDB information should be preserved in the optimization log. Right now only the coordinates are written as xyz since it is a quite sparse and non-redundant representation of the structure compared to PDB.

Describe the solution you'd like Since there is no real log format for PDB the easiest way is to chain them as models in one PDB file, this could either replace the default log file or be printed additionally for PDB input.

Describe alternatives you've considered Would require a different format which is as common as PDB and implemented in most readers.

Additional context Most of the necessary code is already in place.

shuxiansheng2 commented 3 years ago

it can easily be done using vmd, script method like below:

-----------------------------------------------------------------------------------
\# convert xtb opt/md trjactory to pdb file

\# load template pdb and trajectory into one molid
\# if --cma used in xtb, delete frame 0 to avoid jump
mol new pro_IA.pdb
animate delete  beg 0 end 0 skip 0 0
mol addfile xtb.trj type xyz first 0 last -1 step 1 waitfor all 0

set sel [atomselect 0 all]
set n [molinfo 0 get numframes]
animate write pdb trj.pdb beg 0 end [incr n -1] skip 1 waitfor all sel $sel 0

puts \"All Done\!\"
-----------------------------------------------------------------------------------