def calculate_molecular_weight(seq):
    """molecular weight"""
    massDict = {'D': 115.0886, 'E': 129.1155, 'C': 103.1388, 'Y': 163.176,
        'H': 137.1411, 'K': 128.1741, 'R': 156.1875, 'M': 131.1926, 'F': 
        147.1766, 'L': 113.1594, 'V': 99.1326, 'A': 71.0788, 'G': 57.0519,
        'Q': 128.1307, 'N': 114.1038, 'I': 113.1594, 'W': 186.2132, 'S': 
        87.0782, 'P': 97.1167, 'T': 101.1051, 'U': 141.05, 'h2o': 18.01524,
        'X': 0, 'Z': 128.6231, 'O': 255.31, 'B': 114.5962, 'J': 113.1594}
    molecular_weight = massDict['h2o']
    for aa in seq:
        molecular_weight += massDict[aa]
    return molecular_weight
