From: Axel Kohlmeyer (
Date: Thu Apr 22 2021 - 12:59:51 CDT

The error message "measure center, bad sum weight would cause divide by
zero" can *only* happen, if your atoms have no masses associated with them.
That in turn is usually the consequence of not reading your trajectory data
correctly or using files that are missing this information or are not
correctly formatted.
As already noted, if you have .psf and .dcd files you *must* load the .psf
file first and *then* load the .dcd file(s) into the *same* "molecule" that
was created in VMD when loading the .psf file. The .psf and .dcd files have
to match, i.e. contain the same atoms. But since .dcd files have no other
information than the coordinates and the simulation box dimensions, it can
only check for consistency outside of the number of atoms and it cannot be
used for analysis on its own, since there is no required information about
atom types, names, residues etc. included. You cannot expect an add-on
script to work correctly if you do not provide the required information.


On Thu, Apr 22, 2021 at 3:04 AM Jovana Stelkic <>

> Hello,
> I am into VMD and NAMD for some time now and i'm still learning. I did
> some MD simulations of the protein and ceramide ligands, and I did all
> preparations as it is described in tutorials, I paramatised ligand,
> generate protein.psf via pgn file as it is written in tutorial, made
> complex via tcl and solvated complex via vmd. I did the simulation with
> boundaries and PME with cell origin of solvated complex as described in the
> main NAMD tutorial, i tried with wrap water on and off as well. After
> simulation I got *.dcd, *.coo, *.vel, *.xsc and *.psf files but when I
> load *.psf and *.dcd into vmd and enter corresponding files into BFEE and
> press 'generate input' button it does not generate any of files, just empty
> folders and it gives me an message about error: measure center, bad sum
> weight would cause divide by zero'. I tried to add all the hydrogens to the
> protein also before creating psf but no change. Also tried with several pdb
> files of the same protein from rcsb and with various ligands. I tested
> plugin with plugin-tutorial example files and it worked. I read similar
> threads about the same error but can't find the connection. BFEE.tcl script
> (code) does not contain lines with such error. I would appreciate any help
> about the cause of such error. Bellow is log text of creation of protein
> psf. Thank You.

> Ceated by CHARMM version 27 1
> psfgen) aliasing residue HIS to HSE
> psfgen) aliasing residue ILE atom CD1 to CD
> psfgen) building segment U
> psfgen) reading residues from pdb file ncsp.pdb
> psfgen) extracted 190 residues from pdb file
> psfgen) Info: generating structure...psfgen) Info: skipping improper
> N-C-CA-HN at beginning of segment.
> psfgen) Info: skipping conformation C-N-CA-C at beginning of segment.
> psfgen) Info: skipping conformation C-CA-N-HN at beginning of segment.
> psfgen) Info: skipping bond C-N at end of segment.
> psfgen) Info: skipping improper C-CA-N-O at end of segment.
> psfgen) Info: skipping conformation CA-C-N-CA at end of segment.
> psfgen) Info: skipping conformation N-CA-C-O at end of segment.
> psfgen) Info: skipping conformation N-CA-C-N at end of segment.
> segment complete.
> psfgen) reading coordinates from pdb file ncsp.pdb for segment U
> psfgen) Info: guessing coordinates for 0 atoms (0 non-hydrogen)
> psfgen) Info: writing pdb file ncs.pdb
> psfgen) Info: pdb file complete.
> psfgen) Info: writing psf file ncs.psf
> psfgen) total of 3048 atoms
> psfgen) total of 3080 bonds
> psfgen) total of 5565 angles
> psfgen) total of 8161 dihedrals
> psfgen) total of 491 impropers
> psfgen) total of 0 explicit exclusions
> psfgen) total of 0 cross-terms
> psfgen) Info: psf file complete.
> vmd >
> Best regards,
> Jovana

Dr. Axel Kohlmeyer;!!DZ3fjg!s6mqPcPSLC6pjmqkmWaf8IJMbMRffHhLnnJaIWibYHNfYg9NNGwxq1VasJYhtdXvpA$ 
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.