def test_Exporter_Gromacs_export_disresDat(self):
        exporter = Exporter.export_Gromos_Distance_Restraints(self.disres1)
        exporter.get_args(lambda x: (self.out_gromos_disres_path1))
        out = exporter.export_restraints()

        with open(self.in_solution_disres_path1, "r") as solution:
            expected_filelines = solution.readlines()
            expected_str = "".join(expected_filelines)

        exporter = Exporter.export_Gromos_Distance_Restraints(self.disres2)
        exporter.get_args(lambda x: (self.out_gromos_disres_path2))
        out = exporter.export_restraints()

        with open(self.in_solution_disres_path2, "r") as solution:
            expected_filelines = solution.readlines()
            expected_str = "".join(expected_filelines)
    def test_Exporter_Gromos_export_disresDat(self):
        exporter = Exporter.GromosPairRestraintExporter(distance_restraints)
        exporter.get_args(lambda x: (out_gromos_disres_path))
        out = exporter.export_restraints()

        expected_filelines = open(in_solution_disres_path, "r").readlines()
        expected_str = "".join(expected_filelines)

        self.assertEqual(str(out),
                         expected_str,
                         msg="file text is not expected.")
 def test_Exporter_Gromacs_getargs(self):
     exporter = Exporter.export_Gromacs_Distance_Restraints(self.disres1)
     exporter.get_args(lambda x: self.out_gromos_disres_path1)
 def test_Exporter_Gromacs_construct(self):
     gromos_Exporter = Exporter.export_Gromacs_Distance_Restraints(self.disres1)
示例#5
0
    cmd.load(out_pdb)

    ## GET ATOMS
    atom_list = up.pymol_selection_to_atom_list("all")

        ## Filtering for rings
    try:
        RingFilter = Filter.RingFilter(atom_list)
        #pdb_blocks = u.convert_atoms_to_pdb_molecules(atom_list)
        pdb_blocks = [cmd.get_pdbstr(pdb_id) for pdb_id in cmd.get_object_list()]
        RingFilter.get_args(lambda x: (pdb_blocks))
        filtered_atoms = RingFilter.filter()
    except Exception as err:
        print("failed ", err.args)

        ## Optimizers
    try:
        opt = Optimizer.GreedyGraphOptimizer(filtered_atoms)
        opt.get_args(lambda x: (nrestraints, distance_treshold, 'shortest', None))
        res = opt.make_restraints()
        ## Export
        exporter = Exporter.export_Gromos_Distance_Restraints(restraints=res)
        exporter.get_args(lambda x: out_dir_path + "/" + set_name + ".disres")
        exporter.export_restraints()
    except:
        print("manual mode:")
        import restraintmaker
        restraintmaker.run_plugin_gui()

    break
exit()
 def test_Exporter_Gromos_getargs(self):
     exporter = Exporter.GromosPairRestraintExporter(distance_restraints)
     exporter.get_args(lambda x: (out_gromos_disres_path))
    def test_Exporter_Gromos_construct(self):

        gromos_Exporter = Exporter.GromosPairRestraintExporter(
            distance_restraints)