'''
(c) 2011-2012 Thomas Holder, MPI for Developmental Biology
'''
from __future__ import print_function

__author__ = 'Thomas Holder'
__version__ = '1.1'
__license__ = 'BSD-2-Clause'

from pymol import cmd, CmdException

def save_pdb_without_ter(filename, selection, **kwargs):
	'''
DESCRIPTION

    Save PDB file without TER records. External applications like TMalign and
    DynDom stop reading PDB files at TER records, which might be undesired in
    case of missing loops.
	'''
	v = cmd.get_setting_boolean('pdb_use_ter_records')
	if v: cmd.unset('pdb_use_ter_records')