buffalodaa.blogg.se

Import xyz to res2dinv
Import xyz to res2dinv






import xyz to res2dinv

The software offers a simple workflow from data import to inversion and visualization, while still offering full control over inversion parameters for advanced users. Res2DInv is a powerful 2D inversion software for ERT (DC) and IP data. filenames ) get_and_copy_unique_confs ( xyz_filenames = args. join ( folder_name, xyz_filename )) return None if _name_ = "_main_" : args = get_args () assert all ( fn. mkdir ( folder_name ) for i in unique_mol_ids : xyz_filename = xyz_filenames copyfile ( xyz_filename, os. append ( i ) print ( "Number of unique molecules = ", len ( unique_mol_ids )) # Copy all the unique. coordinates ) if rmsd < threshold_rmsd : is_unique = False break if is_unique : unique_mol_ids. 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.

import xyz to res2dinv import xyz to res2dinv

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.








Import xyz to res2dinv