Esempio n. 1
0
 def test_dihedral_constituent_types(self):
     atom1 = Atom(name="atom1",
                  position=[0, 0, 0],
                  atom_type=AtomType(name="A"))
     atom2 = Atom(name="atom2",
                  position=[1, 0, 0],
                  atom_type=AtomType(name="B"))
     atom3 = Atom(name="atom3",
                  position=[1, 1, 0],
                  atom_type=AtomType(name="C"))
     atom4 = Atom(name="atom4",
                  position=[1, 1, 4],
                  atom_type=AtomType(name="D"))
     dihtype = DihedralType(member_types=[
         atom1.atom_type.name,
         atom2.atom_type.name,
         atom3.atom_type.name,
         atom4.atom_type.name,
     ])
     dih = Dihedral(connection_members=[atom1, atom2, atom3, atom4], )
     dih.dihedral_type = dihtype
     assert "A" in dih.connection_type.member_types
     assert "B" in dih.connection_type.member_types
     assert "C" in dih.connection_type.member_types
     assert "D" in dih.connection_type.member_types
Esempio n. 2
0
 def test_dihedral_constituent_types(self):
     atom1 = Atom(name='atom1',
                  position=[0, 0, 0],
                  atom_type=AtomType(name='A'))
     atom2 = Atom(name='atom2',
                  position=[1, 0, 0],
                  atom_type=AtomType(name='B'))
     atom3 = Atom(name='atom3',
                  position=[1, 1, 0],
                  atom_type=AtomType(name='C'))
     atom4 = Atom(name='atom4',
                  position=[1, 1, 4],
                  atom_type=AtomType(name='D'))
     dihtype = DihedralType(member_types=[
         atom1.atom_type.name, atom2.atom_type.name, atom3.atom_type.name,
         atom4.atom_type.name
     ])
     dih = Dihedral(connection_members=[atom1, atom2, atom3, atom4], )
     dih.dihedral_type = dihtype
     assert 'A' in dih.connection_type.member_types
     assert 'B' in dih.connection_type.member_types
     assert 'C' in dih.connection_type.member_types
     assert 'D' in dih.connection_type.member_types