PDB is not a native CHARMM format, and there are a number of variations in the PDB format produced by different programs which can make import challenging at times.

I suggest using the UNIVersal I/O specification, as outlined in the second example in this post which reads a complex PDB file in a single pass.

Rick Venable
computational chemist