![]() ![]() ![]() append ( molecule ) return no_h_molecules def get_and_copy_unique_confs ( xyz_filenames, only_heavy_atoms, threshold_rmsd ): """For each xyz file generate a species and copy it to a folder if it is unique based on an RMSD threshold""" molecules = if only_heavy_atoms : molecules = get_molecules_no_hydrogens ( molecules ) unique_mol_ids = for i in range ( len ( molecules )): mol = molecules is_unique = True for j in unique_mol_ids : rmsd = calc_rmsd ( mol. parse_args () def get_molecules_no_hydrogens ( molecules ): """Remove all hydrogen atoms from a list of molecules""" no_h_molecules = for molecule in molecules : molecule. add_argument ( "-oh", action = "store_true", default = False, help = "Only compare heavy atoms", ) return parser. ![]() add_argument ( "-t", action = "store", default = 1.0, type = float, help = "RMSD threshold (Å)", ) parser. add_argument ( "filenames", action = "store", nargs = "+", help = ".xyz files to compare" ) parser. #!/usr/bin/env python3 from autode.species import Species from autode.geom import calc_rmsd from autode.input_output import xyz_file_to_atoms from shutil import copyfile import os import argparse folder_name = "unique_conformers" def get_args (): parser = argparse. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |