Exemplo n.º 1
0
    def generate_connections(self):
        try:
            self.atom_labels, self.bonds
        except AttributeError:
            raise Exception("Simulation has not been assigned atom types and bonds yet")

        connect = Connector()
        self.bond_types = connect.find_bond_types(self.atom_labels, self.bonds)
        self.bond_labels = connect.bond_labels(
            self.atom_labels, self.bonds, self.bond_types
        )

        self.bond_graph = self.generate_bond_graph(self.bonds)

        self.angles = connect.angles(self.bonds, self.bond_graph)
        self.angle_types = connect.find_angle_types(self.atom_labels, self.angles)
        self.angle_labels = connect.angle_labels(
            self.atom_labels, self.angles, self.angle_types
        )

        self.dihedrals = connect.dihedrals(self.bonds, self.bond_graph)
        self.dihedral_types = connect.find_dihedral_types(
            self.atom_labels, self.dihedrals
        )
        self.dihedral_labels = connect.dihedral_labels(
            self.atom_labels, self.dihedrals, self.dihedral_types
        )

        self.impropers = connect.impropers(self.bonds, self.bond_graph)
        self.improper_types = connect.find_improper_types(
            self.atom_labels, self.impropers
        )
        self.improper_labels = connect.improper_labels(
            self.atom_labels, self.impropers, self.improper_types
        )
Exemplo n.º 2
0
    def generate_connections(self):
        connect = Connector()
        bond_types, angle_types, torsion_types, improper_types = self.molecule.connection_types()
        self.bonds = self.molecule.assign_bonds(self.lattice_dimensions)
        self.bond_labels = connect.bond_labels(self.atom_labels, self.bonds, bond_types)

        self.angles = connect.angles(self.bonds)
        self.angle_labels = connect.angle_labels(self.atom_labels, self.angles, angle_types)

        self.torsions = connect.torsions(self.bonds)
        self.torsion_labels = connect.torsion_labels(self.atom_labels, self.torsions, torsion_types)

        self.impropers = connect.impropers(self.bonds)
        self.improper_labels = connect.improper_labels(self.atom_labels, self.impropers, improper_types)
Exemplo n.º 3
0
                         [14, 37], [38, 12], [38, 13], [13, 39], [38, 40],
                         [37, 41], [41, 42], [41, 43], [41, 44], [42, 45],
                         [42, 46], [42, 47], [45, 46], [45, 48], [45, 49]]))

from connector import Connector
from write_coords import Writer
from params import Parameterise

connect = Connector()
epoxy.bond_types = connect.find_bond_types(epoxy.atom_labels, epoxy.bonds)
epoxy.bond_labels = connect.bond_labels(epoxy.atom_labels, epoxy.bonds,
                                        epoxy.bond_types)

epoxy.angles = connect.angles(epoxy.bonds)
epoxy.angle_types = connect.find_angle_types(epoxy.atom_labels, epoxy.angles)
epoxy.angle_labels = connect.angle_labels(epoxy.atom_labels, epoxy.angles,
                                          epoxy.angle_types)
epoxy.torsions = connect.torsions(epoxy.bonds)
epoxy.torsion_types = connect.find_torsion_types(epoxy.atom_labels,
                                                 epoxy.torsions)
epoxy.torsion_labels = connect.torsion_labels(epoxy.atom_labels,
                                              epoxy.torsions,
                                              epoxy.torsion_types)
epoxy.impropers = connect.impropers(epoxy.bonds)
epoxy.improper_types = connect.find_improper_types(epoxy.atom_labels,
                                                   epoxy.impropers)
epoxy.improper_labels = connect.improper_labels(epoxy.atom_labels,
                                                epoxy.impropers,
                                                epoxy.improper_types)

epoxy.masses = [0] * len(epoxy.coords)
#output.write_xyz('epoxy.xyz')
Exemplo n.º 4
0
from connector import Connector
from write_coords import Writer
from params import Parameterise

connect = Connector()
diamine.bond_types = connect.find_bond_types(diamine.atom_labels,
                                             diamine.bonds)
diamine.bond_labels = connect.bond_labels(diamine.atom_labels, diamine.bonds,
                                          diamine.bond_types)

diamine.angles = connect.angles(diamine.bonds)
diamine.angle_types = connect.find_angle_types(diamine.atom_labels,
                                               diamine.angles)
diamine.angle_labels = connect.angle_labels(diamine.atom_labels,
                                            diamine.angles,
                                            diamine.angle_types)
diamine.torsions = connect.torsions(diamine.bonds)
diamine.torsion_types = connect.find_torsion_types(diamine.atom_labels,
                                                   diamine.torsions)
diamine.torsion_labels = connect.torsion_labels(diamine.atom_labels,
                                                diamine.torsions,
                                                diamine.torsion_types)
diamine.impropers = connect.impropers(diamine.bonds)
diamine.improper_types = connect.find_improper_types(diamine.atom_labels,
                                                     diamine.impropers)
diamine.improper_labels = connect.improper_labels(diamine.atom_labels,
                                                  diamine.impropers,
                                                  diamine.improper_types)

diamine.masses = [0] * len(diamine.coords)
Exemplo n.º 5
0
from connector import Connector
from write_coords import Writer
from params import Parameterise

connect = Connector()
propanol.bond_types = connect.find_bond_types(propanol.atom_labels,
                                              propanol.bonds)
propanol.bond_labels = connect.bond_labels(propanol.atom_labels,
                                           propanol.bonds, propanol.bond_types)

propanol.angles = connect.angles(propanol.bonds)
propanol.angle_types = connect.find_angle_types(propanol.atom_labels,
                                                propanol.angles)
propanol.angle_labels = connect.angle_labels(propanol.atom_labels,
                                             propanol.angles,
                                             propanol.angle_types)
propanol.torsions = connect.torsions(propanol.bonds)
propanol.torsion_types = connect.find_torsion_types(propanol.atom_labels,
                                                    propanol.torsions)
propanol.torsion_labels = connect.torsion_labels(propanol.atom_labels,
                                                 propanol.torsions,
                                                 propanol.torsion_types)
propanol.impropers = connect.impropers(propanol.bonds)
propanol.improper_types = connect.find_improper_types(propanol.atom_labels,
                                                      propanol.impropers)
propanol.improper_labels = connect.improper_labels(propanol.atom_labels,
                                                   propanol.impropers,
                                                   propanol.improper_types)

propanol.masses = [0] * len(propanol.coords)
Exemplo n.º 6
0



from connector import Connector
from write_coords import Writer
from params import Parameterise

connect = Connector()
bp.bond_types = connect.find_bond_types(bp.atom_labels,bp.bonds)
bp.bond_labels = connect.bond_labels(bp.atom_labels,bp.bonds,bp.bond_types)

bp.angles = connect.angles(bp.bonds)
bp.angle_types = connect.find_angle_types(bp.atom_labels,
                                           bp.angles)
bp.angle_labels = connect.angle_labels(bp.atom_labels,bp.angles,
                                        bp.angle_types)
bp.torsions = connect.torsions(bp.bonds)
bp.torsion_types = connect.find_torsion_types(bp.atom_labels,
                                           bp.torsions)
bp.torsion_labels = connect.torsion_labels(bp.atom_labels,bp.torsions,
                                        bp.torsion_types)
bp.impropers = connect.impropers(bp.bonds)
bp.improper_types = connect.find_improper_types(bp.atom_labels,
                                           bp.impropers)
bp.improper_labels = connect.improper_labels(bp.atom_labels,bp.impropers,
                                        bp.improper_types)

bp.masses = [0] * len(bp.coords)
#output.write_xyz('bp.xyz')

p = Parameterise(bp.vdw_defs)