Esempio n. 1
0
                                              len_bond,
                                              'efjc',
                                              ibp,
                                              sep=sep)
                    iatm += 1
                    config.add_bond(bnd_t_bs, ibp, iatm - 1)
                    ibnd += 1
                    ia_br_beg = iatm - 1
                else:
                    config.append_atom_bonded(atm_t_sc,
                                              0.0,
                                              len_bond,
                                              'efjc',
                                              iatm - 1,
                                              sep=sep)
                    iatm += 1
                    config.add_bond(bnd_t_ss, iatm - 2, iatm - 1)
                    ibnd += 1
            #Set branch
            config.set_branch(ibp, ia_br_beg, na_sc)

    #Add molecule
    config.add_molecule(1, iatm - 1, iatm_beg, ibnd - 1, ibnd_beg, 0, 0, 0, 0)

config.update_simbox()
config.to_center(1)
config.add_flow_field(0, np.array([]))

write_ldf(config, 'tfr.txt', title='test_brush')
write_cfg(config, 'bb-sus-%d-%d.cfg' % (na_bbone, na_sc), title='brush')
Esempio n. 2
0
    config.append_atom_unbonded( atm_t_bb, 0.0 )
    iatm += 1
    config.append_atom_bonded(1, 0.0, len_bond, 'efjc', iatm-1, sep=sep)
    iatm += 1
    for i in range(3,natm+1):
        config.append_atom_bonded(atm_t_bb, 0.0, len_bond, 'efjc',
                iatm-1, im2=iatm-2, theta=theta, sep=sep)
        iatm += 1
    
    for i in range(1, nbnd+1):
        j = iatm_beg + i - 1
        config.add_bond(bnd_t_bb, j, j+1)
        ibnd += 1
    
    for i in range(1, nang+1):
        j = iatm_beg + i - 1
        config.add_angle(ang_t_bb, j, j+1, j+2)
        iang += 1
    
    config.add_molecule(1, natm, iatm_beg, nbnd, ibnd_beg, nang, iang_beg, 0, 0)

#config.add_tether(teth_t, 1, np.zeros((3,)) )

config.update_simbox()
config.to_center(1)

config.add_flow_field( 1, np.array([0.1]) )

write_ldf(config, 'tfr.txt', title='test_frame')
write_cfg(config, 'lin-%d.cfg'%natm, title='test_cfg')