["grep ATOM ", "frame_", str(frame), ".pdb ", ">> ", waterlayer_pdb]) proc = Popen(command, shell=True, stdout=PIPE) proc.communicate() command = "".join(["echo ENDML", ">> ", waterlayer_pdb]) proc = Popen(command, shell=True, stdout=PIPE) proc.commu...