libcootapi
 
Loading...
Searching...
No Matches
coot::molecule_t Class Reference

Classes

class  difference_map_peaks_info_t
 difference maps peaks class More...
 
class  histogram_info_t
 map histogram class More...
 
class  interesting_place_t
 
class  rotamer_change_info_t
 a container class for information about changing rotamers More...
 

Public Member Functions

 molecule_t (const std::string &name_in, int mol_no_in)
 constructor
 
 molecule_t (const std::string &name_in, int mol_no_in, short int is_em_map)
 constructor, when we know we are giving it an em map
 
 molecule_t (const std::string &name_in, int mol_no_in, const clipper::Xmap< float > &xmap_in, bool is_em_map_flag)
 constructor
 
 molecule_t (atom_selection_container_t asc, int imol_no_in, const std::string &name_in)
 constructor
 
float get_median_temperature_factor () const
 
float get_temperature_factor_of_atom (const std::string &atom_cid) const
 
int close_yourself ()
 
bool is_closed () const
 
void set_really_do_backups (bool state)
 
void add_neighbor_residues_for_refinement_help (mmdb::Manager *mol)
 
void fill_fobs_sigfobs ()
 
clipper::HKL_data< clipper::data32::F_sigF > * get_original_fobs_sigfobs () const
 
clipper::HKL_data< clipper::data32::Flag > * get_original_rfree_flags () const
 
int sfcalc_genmap (const clipper::HKL_data< clipper::data32::F_sigF > &fobs, const clipper::HKL_data< clipper::data32::Flag > &free, clipper::Xmap< float > *xmap_p)
 
util::sfcalc_genmap_stats_t sfcalc_genmaps_using_bulk_solvent (const clipper::HKL_data< clipper::data32::F_sigF > &fobs, const clipper::HKL_data< clipper::data32::Flag > &free, clipper::Xmap< float > *xmap_2fofc_p, clipper::Xmap< float > *xmap_fofc_p)
 
std::pair< std::string, std::string > make_import_datanames (const std::string &fcol, const std::string &phi_col, const std::string &weight_col, int use_weights) const
 
std::string Refmac_fobs_col () const
 
std::string Refmac_sigfobs_col () const
 
std::string Refmac_mtz_filename () const
 
void associate_data_mtz_file_with_map (const std::string &data_mtz_file_name, const std::string &f_col, const std::string &sigf_col, const std::string &r_free_col)
 
util::map_molecule_centre_info_t get_map_molecule_centre () const
 
void replace_molecule_by_model_from_file (const std::string &pdb_file_name)
 
std::string get_name () const
 
void set_molecule_name (const std::string &n)
 
int get_molecule_index () const
 
bool is_valid_model_molecule () const
 
bool is_valid_map_molecule () const
 
unsigned int get_number_of_atoms () const
 
int get_number_of_hydrogen_atoms () const
 
float get_molecule_diameter () const
 
double get_radius_of_gyration () const
 
std::vector< std::string > get_types_in_molecule () const
 get types
 
mmdb::Residue * cid_to_residue (const std::string &cid) const
 
std::vector< mmdb::Residue * > cid_to_residues (const std::string &cid) const
 
mmdb::Atom * cid_to_atom (const std::string &cid) const
 
std::pair< bool, residue_spec_tcid_to_residue_spec (const std::string &cid) const
 
std::pair< bool, atom_spec_tcid_to_atom_spec (const std::string &cid) const
 
std::vector< std::string > get_residue_names_with_no_dictionary (const protein_geometry &geom) const
 
int insert_waters_into_molecule (const minimol::molecule &water_mol, const std::string &res_name)
 
std::string get_molecule_selection_as_json (const std::string &cid) const
 
std::vector< residue_range_tget_missing_residue_ranges () const
 
void make_bonds (protein_geometry *geom, rotamer_probability_tables *rot_prob_tables_p, bool draw_hydrogen_atoms_flag, bool draw_missing_loops_flag)
 
std::vector< glm::vec4 > make_colour_table (bool against_a_dark_background) const
 useful for debugging, perhaps
 
std::vector< glm::vec4 > make_colour_table_for_goodsell_style (float colour_wheel_rotation_step, float saturation, float goodselliness) const
 
void print_colour_table (const std::string &debugging_label) const
 
void print_secondary_structure_info () const
 
mmdb::Atom * get_atom (const atom_spec_t &atom_spec) const
 
mmdb::Residue * get_residue (const residue_spec_t &residue_spec) const
 
mmdb::Residue * get_residue (const std::string &residue_cid) const
 
std::string get_residue_name (const residue_spec_t &residue_spec) const
 
bool have_unsaved_changes () const
 
int undo ()
 
int redo ()
 
int write_coordinates (const std::string &file_name) const
 
std::string molecule_to_PDB_string () const
 
std::string molecule_to_mmCIF_string () const
 
std::vector< atom_spec_tget_fixed_atoms () const
 
std::vector< std::string > chains_in_model () const
 
std::vector< std::pair< residue_spec_t, std::string > > get_single_letter_codes_for_chain (const std::string &chain_id) const
 
residue_spec_t get_residue_closest_to (mmdb::Manager *mol, const clipper::Coord_orth &co) const
 
std::vector< std::string > get_chain_ids () const
 
std::vector< std::vector< std::string > > get_ncs_related_chains () const
 Get the chains that are related by NCS:
 
bool copy_ncs_chain (const std::string &from_chain_id, const std::string &to_chain_id)
 copy chain using NCS matrix
 
std::vector< double > get_residue_CA_position (const std::string &cid) const
 
std::vector< double > get_residue_average_position (const std::string &cid) const
 
std::vector< double > get_residue_sidechain_average_position (const std::string &cid) const
 
void set_occupancy (const std::string &cid, float occ_new)
 
simple_mesh_t get_bonds_mesh (const std::string &mode, protein_geometry *geom, bool against_a_dark_background, float bonds_width, float atom_radius_to_bond_width_ratio, int smoothness_factor, bool draw_hydrogen_atoms_flag, bool draw_missing_residue_loops)
 
simple_mesh_t get_goodsell_style_mesh (protein_geometry *geom_p, float colour_wheel_rotation_step, float saturation, float goodselliness)
 
instanced_mesh_t get_bonds_mesh_instanced (const std::string &mode, protein_geometry *geom, bool against_a_dark_background, float bonds_width, float atom_radius_to_bond_width_ratio, bool render_atoms_as_aniso, float aniso_probability, bool render_aniso_atoms_as_ortep, int smoothness_factor, bool draw_hydrogen_atoms_flag, bool draw_missing_residue_loops)
 
instanced_mesh_t get_bonds_mesh_for_selection_instanced (const std::string &mode, const std::string &selection_cid, protein_geometry *geom, bool against_a_dark_background, float bonds_width, float atom_radius_to_bond_width_ratio, bool render_atoms_as_aniso, bool render_aniso_atoms_as_ortep, int smoothness_factor, bool draw_hydrogen_atoms_flag, bool draw_missing_residue_loops)
 
instanced_mesh_t get_goodsell_style_mesh_instanced (protein_geometry *geom_p, float colour_wheel_rotation_step, float saturation, float goodselliness)
 
void set_user_defined_bond_colours (const std::map< unsigned int, std::array< float, 4 > > &colour_map)
 
void set_user_defined_atom_colour_by_selections (const std::vector< std::pair< std::string, unsigned int > > &indexed_residues_cids, bool colour_applies_to_non_carbon_atoms_also, mmdb::Manager *mol)
 user-defined atom selection to colour index.
 
void store_user_defined_atom_colour_selections (const std::vector< std::pair< std::string, unsigned int > > &indexed_residues_cids, bool colour_applies_to_non_carbon_atoms_also)
 
void apply_user_defined_atom_colour_selections (const std::vector< std::pair< std::string, unsigned int > > &indexed_residues_cids, bool colour_applies_to_non_carbon_atoms_also, mmdb::Manager *mol)
 
void set_colour_wheel_rotation_base (float r)
 set the colour wheel rotation base for the specified molecule
 
void set_base_colour_for_bonds (float r, float g, float b)
 set the base colour - to be used as a base for colour wheel rotation
 
void add_to_non_drawn_bonds (const std::string &atom_selection_cid)
 
void clear_non_drawn_bonds ()
 
void print_non_drawn_bonds () const
 
void fill_default_colour_rules ()
 
void add_colour_rule (const std::string &selection, const std::string &colour_name)
 Add a colour rule: eg. ("//A", "red")
 
void delete_colour_rules ()
 delete all the colour rules
 
void print_colour_rules () const
 
std::vector< std::pair< std::string, std::string > > get_colour_rules () const
 
void M2T_updateFloatParameter (const std::string &param_name, float value)
 Update float parameter for MoleculesToTriangles molecular mesh.
 
void M2T_updateFloatParameter (const std::string &param_name, int value)
 Update int parameter for MoleculesToTriangles molecular mesh.
 
void print_M2T_FloatParameters () const
 
void print_M2T_IntParameters () const
 
void M2T_updateIntParameter (const std::string &param_name, int value)
 Update int parameter for MoleculesToTriangles molecular mesh.
 
simple_mesh_t get_molecular_representation_mesh (const std::string &cid, const std::string &colour_scheme, const std::string &style, int secondaryStructureUsageFlag) const
 
simple_mesh_t get_gaussian_surface (float sigma, float contour_level, float box_radius, float grid_scale, float fft_b_factor) const
 
simple_mesh_t get_chemical_features_mesh (const std::string &cid, const protein_geometry &geom) const
 
bool hydrogen_atom_should_be_drawn () const
 
void set_use_bespoke_carbon_atom_colour (bool state)
 
void set_bespoke_carbon_atom_colour (const colour_t &col)
 
void export_map_molecule_as_gltf (clipper::Coord_orth &position, float radius, float contour_level, const std::string &file_name)
 export map molecule as glTF
 
void export_model_molecule_as_gltf (const std::string &mode, const std::string &selection_cid, protein_geometry *geom, bool against_a_dark_background, float bonds_width, float atom_radius_to_bond_width_ratio, int smoothness_factor, bool draw_hydrogen_atoms_flag, bool draw_missing_residue_loops, const std::string &file_name)
 export model molecule as glTF - this is the bonds and atoms API
 
void export_molecular_representation_as_gltf (const std::string &atom_selection_cid, const std::string &colour_scheme, const std::string &style, int secondary_structure_usage_flag, const std::string &file_name)
 
void export_chemical_features_as_gltf (const std::string &cid, const protein_geometry &geom, const std::string &file_name) const
 
void set_show_symmetry (bool f)
 
bool get_show_symmetry ()
 
void transform_by (mmdb::mat44 SSMAlign_TMatrix)
 
void transform_by (const clipper::RTop_orth &rtop, mmdb::Residue *res)
 
void transform_by (const clipper::RTop_orth &rtop)
 
symmetry_info_t get_symmetry (float symmetry_search_radius, const Cartesian &symm_centre) const
 
std::vector< std::string > non_standard_residue_types_in_model () const
 
std::vector< phi_psi_prob_t > ramachandran_validation (const ramachandrans_container_t &rc) const
 
simple_mesh_t get_rotamer_dodecs (protein_geometry *geom_p, rotamer_probability_tables *rpt)
 
instanced_mesh_t get_rotamer_dodecs_instanced (protein_geometry *geom_p, rotamer_probability_tables *rpt)
 
omega_distortion_info_container_t peptide_omega_analysis (const protein_geometry &geom, const std::string &chain_id, bool mark_cis_peptides_as_bad_flag) const
 
std::vector< residue_spec_tget_non_standard_residues_in_molecule () const
 
std::vector< std::string > get_residue_types_without_dictionaries (const protein_geometry &geom) const
 
instanced_mesh_t contact_dots_for_ligand (const std::string &cid, const protein_geometry &geom, unsigned int num_subdivisions) const
 
instanced_mesh_t all_molecule_contact_dots (const coot::protein_geometry &geom, unsigned int num_subdivisions) const
 
generic_3d_lines_bonds_box_t make_exportable_environment_bond_box (coot::residue_spec_t &spec, float max_dist, coot::protein_geometry &geom) const
 
simple::molecule_t get_simple_molecule (int imol, const std::string &residue_cid, const bool draw_hydrogen_atoms_flag, coot::protein_geometry *geom_p)
 
simple::molecule_t get_simple_molecule (int imol, mmdb::Residue *residue_p, bool draw_hydrogen_atoms_flag, coot::protein_geometry *geom_p)
 
coot::simple_mesh_t get_mesh_for_ligand_validation_vs_dictionary (const std::string &ligand_cid, coot::protein_geometry &geom, ctpl::thread_pool &static_thread_pool)
 
std::vector< coot::geometry_distortion_info_container_t > geometric_distortions_for_one_residue_from_mol (const std::string &ligand_cid, bool with_nbcs, coot::protein_geometry &geom, ctpl::thread_pool &static_thread_pool)
 
std::vector< coot::geometry_distortion_info_container_t > geometric_distortions_for_selection_from_mol (const std::string &selection_cid, bool with_nbcs, coot::protein_geometry &geom, ctpl::thread_pool &static_thread_pool)
 
std::pair< int, double > simple_geometric_distortions_from_mol (const std::string &ligand_cid, bool with_nbcs, coot::protein_geometry &geom, ctpl::thread_pool &static_thread_pool)
 
coot::instanced_mesh_t get_extra_restraints_mesh (int mode) const
 
std::vector< coot::residue_spec_tresidues_near_residue (const std::string &residue_cid, float dist) const
 
std::vector< coot::atom_distance_tget_distances_between_atoms_of_residues (const std::string &cid_res_1, const std::string &cid_res_2, float dist_max) const
 
std::vector< plain_atom_overlap_t > get_atom_overlaps (protein_geometry *geom_p)
 not const because it can dynamically add dictionaries
 
float get_atom_overlap_score (protein_geometry *geom_p) const
 get the atom overlap
 
std::vector< plain_atom_overlap_t > get_overlaps_for_ligand (const std::string &cid_ligand, protein_geometry *geom_p)
 not const because it can dynamically add dictionaries
 
coot::atom_overlaps_dots_container_t get_overlap_dots (protein_geometry *geom_p)
 not const because it can dynamically add dictionaries
 
coot::atom_overlaps_dots_container_t get_overlap_dots_for_ligand (const std::string &cid_ligand, protein_geometry *geom_p)
 not const because it can dynamically add dictionaries
 
instanced_mesh_t get_HOLE (const clipper::Coord_orth &start_pos, const clipper::Coord_orth &end_pos, const protein_geometry &geom) const
 
std::string get_pucker_analysis_info () const
 
std::string get_svg_for_2d_ligand_environment_view (const std::string &residue_cid, protein_geometry *geom, bool add_key) const
 
RDKit::ROMol * rdkit_mol (const std::string &ligand_cid)
 
int move_molecule_to_new_centre (const coot::Cartesian &new_centre)
 
coot::Cartesian get_molecule_centre () const
 
int flip_peptide (const atom_spec_t &rs, const std::string &alt_conf)
 
int auto_fit_rotamer (const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &alt_conf, const clipper::Xmap< float > &xmap, const coot::protein_geometry &pg)
 
std::pair< bool, float > backrub_rotamer (mmdb::Residue *residue_p, const clipper::Xmap< float > &xmap, const coot::protein_geometry &pg)
 
std::pair< bool, float > backrub_rotamer (const std::string &chain_id, int res_no, const std::string &ins_code, const std::string &alt_conf, const clipper::Xmap< float > &xmap, const coot::protein_geometry &pg)
 
int delete_atoms (const std::vector< atom_spec_t > &atoms)
 
int delete_atom (atom_spec_t &atom_spec)
 
int delete_residue (residue_spec_t &residue_spec)
 
int delete_residue_atoms_with_alt_conf (coot::residue_spec_t &residue_spec, const std::string &alt_conf)
 
int delete_chain_using_atom_cid (const std::string &cid)
 
int delete_literal_using_cid (const std::string &cid)
 
int change_alt_locs (const std::string &cid, const std::string &change_mode)
 
std::pair< int, std::string > add_terminal_residue_directly (const residue_spec_t &spec, const std::string &new_res_type, const protein_geometry &geom, const clipper::Xmap< float > &xmap, mmdb::Manager *standard_residues_asc_mol, ctpl::thread_pool &static_thread_pool)
 
void execute_simple_nucleotide_addition (const std::string &term_type, mmdb::Residue *res_p, const std::string &chain_id, mmdb::Manager *standard_residues_asc_mol)
 
void execute_simple_nucleotide_addition (mmdb::Residue *residue_p, mmdb::Manager *standard_residues_asc_mol)
 
void execute_simple_nucleotide_addition (const std::string &cid, mmdb::Manager *standard_residues_asc_mol)
 
int add_compound (const dictionary_residue_restraints_t &monomer_restraints, const Cartesian &position, const clipper::Xmap< float > &xmap, float map_rmsd)
 
int add_alternative_conformation (const std::string &cid)
 add an alternative conformation for the specified residue
 
int fill_partial_residue (const residue_spec_t &res_spec, const std::string &alt_conf, const clipper::Xmap< float > &xmap, const protein_geometry &geom)
 add atoms to a partially-filled side chaain
 
int fill_partial_residues (const clipper::Xmap< float > &xmap, protein_geometry *geom)
 add atoms to a partially-filled side chaain
 
int mutate (const residue_spec_t &spec, const std::string &new_res_type)
 
void add_named_glyco_tree (const std::string &glycosylation_name, const std::string &chain_id, int res_no, const clipper::Xmap< float > &xmap, protein_geometry *geom)
 
int side_chain_180 (const residue_spec_t &residue_spec, const std::string &alt_conf, coot::protein_geometry *geom_p)
 
int delete_side_chain (const residue_spec_t &residue_spec)
 
std::string jed_flip (coot::residue_spec_t &spec, const std::string &atom_name, const std::string &alt_conf, bool invert_selection, protein_geometry *geom)
 
std::string jed_flip_internal (coot::atom_tree_t &tree, const std::vector< coot::dict_torsion_restraint_t > &interesting_torsions, const std::string &atom_name, bool invert_selection)
 
std::string jed_flip_internal (coot::atom_tree_t &tree, const dict_torsion_restraint_t &torsion, const std::string &atom_name, bool invert_selection)
 
int match_torsions (mmdb::Residue *res_ref, const std::vector< coot::dict_torsion_restraint_t > &tr_ligand, const coot::protein_geometry &geom)
 
coot::minimol::molecule eigen_flip_residue (const residue_spec_t &residue_spec)
 
int apply_transformation_to_atom_selection (const std::string &atom_selection_cid, int n_atoms_in_selection, clipper::Coord_orth &rotation_centre, clipper::RTop_orth &rtop)
 
void multiply_residue_temperature_factors (const std::string &cid, float factor)
 
int add_hydrogen_atoms (protein_geometry *geom)
 
int delete_hydrogen_atoms ()
 
bool delete_all_carbohydrate ()
 
bool residue_is_nucleic_acid (const std::string &cid) const
 
std::pair< int, std::string > change_chain_id (const std::string &from_chain_id, const std::string &to_chain_id, bool use_resno_range, int start_resno, int end_resno)
 
std::pair< int, std::string > change_chain_id_with_residue_range (const std::string &from_chain_id, const std::string &to_chain_id, int start_resno, int end_resno)
 
void change_chain_id_with_residue_range_helper_insert_or_add (mmdb::Chain *to_chain_p, mmdb::Residue *new_residue)
 
int new_positions_for_residue_atoms (const std::string &residue_cid, const std::vector< api::moved_atom_t > &moved_atoms)
 set new positions for the atoms in the specified residue
 
int new_positions_for_atoms_in_residues (const std::vector< api::moved_residue_t > &moved_residues)
 set new positions for the atoms of the specified residues
 
int new_positions_for_residue_atoms (mmdb::Residue *residue_p, const std::vector< api::moved_atom_t > &moved_atoms, bool do_backup)
 
int merge_molecules (const std::vector< mmdb::Manager * > &mols)
 
float fit_to_map_by_random_jiggle (const residue_spec_t &res_spec, const clipper::Xmap< float > &xmap, float map_rmsd, int n_trials, float translation_scale_factor)
 
float fit_to_map_by_random_jiggle_using_atom_selection (const std::string &cid, const clipper::Xmap< float > &xmap, float map_rmsd, int n_trials, float translation_scale_factor)
 
int cis_trans_conversion (const std::string &atom_cid, mmdb::Manager *standard_residues_mol)
 
int replace_residue (const std::string &residue_cid, const std::string &new_residue_type, int imol_enc, const protein_geometry &geom)
 
int mutate_by_overlap (mmdb::Residue *residue_p, const dictionary_residue_restraints_t &restraints)
 
int replace_fragment (atom_selection_container_t asc)
 
int replace_fragment (mmdb::Manager *mol_ref, int old_atom_index_handle, int SelHnd)
 
rotamer_change_info_t change_to_next_rotamer (const coot::residue_spec_t &res_spec, const std::string &alt_conf, const coot::protein_geometry &pg)
 change rotamers
 
rotamer_change_info_t change_to_previous_rotamer (const coot::residue_spec_t &res_spec, const std::string &alt_conf, const coot::protein_geometry &pg)
 
rotamer_change_info_t change_to_first_rotamer (const coot::residue_spec_t &res_spec, const std::string &alt_conf, const coot::protein_geometry &pg)
 
rotamer_change_info_t change_rotamer_number (const coot::residue_spec_t &res_spec, const std::string &alt_conf, int rotamer_change_direction, const coot::protein_geometry &pg)
 
int set_residue_to_rotamer_number (coot::residue_spec_t res_spec, const std::string &alt_conf_in, int rotamer_number, const coot::protein_geometry &pg)
 
void associate_sequence_with_molecule (const std::string &chain_id, const std::string &sequence)
 
void assign_sequence (const clipper::Xmap< float > &xmap, const coot::protein_geometry &geom)
 try to fit all of the sequences to all of the chains
 
std::vector< std::pair< std::string, std::string > > get_sequence_info () const
 simple return the associated sequences
 
chain_mutation_info_container_t get_mutation_info () const
 return the mismatches/mutations:
 
bool is_het_residue (mmdb::Residue *residue_p) const
 
std::pair< short int, int > next_residue_number_in_chain (mmdb::Chain *w, bool new_res_no_by_hundreds=false) const
 
mmdb::Residue * copy_and_add_residue_to_chain (mmdb::Chain *this_model_chain, mmdb::Residue *add_model_residue, bool new_resno_by_hundreds_flag=true)
 
void copy_and_add_chain_residues_to_chain (mmdb::Chain *new_chain, mmdb::Chain *this_molecule_chain)
 
std::vector< std::string > map_chains_to_new_chains (const std::vector< std::string > &adding_model_chains, const std::vector< std::string > &this_model_chains) const
 
std::string suggest_new_chain_id (const std::string &current_chain_id) const
 
std::pair< bool, std::vector< std::string > > try_add_by_consolidation (mmdb::Manager *adding_mol)
 
bool merge_molecules_just_one_residue_homogeneous (atom_selection_container_t molecule_to_add)
 
bool merge_molecules_just_one_residue_at_given_spec (atom_selection_container_t molecule_to_add, residue_spec_t target_spec)
 
std::pair< bool, coot::residue_spec_tmerge_ligand_to_near_chain (mmdb::Manager *mol)
 
std::pair< int, std::vector< merge_molecule_results_info_t > > merge_molecules (const std::vector< atom_selection_container_t > &add_molecules)
 
std::pair< int, double > get_torsion (const std::string &cid, const std::vector< std::string > &atom_names) const
 
void set_temperature_factors_using_cid (const std::string &cid, float temp_fact)
 
int read_extra_restraints (const std::string &file_name)
 read extra restraints (e.g. from ProSMART)
 
std::vector< mmdb::Residue * > select_residues (const residue_spec_t &spec, const std::string &mode) const
 refinement tool
 
std::vector< mmdb::Residue * > select_residues (const std::string &chain_id, int resno_start, int resno_end) const
 resno_start and resno_end are inclusive
 
std::vector< mmdb::Residue * > select_residues (const std::string &multi_cid, const std::string &mode) const
 select residues given a multi-cid
 
int refine_direct (std::vector< mmdb::Residue * > rv, const std::string &alt_loc, const clipper::Xmap< float > &xmap, unsigned int max_number_of_threads, float map_weight, int n_cycles, const coot::protein_geometry &geom, bool do_rama_plot_restraints, float rama_plot_weight, bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet)
 real space refinement
 
int minimize (const std::string &atom_selection_cid, int n_cycles, bool do_rama_plot_restraints, float rama_plot_weight, bool do_torsion_restraints, float torsion_weight, bool refinement_is_quiet, coot::protein_geometry *geom_p)
 
bool shiftfield_b_factor_refinement (const clipper::HKL_data< clipper::data32::F_sigF > &F_sigF, const clipper::HKL_data< clipper::data32::Flag > &free_flag)
 
void fix_atom_selection_during_refinement (const std::string &atom_selection_cid)
 
void init_all_molecule_refinement (int imol_ref_mol, coot::protein_geometry &geom, const clipper::Xmap< float > &xmap, float map_weight, ctpl::thread_pool *thread_pool)
 
void add_target_position_restraint (const std::string &atom_cid, float pos_x, float pos_y, float pos_z)
 
void turn_off_when_close_target_position_restraint ()
 
instanced_mesh_t add_target_position_restraint_and_refine (const std::string &atom_cid, float pos_x, float pos_y, float pos_z, int n_cyles, coot::protein_geometry *geom_p)
 
void clear_target_position_restraint (const std::string &atom_cid)
 clear
 
int refine_using_last_restraints (int n_steps)
 
restraints_container_t * get_last_restraints ()
 
void clear_target_position_restraints ()
 clear any and all drag-atom target position restraints
 
void clear_refinement ()
 
void generate_self_restraints (float local_dist_max, const coot::protein_geometry &geom)
 
void generate_chain_self_restraints (float local_dist_max, const std::string &chain_id, const coot::protein_geometry &geom)
 
void generate_local_self_restraints (float local_dist_max, const std::vector< coot::residue_spec_t > &residue_specs, const coot::protein_geometry &geom)
 
void generate_local_self_restraints (float local_dist_max, const std::string &multi_selection_cid, const coot::protein_geometry &geom)
 
void generate_local_self_restraints (int selHnd, float local_dist_max, const coot::protein_geometry &geom)
 
void add_parallel_plane_restraint (coot::residue_spec_t spec_1, coot::residue_spec_t spec_2)
 
std::vector< std::string > nucelotide_residue_name_to_base_atom_names (const std::string &rn) const
 
std::vector< std::string > residue_name_to_plane_atom_names (const std::string &rn) const
 
void clear_extra_restraints ()
 
int rigid_body_fit (const std::string &mult_cids, const clipper::Xmap< float > &xmap)
 
int rotate_around_bond (const std::string &residue_cid, const std::string &alt_conf, coot::atom_name_quad quad, double torsion_angle, protein_geometry &geom)
 
void scale_map (float scale_factor)
 
bool is_EM_map () const
 
float get_density_at_position (const clipper::Coord_orth &pos) const
 
float get_map_mean () const
 
float get_map_rmsd_approx () const
 
int write_map (const std::string &file_name) const
 
void set_map_is_difference_map (bool flag)
 
bool is_difference_map_p () const
 
void set_updating_maps_diff_diff_map_peaks (const std::vector< std::pair< clipper::Coord_orth, float > > &v)
 
std::vector< std::pair< clipper::Coord_orth, float > > get_updating_maps_diff_diff_map_peaks (const clipper::Coord_orth &screen_centre) const
 does the peaks-move operation.
 
float get_suggested_initial_contour_level () const
 
simple_mesh_t get_map_contours_mesh (clipper::Coord_orth position, float radius, float contour_level, bool use_thread_pool, ctpl::thread_pool *thread_pool_p)
 
simple_mesh_t get_map_contours_mesh_using_other_map_for_colours (const clipper::Coord_orth &position, float radius, float contour_level, const clipper::Xmap< float > &xmap)
 
simple_mesh_t get_map_contours_mesh_using_other_map_for_colours (const clipper::Coord_orth &position, float radius, float contour_level, const user_defined_colour_table_t &udct, const clipper::Xmap< float > &xmap)
 
histogram_info_t get_map_histogram (unsigned int n_bins, float zoom_factor) const
 
histogram_info_t get_map_vertices_histogram (const clipper::Xmap< float > &other_xmap, const clipper::Coord_orth &pt, float radius, float contour_level, bool use_thread_pool, ctpl::thread_pool *thread_pool_p, unsigned int n_bins)
 
void set_map_colour (colour_holder holder)
 
void set_map_colour_saturation (float s)
 
void set_other_map_for_colouring_min_max (float min_v, float max_v)
 
void set_other_map_for_colouring_invert_colour_ramp (bool state)
 
double sum_density_for_atoms_in_residue (const std::string &cid, const std::vector< std::string > &atom_names, const clipper::Xmap< float > &xmap) const
 
std::vector< interesting_place_tdifference_map_peaks (mmdb::Manager *mol, float n_rmsd) const
 
texture_as_floats_t get_map_section_texture (int section_index, int axis, float data_value_for_bottom, float data_value_for_top) const
 
int get_number_of_map_sections (int axis_id) const
 
std::vector< float > get_vertices_for_blender () const
 
std::vector< int > get_triangles_for_blender () const
 
std::vector< float > get_colour_table_for_blender () const
 
void make_mesh_for_bonds_for_blender (const std::string &mode, protein_geometry *geom, bool against_a_dark_background, float bond_width, float atom_radius_to_bond_width_ratio, int smoothness_factor)
 
void make_mesh_for_molecular_representation_for_blender (const std::string &cid, const std::string &colour_scheme, const std::string &style, int secondary_structure_usage_flag)
 
void make_mesh_for_goodsell_style_for_blender (protein_geometry *geom_p, float colour_wheel_rotation_step, float saturation, float goodselliness)
 
void make_mesh_for_map_contours_for_blender (Cartesian position, float contour_level, float radius)
 
void make_mesh_for_gaussian_surface_for_blender (float sigma, float contour_level, float box_radius, float grid_scale, float b_factor)
 

Public Attributes

atom_selection_container_t atom_sel
 
float default_temperature_factor_for_new_atoms
 
std::vector< std::pair< bool, mmdb::Residue * > > neighbouring_residues
 
std::string refmac_fobs_col
 
std::string refmac_sigfobs_col
 
std::string refmac_mtz_filename
 
std::string refmac_r_free_col
 
bool refmac_r_free_flag_sensible
 
clipper::Xmap< float > xmap
 
std::map< unsigned int, colour_holder > user_defined_bond_colours
 
std::vector< std::pair< std::string, unsigned int > > indexed_user_defined_colour_selection_cids
 
bool indexed_user_defined_colour_selection_cids_apply_to_non_carbon_atoms_also
 
colour_holder base_colour_for_bonds
 
std::set< int > no_bonds_to_these_atom_indices
 
std::vector< std::pair< std::string, std::string > > colour_rules
 
std::vector< std::pair< std::string, float > > M2T_float_params
 
std::vector< std::pair< std::string, int > > M2T_int_params
 
float gltf_pbr_roughness
 
float gltf_pbr_metalicity
 
coot::extra_restraints_t extra_restraints
 
std::vector< std::pair< mmdb::Atom *, clipper::Coord_orth > > atoms_with_position_restraints
 
clipper::Xmap< float > updating_maps_previous_difference_map
 
std::vector< std::pair< clipper::Coord_orth, float > > updating_maps_diff_diff_map_peaks
 
blender_mesh_t blender_mesh
 

Static Public Attributes

static std::atomic< bool > draw_vector_sets_lock
 

Member Function Documentation

◆ add_hydrogen_atoms()

int coot::molecule_t::add_hydrogen_atoms ( protein_geometry * geom)
Returns
1 on a successful additions, 0 on failure.

◆ all_molecule_contact_dots()

instanced_mesh_t coot::molecule_t::all_molecule_contact_dots ( const coot::protein_geometry & geom,
unsigned int num_subdivisions ) const
Returns
the instanced mesh for the specified molecule

◆ clear_refinement()

void coot::molecule_t::clear_refinement ( )

call this after molecule refinement has finished (say when the molecule molecule is accepted into the original molecule)

◆ contact_dots_for_ligand()

instanced_mesh_t coot::molecule_t::contact_dots_for_ligand ( const std::string & cid,
const protein_geometry & geom,
unsigned int num_subdivisions ) const
Returns
the instanced mesh for the specified ligand

◆ delete_all_carbohydrate()

bool coot::molecule_t::delete_all_carbohydrate ( )

delete all carbohydrate

Returns
true on successful deletion, return false on no deletion.

◆ delete_hydrogen_atoms()

int coot::molecule_t::delete_hydrogen_atoms ( )
Returns
1 on a successful additions, 0 on failure.

◆ fit_to_map_by_random_jiggle_using_atom_selection()

float coot::molecule_t::fit_to_map_by_random_jiggle_using_atom_selection ( const std::string & cid,
const clipper::Xmap< float > & xmap,
float map_rmsd,
int n_trials,
float translation_scale_factor )

My ligands don't jiggle-jiggle...

Hey, what do you know, they actually do.

◆ geometric_distortions_for_one_residue_from_mol()

std::vector< coot::geometry_distortion_info_container_t > coot::molecule_t::geometric_distortions_for_one_residue_from_mol ( const std::string & ligand_cid,
bool with_nbcs,
coot::protein_geometry & geom,
ctpl::thread_pool & static_thread_pool )

this function is another version of the above function, but returns distortion values

this function returns a vector of the wrong type (it has pointers to expired molecules).

◆ geometric_distortions_for_selection_from_mol()

std::vector< coot::geometry_distortion_info_container_t > coot::molecule_t::geometric_distortions_for_selection_from_mol ( const std::string & selection_cid,
bool with_nbcs,
coot::protein_geometry & geom,
ctpl::thread_pool & static_thread_pool )

this function is another version of the above function, but returns distortion values

this function returns a vector of the wrong type (it has pointers to expired molecules).

◆ get_colour_rules()

std::vector< std::pair< std::string, std::string > > coot::molecule_t::get_colour_rules ( ) const

get the colour rules. Preferentially return the user-defined colour rules.

Returns
If there are no user-defined colour rules, then return the stand-in rules

◆ get_distances_between_atoms_of_residues()

std::vector< coot::atom_distance_t > coot::molecule_t::get_distances_between_atoms_of_residues ( const std::string & cid_res_1,
const std::string & cid_res_2,
float dist_max ) const

get atom distances other stuff here

◆ get_map_histogram()

histogram_info_t coot::molecule_t::get_map_histogram ( unsigned int n_bins,
float zoom_factor ) const
Returns
the map histogram The caller should select the number of bins - 200 is a reasonable default. The caller should also set the zoom factor (which reduces the range by the given factor) centred around the median (typically 1.0 but usefully can vary until ~20.0).

◆ get_mesh_for_ligand_validation_vs_dictionary()

coot::simple_mesh_t coot::molecule_t::get_mesh_for_ligand_validation_vs_dictionary ( const std::string & ligand_cid,
coot::protein_geometry & geom,
ctpl::thread_pool & static_thread_pool )

get the mesh for ligand validation vs dictionary, coloured by badness. greater then 3 standard deviations is fully red. Less than 0.5 standard deviations is fully green.

◆ get_missing_residue_ranges()

std::vector< residue_range_t > coot::molecule_t::get_missing_residue_ranges ( ) const

get missing residue ranges

Parameters
imolis the model molecule index
Returns
missing residue ranges

◆ get_number_of_map_sections()

int coot::molecule_t::get_number_of_map_sections ( int axis_id) const
Returns
the number of section in the map along the give axis. (0 for X-axis, 1 for y-axis, 2 for Z-axis). return -1 on failure.

◆ get_pucker_analysis_info()

std::string coot::molecule_t::get_pucker_analysis_info ( ) const

get pucker info

Parameters
imol2is the model molecule index
Returns
a json string or an empty string on failure

◆ get_radius_of_gyration()

double coot::molecule_t::get_radius_of_gyration ( ) const

Get Radius of Gyration

Parameters
imolis the model molecule index
Returns
the molecule centre. If the number is less than zero, there was a problem finding the molecule or atoms.

◆ get_residue_average_position()

std::vector< double > coot::molecule_t::get_residue_average_position ( const std::string & cid) const

get the avarge residue position

Returns
a vector. The length of the vector is 0 on failure, otherwise it is the x,y,z values

◆ get_residue_CA_position()

std::vector< double > coot::molecule_t::get_residue_CA_position ( const std::string & cid) const

get the residue CA position

Returns
a vector. The length of the vector is 0 on failure, otherwise it is the x,y,z values

◆ get_residue_sidechain_average_position()

std::vector< double > coot::molecule_t::get_residue_sidechain_average_position ( const std::string & cid) const

get the avarge residue side-chain position

Returns
a vector. The length of the vector is 0 on failure, otherwise it is the x,y,z values

◆ get_simple_molecule()

simple::molecule_t coot::molecule_t::get_simple_molecule ( int imol,
const std::string & residue_cid,
const bool draw_hydrogen_atoms_flag,
coot::protein_geometry * geom_p )

we pass the imol because we use that to look up the residue type in the dictionary annoyingly, we pass a non-const pointer to the protein-geometry because that is what is passed in the Bond_lines_container. Think about changin that one day.

◆ get_suggested_initial_contour_level()

float coot::molecule_t::get_suggested_initial_contour_level ( ) const
Returns
the suggested initial contour level. Return -1 on not-a-map

◆ get_svg_for_2d_ligand_environment_view()

std::string coot::molecule_t::get_svg_for_2d_ligand_environment_view ( const std::string & residue_cid,
protein_geometry * geom,
bool add_key ) const

Get SVG for 2d ligand environment view (FLEV)

The caller should make sure that the dictionary for the ligand has been loaded - this function won't do that. It will add hydrogen atoms if needed. The can modify the protein_geometry

Parameters
residue_cidis the cid for the residue

◆ make_mesh_for_molecular_representation_for_blender()

void coot::molecule_t::make_mesh_for_molecular_representation_for_blender ( const std::string & cid,
const std::string & colour_scheme,
const std::string & style,
int secondary_structure_usage_flag )

Make an (internal) mesh

this function doesn't return a value, instead it stores a blender_mesh_t blender_mesh in this model

@modifies internal state to fill the internal blender_mesh object

◆ merge_molecules()

int coot::molecule_t::merge_molecules ( const std::vector< mmdb::Manager * > & mols)

merge molecules - copy the atom of mols into this molecule

Returns
the number of atoms added.

◆ molecule_to_mmCIF_string()

std::string coot::molecule_t::molecule_to_mmCIF_string ( ) const
Returns
a model molecule imol as a string. Return emtpy string on error

◆ molecule_to_PDB_string()

std::string coot::molecule_t::molecule_to_PDB_string ( ) const
Returns
a model molecule imol as a string. Return emtpy string on error

◆ multiply_residue_temperature_factors()

void coot::molecule_t::multiply_residue_temperature_factors ( const std::string & cid,
float factor )

Interactive B-factor refinement (fun). "factor" might typically be say 0.9 or 1.1

◆ new_positions_for_residue_atoms()

int coot::molecule_t::new_positions_for_residue_atoms ( mmdb::Residue * residue_p,
const std::vector< api::moved_atom_t > & moved_atoms,
bool do_backup )

not for wrapping (should be private). We don't want this function to backup if the backup happens in the calling function (i.e. new_positions_for_atoms_in_residues).

◆ rdkit_mol()

RDKit::ROMol * coot::molecule_t::rdkit_mol ( const std::string & ligand_cid)

if the ligand cid specifies more than one residue, only the first is returned.

Returns
nullptr on error or failure to specify a ligand.

◆ refine_using_last_restraints()

int coot::molecule_t::refine_using_last_restraints ( int n_steps)

refine (again).

Returns
the status of the refinement: GSL_CONTINUE, GSL_SUCCESS, GSL_ENOPROG (no progress). i.e. don't call thus function again unless the status is GSL_CONTINUE (-2);

◆ replace_fragment()

int coot::molecule_t::replace_fragment ( atom_selection_container_t asc)
Returns
the success status

◆ residue_is_nucleic_acid()

bool coot::molecule_t::residue_is_nucleic_acid ( const std::string & cid) const

Residue is nucleic acid?

Every residue in the selection is checked

Parameters
imolis the model molecule index
cidis the selection CID e.g "//A/15" (residue 15 of chain A)
Returns
a bool

◆ residues_near_residue()

std::vector< coot::residue_spec_t > coot::molecule_t::residues_near_residue ( const std::string & residue_cid,
float dist ) const
Returns
a list of residues specs that have atoms within dist of the atoms of the specified residue

◆ set_occupancy()

void coot::molecule_t::set_occupancy ( const std::string & cid,
float occ_new )

set occupancy

set the occupancy for the given atom selection

Parameters
imolis the model molecule index
codis the atom selection CID

◆ set_other_map_for_colouring_min_max()

void coot::molecule_t::set_other_map_for_colouring_min_max ( float min_v,
float max_v )

Set the limit for the colour range for the values from the other map. If the other map were, for example, a map of correlation values, then you'd pass -1.0 and 1.0.

◆ set_user_defined_bond_colours()

void coot::molecule_t::set_user_defined_bond_colours ( const std::map< unsigned int, std::array< float, 4 > > & colour_map)

user-defined colour-index to colour (internallly, this converts the colour_map to the above vector of colour holders, so it's probably a good idea if the colour (index) keys are less than 200 or so.

Member Data Documentation

◆ colour_rules

std::vector<std::pair<std::string, std::string> > coot::molecule_t::colour_rules

If any colour rule has been set for this molecule, then we will use these (and that his its internal colour-by-chain colouring scheme).

the colour_rules is a vector of things like: ("//A", "red")


The documentation for this class was generated from the following file: