{"id":119,"date":"2022-07-30T04:23:06","date_gmt":"2022-07-29T20:23:06","guid":{"rendered":"http:\/\/www.sijiachen.online\/?p=119"},"modified":"2022-10-12T02:32:04","modified_gmt":"2022-10-12T02:32:04","slug":"vmd-usage-note","status":"publish","type":"post","link":"https:\/\/www.sijiachen.online\/index.php\/2022\/07\/30\/vmd-usage-note\/","title":{"rendered":"VMD Usage Note"},"content":{"rendered":"\n<p>This blog is a record of personalized, commonly used commands in VMD. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#VMD\n# Move in one frame\n#select the atoms you want\nset sel &#91;atomselect top \"type Ca\"]\n# calculate the COM of the atoms\nset geoc &#91;measure center $sel]\n# calculate the vector you want to move by\nset minus_com &#91;vecsub {0 0 0} $geoc]\n# select all atoms\nset selall &#91;atomselect top all]\n#move all atoms\n$selall moveby $minus_com\n\n# Note that above commands only work with \"one\" frame,\n# to do this to all frames, using following commands\nset sel &#91;atomselect top \"type Ca\"]\nset selall &#91;atomselect top all]\nset n &#91;molinfo top get numframes]\nfor { set i 0 } { $i &lt; $n } { incr i } {\n  $sel frame $i\n# The frame option sets the frame of the selection, update tells the atom selection to recompute\n  $sel update\n  $selall frame $i\n  $selall update\n  set geoc &#91;measure center $sel]\n  set minus_com &#91;vecsub {0 0 0} $geoc]\n  $selall moveby $minus_com\n}\n\n```<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This blog is a record of personalized, commonly used commands in VMD.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[11,10],"class_list":["post-119","post","type-post","status-publish","format-standard","hentry","category-research","tag-research","tag-vmd"],"_links":{"self":[{"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/posts\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":1,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/posts\/119\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/media?parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/categories?post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sijiachen.online\/index.php\/wp-json\/wp\/v2\/tags?post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}