How to reproduce:
  • generate a system with more than one molecule that has anisotropy defined in the PSF,
  • use "DELETE ATOM" to delete some but not all of the "anisotropic" molecules,
  • call "ENERGY". CHARMM will segfault in EANISOTROPY.

Possible cause: NANISO may not get updated when deleting atoms.

Fix: unfortunately, it is far beyond my research area and my skills to fix this. For one thing, I don't know which subroutine is supposed to update NANISO. Could it be MAPIC?

Workaround:
Assuming that all but one residue gets deleted:
Code:
delete atom sele .not. resi @i end

open unit 1 write form name temporary.crd
write coor card unit 1
close unit 1

drude reset
delete atom select all end

read sequence @residue 1
generate @residue first none last none setup warn drude dmass 0.4

open unit 10 read form name temporary.crd
read coor card unit 10

energy