Re: The size of a periodic cell in NAMD operation

From: Chris Harrison (
Date: Fri Aug 31 2012 - 19:55:42 CDT

Patrick Chiu <> writes:
> Date: Fri, 31 Aug 2012 16:45:19 -0700 (PDT)
> From: Patrick Chiu <>
> To:
> Subject: namd-l: The size of a periodic cell in NAMD operation
> X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/
> Dear Sir/Madam:
> How do I decide the size of a periodic cell in NAMD operation. Is it just big enough to hold the model containing protein and waters?
> Yours sincerely
> NAMD user
> See Hong Chiu

Typically, yes.

If you put the below proc in a file (get_cell.tcl) and load it into the
TkConsole (see Extensions > TkConsole) in VMD with "source get_cell.tcl", then
load your system and finally type in the TkConsole get_cell, it will output the
necessary vectors and center.

proc get_cell {{molid top}} {
  set all [atomselect $molid all]
  set minmax [measure minmax $all]
  set vec [vecsub [lindex $minmax 1] [lindex $minmax 0]]
  puts "cellBasisVector1 [lindex $vec 0] 0 0"
  puts "cellBasisVector2 0 [lindex $vec 1] 0"
  puts "cellBasisVector3 0 0 [lindex $vec 2]"
  set center [measure center $all]
  puts "cellOrigin $center"
  $all delete


Chris Harrison, Ph.D.
NIH Center for Macromolecular Modeling and Bioinformatics
Theoretical and Computational Biophysics Group
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave., Urbana, IL 61801       Voice: 773-570-6078               Fax:   217-244-6078

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:22:29 CST