Esempio n. 1
0
 def _connect_and_reconnect(chf, bond_vector):
     first = mb.clone(chf)
     second = mb.clone(chf)
     first.add(mb.Port(anchor=first[0], orientation=bond_vector,
         separation=0.075), label='up')
     second.add(mb.Port(anchor=second[0], orientation=-bond_vector,
         separation=0.075), label='down')
     c2h2f2 = mb.Compound(subcompounds=(first, second))
     mb.force_overlap(first, first['up'], second['down'])
     fccf_dihedral_init = calc_dihedral(first[2].pos, first[0].pos,
         second[0].pos, second[2].pos)
     c2h2f2.remove_bond((first[0], second[0]))
     mb.force_overlap(first, first['port[0]'], second['port[0]'])
     fccf_dihedral_final = calc_dihedral(first[2].pos, first[0].pos,
         second[0].pos, second[2].pos)
     return fccf_dihedral_init, fccf_dihedral_final
Esempio n. 2
0
 def _connect_and_reconnect(chf, bond_vector):
     first = mb.clone(chf)
     second = mb.clone(chf)
     first.add(mb.Port(anchor=first[0], orientation=bond_vector,
         separation=0.075), label='up')
     second.add(mb.Port(anchor=second[0], orientation=-bond_vector,
         separation=0.075), label='down')
     c2h2f2 = mb.Compound(subcompounds=(first, second))
     mb.force_overlap(first, first['up'], second['down'])
     fccf_dihedral_init = calc_dihedral(first[2].pos, first[0].pos,
         second[0].pos, second[2].pos)
     c2h2f2.remove_bond((first[0], second[0]))
     mb.force_overlap(first, first['port[0]'], second['port[0]'])
     fccf_dihedral_final = calc_dihedral(first[2].pos, first[0].pos,
         second[0].pos, second[2].pos)
     return fccf_dihedral_init, fccf_dihedral_final