# -*- coding: utf-8 -*-
"""
MLC cells
"""
__author__ = '<NAME>'

from input_file_creator.write_cell_card.mlc_open import mlc_open_distance as mlcod
from input_file_creator.write_cell_card.trcl import trcl_mlc


def qi_bank_1():
    qi_cell_1 = ('c Quarter Leaf Isocenter Bank 1 ' + '$' * 46 + '\n' +
                 '  130 3 -18 -101 104 105 -106 -109 -110' + '\n' +
                 ' ' * 5 + '(101:102:-103:-104:109:110)' + '\n' +
                 ' ' * 5 + '(101:-108:-107:106:109:110)' + '\n' +
                 ' ' * 5 + '(101:-111:-112:108:109:110)' + '\n' +
                 ' ' * 5 + '(113:115:-114:-104:109:110)' + '\n' +
                 ' ' * 5 + '(-116:-104:-105:109:110)' + '\n' +
                 ' ' * 5 + '(101:109:-117:118:-119)' + '\n' +
                 ' ' * 5 + '(-105:109:-120:121:122)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(130)) + ' 0 0) imp:p,e 1' + '\n'
                 # 5 spaces is to tell MCNP this a continued line, not a new line.
                 # 19 spaces is in order make it at same position with following lines
                 )
    return qi_cell_1


def qi_bank_2():
    qi_cell_2 = ('c Quarter Leaf Isocenter Bank 2 ' + '$' * 46 + '\n' +
                 '  230 3 -18 -101 104 105 -106 -159 160' + '\n' +
                 ' ' * 5 + '(101:102:-103:-104:159:-160)' + '\n' +
                 ' ' * 5 + '(101:-108:-107:106:159:-160)' + '\n' +
                 ' ' * 5 + '(101:-111:-112:108:159:-160)' + '\n' +
                 ' ' * 5 + '(113:115:-114:-104:159:-160)' + '\n' +
                 ' ' * 5 + '(-116:-104:-105:159:110)' + '\n' +
                 ' ' * 5 + '(101:159:-167:-168:-119)' + '\n' +
                 ' ' * 5 + '(-105:159:-170:-171:122)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(230)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qi_cell_2


def qt_bank_1():
    qt_cell_1 = ('c Quarter Leaf Target Bank 1' + '$' * 47 + '\n' +
                 '  131 3 -18 -201 -202 205 208 -209 -210' + '\n' +
                 ' ' * 5 + '(-208:203:206:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-206:212:211:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-204:203:202:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-215:213:202:-214:209:210)' + '\n' +
                 ' ' * 5 + '(201:202:-216:209:210)' + '\n' +
                 ' ' * 5 + '(201:209:-217:218:-219)' + '\n' +
                 ' ' * 5 + '(-205:209:-220:221:222)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(131)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qt_cell_1


def qt_bank_2():
    qt_cell_2 = ('c Quarter Leaf Target Bank 2' + '$' * 47 + '\n' +
                 '  231 3 -18 -201 -202 205 208 -259 260' + '\n' +
                 ' ' * 5 + '(-208:203:206:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-206:212:211:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-204:203:202:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-215:213:202:-214:259:-260)' + '\n' +
                 ' ' * 5 + '(201:202:-216:259:260)' + '\n' +
                 ' ' * 5 + '(201:259:-267:-268:-219)' + '\n' +
                 ' ' * 5 + '(-205:259:-270:-271:222)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(231)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qt_cell_2


def hi_bank_1():
    hi_cell_1 = ('c Half Leaf Isocenter Bank 1' + '$' * 47 + '\n' +
                 '  114 3 -18 -301 304 305 -306 -309 -310' + '\n' +
                 ' ' * 5 + '(301:302:-303:-304:309:310)' + '\n' +
                 ' ' * 5 + '(301:-308:-307:306:309:310)' + '\n' +
                 ' ' * 5 + '(301:-311:-312:308:309:310)' + '\n' +
                 ' ' * 5 + '(313:315:-314:-304:309:310)' + '\n' +
                 ' ' * 5 + '(301:309:-317:318:-319)' + '\n' +
                 ' ' * 5 + '(-305:309:-320:321:322)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(114)) +
                 ' 0.00160 -0.04032 0 90 90 90 2.28 -87.72 90 92.28 -2.28)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return hi_cell_1


def hi_bank_2():
    hi_cell_2 = ('c Half Leaf Isocenter Bank 2' + '$' * 47 + '\n' +
                 '  214 3 -18 -301 304 305 -306 -359 360' + '\n' +
                 ' ' * 5 + '(301:302:-303:-304:359:-360)' + '\n' +
                 ' ' * 5 + '(301:-308:-307:306:359:-360)' + '\n' +
                 ' ' * 5 + '(301:-311:-312:308:359:-360)' + '\n' +
                 ' ' * 5 + '(313:315:-314:-304:359:-360)' + '\n' +
                 ' ' * 5 + '(301:359:-367:-368:-319)' + '\n' +
                 ' ' * 5 + '(-305:359:-370:-371:322)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(214)) +
                 ' 0.00160 -0.04032 0 90 90 90 2.28 -87.72 90 92.28 -2.28)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return hi_cell_2


def ht_bank_1():
    ht_cell_1 = ('c Half Leave Target Bank 1' + '$' * 47 + '\n' +
                 '  113 3 -18 -401 -402 405 408 -409 -410' + '\n' +
                 ' ' * 5 + '(-408:403:406:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-406:412:411:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-404:403:402:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-415:413:402:-414:409:410)' + '\n' +
                 ' ' * 5 + '(401:409:-417:418:-419)' + '\n' +
                 ' ' * 5 + '(-405:409:-420:421:422)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(113)) +
                 ' 0.003141 -0.06304 0 90 90 90 2.854 -87.146 90 92.854 2.854)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return ht_cell_1


def ht_bank_2():
    ht_cell_2 = ('c Half Leave Target Bank 2' + '$' * 47 + '\n' +
                 '  213 3 -18 -401 -402 405 408 -459 460' + '\n' +
                 ' ' * 5 + '(-408:403:406:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-406:412:411:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-404:403:402:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-415:413:402:-414:459: -460)' + '\n' +
                 ' ' * 5 + '(401:409:-467:-468:-419)' + '\n' +
                 ' ' * 5 + '(-405:409:-470:-471:422)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(213)) +
                 ' 0.003141 -0.06304 0 90 90 90 2.854 -87.146 90 92.854 2.854)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return ht_cell_2


def outboard():
    obi_1 = ('c Outboard isocenter bank 1' + '$' * 47 + '\n' +
             '  160 3 -18  -501 504 505 -508 -509 -510' + '\n' +
             ' ' * 5 + '(501:502:-503:-504:509:510)' + '\n' +
             ' ' * 5 + '(501:508:-506:-507:509:510)' + '\n' +
             ' ' * 5 + '(501:506:-516:-515:509:510)' + '\n' +
             ' ' * 5 + '(-504:514:523:-505:509:510) ' + '\n' +
             ' ' * 5 + '(-514:512:511:-513:509:510)' + '\n' +
             ' ' * 5 + '(501:509:-517:518:-519)' + '\n' +
             ' ' * 5 + '(-505:509:-520:521:522)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(160)) + ' -0.03576 -0.31843' + '\n' +
             ' ' * 12 + '0 90 90 90 -6.411 -96.41 90 83.58946 -6.41054)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obi_2 = ('c Outboard isocenter bank 2' + '$' * 47 + '\n' +
             ' 260 3 -18 -501 504 505 -508 -559 560' + '\n' +
             ' ' * 5 + '(501:502:-503:-504:559:-560)' + '\n' +
             ' ' * 5 + '(501:508:-506:-507:559:-560)' + '\n' +
             ' ' * 5 + '(501:506:-516:-515:559:-560)' + '\n' +
             ' ' * 5 + '(-504:514:523:-505:559:-560) ' + '\n' +
             ' ' * 5 + '(-514:512:511:-513:559:-560)' + '\n' +
             ' ' * 5 + '(501:559:-567:-568:-519)' + '\n' +
             ' ' * 5 + '(-505:559:-570:-571:522)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(260)) + ' -0.03576 -0.31843' + '\n' +
             ' ' * 12 + '0 90 90 90 -6.411 -96.41 90 83.58946 -6.41054)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obt_1 = ('c Outboard target bank 1' + '$' * 47 + '\n' +
             '  101 3 -18  -601 -604 605 608 -609 -610' + '\n' +
             ' ' * 5 + '(601:-602:-613:604:609:610)' + '\n' +
             ' ' * 5 + '(603:602:-612:-611:609:610)' + '\n' +
             ' ' * 5 + '(607:606:-608:-605:609:610)' + '\n' +
             ' ' * 5 + '(615:614:-606:-605:609:610) ' + '\n' +
             ' ' * 5 + '(623:604:-616:-605:609:610)' + '\n' +
             ' ' * 5 + '(601:609:-617:618:-619)' + '\n' +
             ' ' * 5 + '(-605:609:-620:621:622)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(101)) + ' 0.037959 -0.33111' + '\n' +
             ' ' * 12 + '0 90 90 90 6.5434 -83.4566 90 96.5434 6.5434)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obt_2 = ('c Outboard target bank 2' + '$' * 47 + '\n' +
             '  201 3 -18  -601 -604 605 608 -659 660' + '\n' +
             ' ' * 5 + '(601:-602:-613:604:659:-660)' + '\n' +
             ' ' * 5 + '(603:602:-612:-611:659:-660)' + '\n' +
             ' ' * 5 + '(607:606:-608:-605:659:-660)' + '\n' +
             ' ' * 5 + '(615:614:-606:-605:659:-660) ' + '\n' +
             ' ' * 5 + '(623:604:-616:-605:659:-660)' + '\n' +
             ' ' * 5 + '(601:659:-667:-668:-619)' + '\n' +
             ' ' * 5 + '(-605:609:-670:-671:622)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(201)) + ' 0.037959 -0.33111' + '\n' +
             ' ' * 12 + '0 90 90 90 6.5434 -83.4566 90 96.5434 6.5434)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    ob = obi_1 + obi_2 + obt_1 + obt_2
    return ob


def mlc_card():
    mlc = str(qi_bank_1() +
              trcl_mlc('qi1') +
              qi_bank_2() +
              trcl_mlc('qi2') +
              qt_bank_1() +
              trcl_mlc('qt1') +
              qt_bank_2() +
              trcl_mlc('qt2') +
              hi_bank_1() +
              trcl_mlc('hi1r') +
              trcl_mlc('hi1l') +
              hi_bank_2() +
              trcl_mlc('hi2r') +
              trcl_mlc('hi2l') +
              ht_bank_1() +
              trcl_mlc('ht1r') +
              trcl_mlc('ht1l') +
              ht_bank_2() +
              trcl_mlc('ht2r') +
              trcl_mlc('ht2l') +
              outboard()
              )
    return mlc

# -*- coding: utf-8 -*-
"""
MLC cells
"""
__author__ = '<NAME>'

from input_file_creator.write_cell_card.mlc_open import mlc_open_distance as mlcod
from input_file_creator.write_cell_card.trcl import trcl_mlc


def qi_bank_1():
    qi_cell_1 = ('c Quarter Leaf Isocenter Bank 1 ' + '$' * 46 + '\n' +
                 '  130 3 -18 -101 104 105 -106 -109 -110' + '\n' +
                 ' ' * 5 + '(101:102:-103:-104:109:110)' + '\n' +
                 ' ' * 5 + '(101:-108:-107:106:109:110)' + '\n' +
                 ' ' * 5 + '(101:-111:-112:108:109:110)' + '\n' +
                 ' ' * 5 + '(113:115:-114:-104:109:110)' + '\n' +
                 ' ' * 5 + '(-116:-104:-105:109:110)' + '\n' +
                 ' ' * 5 + '(101:109:-117:118:-119)' + '\n' +
                 ' ' * 5 + '(-105:109:-120:121:122)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(130)) + ' 0 0) imp:p,e 1' + '\n'
                 # 5 spaces is to tell MCNP this a continued line, not a new line.
                 # 19 spaces is in order make it at same position with following lines
                 )
    return qi_cell_1


def qi_bank_2():
    qi_cell_2 = ('c Quarter Leaf Isocenter Bank 2 ' + '$' * 46 + '\n' +
                 '  230 3 -18 -101 104 105 -106 -159 160' + '\n' +
                 ' ' * 5 + '(101:102:-103:-104:159:-160)' + '\n' +
                 ' ' * 5 + '(101:-108:-107:106:159:-160)' + '\n' +
                 ' ' * 5 + '(101:-111:-112:108:159:-160)' + '\n' +
                 ' ' * 5 + '(113:115:-114:-104:159:-160)' + '\n' +
                 ' ' * 5 + '(-116:-104:-105:159:110)' + '\n' +
                 ' ' * 5 + '(101:159:-167:-168:-119)' + '\n' +
                 ' ' * 5 + '(-105:159:-170:-171:122)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(230)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qi_cell_2


def qt_bank_1():
    qt_cell_1 = ('c Quarter Leaf Target Bank 1' + '$' * 47 + '\n' +
                 '  131 3 -18 -201 -202 205 208 -209 -210' + '\n' +
                 ' ' * 5 + '(-208:203:206:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-206:212:211:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-204:203:202:-205:209:210)' + '\n' +
                 ' ' * 5 + '(-215:213:202:-214:209:210)' + '\n' +
                 ' ' * 5 + '(201:202:-216:209:210)' + '\n' +
                 ' ' * 5 + '(201:209:-217:218:-219)' + '\n' +
                 ' ' * 5 + '(-205:209:-220:221:222)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(131)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qt_cell_1


def qt_bank_2():
    qt_cell_2 = ('c Quarter Leaf Target Bank 2' + '$' * 47 + '\n' +
                 '  231 3 -18 -201 -202 205 208 -259 260' + '\n' +
                 ' ' * 5 + '(-208:203:206:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-206:212:211:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-204:203:202:-205:259:-260)' + '\n' +
                 ' ' * 5 + '(-215:213:202:-214:259:-260)' + '\n' +
                 ' ' * 5 + '(201:202:-216:259:260)' + '\n' +
                 ' ' * 5 + '(201:259:-267:-268:-219)' + '\n' +
                 ' ' * 5 + '(-205:259:-270:-271:222)' + '\n' +
                 ' ' * 19 + 'trcl*=(' + str(mlcod(231)) + ' 0 0) imp:p,e 1' + '\n'
                 )
    return qt_cell_2


def hi_bank_1():
    hi_cell_1 = ('c Half Leaf Isocenter Bank 1' + '$' * 47 + '\n' +
                 '  114 3 -18 -301 304 305 -306 -309 -310' + '\n' +
                 ' ' * 5 + '(301:302:-303:-304:309:310)' + '\n' +
                 ' ' * 5 + '(301:-308:-307:306:309:310)' + '\n' +
                 ' ' * 5 + '(301:-311:-312:308:309:310)' + '\n' +
                 ' ' * 5 + '(313:315:-314:-304:309:310)' + '\n' +
                 ' ' * 5 + '(301:309:-317:318:-319)' + '\n' +
                 ' ' * 5 + '(-305:309:-320:321:322)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(114)) +
                 ' 0.00160 -0.04032 0 90 90 90 2.28 -87.72 90 92.28 -2.28)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return hi_cell_1


def hi_bank_2():
    hi_cell_2 = ('c Half Leaf Isocenter Bank 2' + '$' * 47 + '\n' +
                 '  214 3 -18 -301 304 305 -306 -359 360' + '\n' +
                 ' ' * 5 + '(301:302:-303:-304:359:-360)' + '\n' +
                 ' ' * 5 + '(301:-308:-307:306:359:-360)' + '\n' +
                 ' ' * 5 + '(301:-311:-312:308:359:-360)' + '\n' +
                 ' ' * 5 + '(313:315:-314:-304:359:-360)' + '\n' +
                 ' ' * 5 + '(301:359:-367:-368:-319)' + '\n' +
                 ' ' * 5 + '(-305:359:-370:-371:322)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(214)) +
                 ' 0.00160 -0.04032 0 90 90 90 2.28 -87.72 90 92.28 -2.28)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return hi_cell_2


def ht_bank_1():
    ht_cell_1 = ('c Half Leave Target Bank 1' + '$' * 47 + '\n' +
                 '  113 3 -18 -401 -402 405 408 -409 -410' + '\n' +
                 ' ' * 5 + '(-408:403:406:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-406:412:411:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-404:403:402:-405:409:410)' + '\n' +
                 ' ' * 5 + '(-415:413:402:-414:409:410)' + '\n' +
                 ' ' * 5 + '(401:409:-417:418:-419)' + '\n' +
                 ' ' * 5 + '(-405:409:-420:421:422)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(113)) +
                 ' 0.003141 -0.06304 0 90 90 90 2.854 -87.146 90 92.854 2.854)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return ht_cell_1


def ht_bank_2():
    ht_cell_2 = ('c Half Leave Target Bank 2' + '$' * 47 + '\n' +
                 '  213 3 -18 -401 -402 405 408 -459 460' + '\n' +
                 ' ' * 5 + '(-408:403:406:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-406:412:411:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-404:403:402:-405:459:-460)' + '\n' +
                 ' ' * 5 + '(-415:413:402:-414:459: -460)' + '\n' +
                 ' ' * 5 + '(401:409:-467:-468:-419)' + '\n' +
                 ' ' * 5 + '(-405:409:-470:-471:422)' + '\n' +
                 ' ' * 5 + 'trcl*=(' + str(mlcod(213)) +
                 ' 0.003141 -0.06304 0 90 90 90 2.854 -87.146 90 92.854 2.854)' + '\n' +
                 ' ' * 5 + 'imp:p,e 1' + '\n'
                 )
    return ht_cell_2


def outboard():
    obi_1 = ('c Outboard isocenter bank 1' + '$' * 47 + '\n' +
             '  160 3 -18  -501 504 505 -508 -509 -510' + '\n' +
             ' ' * 5 + '(501:502:-503:-504:509:510)' + '\n' +
             ' ' * 5 + '(501:508:-506:-507:509:510)' + '\n' +
             ' ' * 5 + '(501:506:-516:-515:509:510)' + '\n' +
             ' ' * 5 + '(-504:514:523:-505:509:510) ' + '\n' +
             ' ' * 5 + '(-514:512:511:-513:509:510)' + '\n' +
             ' ' * 5 + '(501:509:-517:518:-519)' + '\n' +
             ' ' * 5 + '(-505:509:-520:521:522)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(160)) + ' -0.03576 -0.31843' + '\n' +
             ' ' * 12 + '0 90 90 90 -6.411 -96.41 90 83.58946 -6.41054)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obi_2 = ('c Outboard isocenter bank 2' + '$' * 47 + '\n' +
             ' 260 3 -18 -501 504 505 -508 -559 560' + '\n' +
             ' ' * 5 + '(501:502:-503:-504:559:-560)' + '\n' +
             ' ' * 5 + '(501:508:-506:-507:559:-560)' + '\n' +
             ' ' * 5 + '(501:506:-516:-515:559:-560)' + '\n' +
             ' ' * 5 + '(-504:514:523:-505:559:-560) ' + '\n' +
             ' ' * 5 + '(-514:512:511:-513:559:-560)' + '\n' +
             ' ' * 5 + '(501:559:-567:-568:-519)' + '\n' +
             ' ' * 5 + '(-505:559:-570:-571:522)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(260)) + ' -0.03576 -0.31843' + '\n' +
             ' ' * 12 + '0 90 90 90 -6.411 -96.41 90 83.58946 -6.41054)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obt_1 = ('c Outboard target bank 1' + '$' * 47 + '\n' +
             '  101 3 -18  -601 -604 605 608 -609 -610' + '\n' +
             ' ' * 5 + '(601:-602:-613:604:609:610)' + '\n' +
             ' ' * 5 + '(603:602:-612:-611:609:610)' + '\n' +
             ' ' * 5 + '(607:606:-608:-605:609:610)' + '\n' +
             ' ' * 5 + '(615:614:-606:-605:609:610) ' + '\n' +
             ' ' * 5 + '(623:604:-616:-605:609:610)' + '\n' +
             ' ' * 5 + '(601:609:-617:618:-619)' + '\n' +
             ' ' * 5 + '(-605:609:-620:621:622)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(101)) + ' 0.037959 -0.33111' + '\n' +
             ' ' * 12 + '0 90 90 90 6.5434 -83.4566 90 96.5434 6.5434)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    obt_2 = ('c Outboard target bank 2' + '$' * 47 + '\n' +
             '  201 3 -18  -601 -604 605 608 -659 660' + '\n' +
             ' ' * 5 + '(601:-602:-613:604:659:-660)' + '\n' +
             ' ' * 5 + '(603:602:-612:-611:659:-660)' + '\n' +
             ' ' * 5 + '(607:606:-608:-605:659:-660)' + '\n' +
             ' ' * 5 + '(615:614:-606:-605:659:-660) ' + '\n' +
             ' ' * 5 + '(623:604:-616:-605:659:-660)' + '\n' +
             ' ' * 5 + '(601:659:-667:-668:-619)' + '\n' +
             ' ' * 5 + '(-605:609:-670:-671:622)' + '\n' +
             ' ' * 5 + 'trcl*=(' + str(mlcod(201)) + ' 0.037959 -0.33111' + '\n' +
             ' ' * 12 + '0 90 90 90 6.5434 -83.4566 90 96.5434 6.5434)' + '\n' +
             ' ' * 5 + 'imp:p,e 1' + '\n'
             )
    ob = obi_1 + obi_2 + obt_1 + obt_2
    return ob


def mlc_card():
    mlc = str(qi_bank_1() +
              trcl_mlc('qi1') +
              qi_bank_2() +
              trcl_mlc('qi2') +
              qt_bank_1() +
              trcl_mlc('qt1') +
              qt_bank_2() +
              trcl_mlc('qt2') +
              hi_bank_1() +
              trcl_mlc('hi1r') +
              trcl_mlc('hi1l') +
              hi_bank_2() +
              trcl_mlc('hi2r') +
              trcl_mlc('hi2l') +
              ht_bank_1() +
              trcl_mlc('ht1r') +
              trcl_mlc('ht1l') +
              ht_bank_2() +
              trcl_mlc('ht2r') +
              trcl_mlc('ht2l') +
              outboard()
              )
    return mlc

# -*- coding: utf-8 -*- MLC cells # 5 spaces is to tell MCNP this a continued line, not a new line. # 19 spaces is in order make it at same position with following lines