def refine(sample_filename, rec_filename): """ Refine the molecule against the map """ # Load the sample sample = parakeet.sample.load(sample_filename) # Get the molecule name assert sample.number_of_molecules == 1 name, _ = list(sample.iter_molecules())[0] # Get the PDB filename pdb_filename = parakeet.data.get_pdb(name) # Fit the molecule to the map maptools.fit( rec_filename, pdb_filename, output_pdb_filename="refined.pdb", resolution=3, ncycle=10, mode="rigid_body", log_filename="fit.log", )
def test_fit(ideal_map_filename, pdb_filename): _, output_filename = tempfile.mkstemp() _, log_filename = tempfile.mkstemp() maptools.fit( input_map_filename=ideal_map_filename, input_pdb_filename=pdb_filename, output_pdb_filename=output_filename, mode="rigid_body", resolution=8, ncycle=2, log_filename=log_filename, ) assert os.path.exists(output_filename)
def fit(args): """ Compute the map fit Args: args (object): The parsed arguments """ maptools.fit( input_map_filename=args.input, input_pdb_filename=args.input2, output_pdb_filename=args.output, resolution=args.resolution, ncycle=args.ncycle, mode=args.mode, log_filename=args.logfile, )