示例#1
0
            'ignored_bond_types': [1, 2, 6, 9, 10, 15],  # no h-bonds
            'ignored_angle_types': [4, 5, 6, 8, 11, 12, 13, 14, 15, 17, 18,
                23, 24, 27, 29]  # no h-bonds
        }
        try:
            kwargs['multip'] = multip
        except NameError:
            kwargs['multip'] = 1.0
        clay_idcs = set()
        for idx in range(9):
            clay_idcs.update(set(range(1 + idx*5380, 721 + idx*5380)))

        orientation_agg = {}
        for idx, fname in enumerate(fnames):
            print(idx + 1, '/', len(fnames))
            current_orientation = single_z_profile(DatafileContent(fname),
                clay_idcs=clay_idcs)
            for k, v in current_orientation.items():
                try:
                    orientation_agg[k][0] += v[0]
                    orientation_agg[k][1] += v[1]
                except KeyError:
                    orientation_agg[k] = [v[0], v[1]]

        xs = sorted(orientation_agg.keys())
        ys = [orientation_agg[x][0] / orientation_agg[x][1] for x in xs]
        xs = [x / multip for x in xs]

        exspressiveness_abs_sum = 0
        exspressiveness_sq_sum = 0
        for y in ys:
示例#2
0
        raise NotImplementedError()
    elif system_name == 'pa6x20':
        from utils.monomers_cms import monomers_cms
        from plotters.plot_data import plot_data
        data_dir = ('/media/anton/Seagate Expansion Drive/'
                    'md_new_data/pa6x20/3507904_500K_pz100/datafiles')
        fnames = [
            '{0}/pa6x20.{1}.data'.format(data_dir, idx * 50000)
            for idx in range(1, 51)
        ]
        clay_idcs = set()
    else:
        print('Unknown system name:', sys.argv[1])
        sys.exit()

    dfc_start = DatafileContent(fnames[0])
    dfc_end = DatafileContent(fnames[-1])
    lx = dfc_start.xhi - dfc_start.xlo
    ly = dfc_start.yhi - dfc_start.ylo
    lz = dfc_start.zhi - dfc_start.zlo
    start_positions = {
        a['atom_id']: {
            'x': a['x'] + a['nx'] * lx,
            'y': a['y'] + a['ny'] * ly,
            'z': a['z'] + a['nz'] * lz
        }
        for a in dfc_start.atoms
    }
    end_positions = {
        a['atom_id']: {
            'x': a['x'] + a['nx'] * lx,
示例#3
0
        8: 1.007970,  # ho
        9: 14.006700,  # n4
        10: 12.011150,  # c2
        11: 12.011150,  # c3
        12: 1.007970,  # h
        13: 1.007970,  # hn
        14: 12.011150,  # c'
        15: 15.999400,  # o'
        16: 14.006700,  # n2
        17: 14.006700,  # n
    }

    density_agg = {}
    for idx, fname in enumerate(fnames):
        print(idx + 1, '/', len(fnames))
        new_profile = single_z_profile_partial(DatafileContent(fname),
                                               **kwargs)
        for k, v in new_profile.items():
            try:
                density_agg[k]['clay'] += v['clay']
                density_agg[k]['modifier'] += v['modifier']
                density_agg[k]['polymer'] += v['polymer']
            except KeyError:
                try:
                    density_agg[k]['clay'] = v['clay']
                    density_agg[k]['modifier'] = v['modifier']
                    density_agg[k]['polymer'] = v['polymer']
                except KeyError:
                    density_agg[k] = {
                        'clay': v['clay'],
                        'modifier': v['modifier'],
示例#4
0
                 '10chains/2.2 - More relaxation 500 (wiggle)/'
                 '1785842 - relaxation')
     fnames = [
         '{0}/co.{1}.data'.format(data_dir, idx * 50000)
         for idx in range(1, 51)
     ]
     clay_idcs = set()
     for idx in range(9):
         clay_idcs.update(set(range(1 + idx * 5380, 721 + idx * 5380)))
     kwargs = {'clay_idcs': clay_idcs, 'multip': multip}
     plot_kwargs = {
         'out_fname': 'atoms_mob_L.eps',
     }
     profile_agg = {}
     f = open('logs/atomic_mobility_L', 'w')
     dfc_last = DatafileContent(fnames[0])
     dfc_next = DatafileContent(fnames[-1])
     profile = atomic_mobility_profile(dfc_last, dfc_next, **kwargs)
     xs = sorted(profile.keys())
     ys = [profile[x][0] / profile[x][1] for x in xs]
     plot_data(xs, ys=ys, **plot_kwargs)
 elif system_name == 'S':  # Too small data
     raise NotImplementedError()
 elif system_name == 'mix':
     raise NotImplementedError()
 elif system_name == 'seg':
     raise NotImplementedError()
 elif system_name == 'pa6x20':
     from utils.monomers_cms import monomers_cms
     from plotters.plot_data import plot_data
     data_dir = ('/media/anton/Seagate Expansion Drive/'
示例#5
0
            6: 14.0067,
            7: 14.0067,
            8: 12.0112
        }
        kwargs = {
            'masses': masses,
        }
        try:
            kwargs['multip'] = multip
        except NameError:
            kwargs['multip'] = 1.0
        plot_kwargs = {
            'out_fname': 'dp_comp_pa6x20w.pdf',
            'x_limits': [0, 45],
            'y_limits': [0, 1.5]
        }
    else:
        print('Unknown system name:', sys.argv[1])
        sys.exit()

    density_agg = Counter()
    for idx, fname in enumerate(fnames):
        print(idx + 1, '/', len(fnames))
        density_agg += single_z_profile(DatafileContent(fname), **kwargs)

    xs = sorted(density_agg.keys())
    ys = [density_agg[x]/len(fnames) for x in xs]
    xs = [x / multip for x in xs]
    
    plot_data(xs, ys=ys, **plot_kwargs)
示例#6
0
            11: 12.011150,  # c3
            12: 1.007970,  # h
            13: 1.007970,  # hn
            14: 12.011150,  # c'
            15: 15.999400,  # o'
            16: 14.006700,  # n2
            17: 14.006700,  # n
        }
        plot_kwargs = {
            'out_fname': 'mon_mob_L.eps',
        }
        plot_log_kwargs = {
            'out_fname': 'mon_mob_L_log.eps',
        }

        starting = monomers_cms(DatafileContent(fnames[0]), masses,
                                monomer_idx)
        f = open('logs/monomers_mobility_L', 'w')
        xs = []
        ys = []
        for idx, fname in enumerate(fnames):
            dfc = DatafileContent(fname)
            lx = dfc.xhi - dfc.xlo
            ly = dfc.yhi - dfc.ylo
            lz = dfc.zhi - dfc.zlo
            time = idx * 50  # ps
            current = monomers_cms(dfc, masses, monomer_idx)
            delta = 0
            for k in current.keys():
                dx = abs(current[k]['x_cm'] - starting[k]['x_cm'])
                dy = abs(current[k]['y_cm'] - starting[k]['y_cm'])