Package schrodinger :: Package application :: Package moldescriptors
[hide private]
[frames] | no frames]

Package moldescriptors

A Python script that computes molecular indices for each input structure in the input file.

The details of the descriptors implemented here is taken from 'Handbook of Molecular Descriptors by Mannhols, Kubinyi and Timmerman'.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  MolecularDescriptorsOptions
A class to provide various options that can be passed to calculate molecular descriptors.
Functions [hide private]
 
calculate_zagreb_m1(st)
 
calculate_zagreb_m1_valence_vertex_degree(st)
 
calculate_zagreb_m2(st)
 
calculate_zagreb_m2_valence_vertex_degree(st)
 
calculate_polarity(st)
 
calculate_simple_topological(st)
 
calculate_harmonic_topological(st)
 
calculate_geometric_topological(st)
 
calculate_total_structure_connectivity(st)
 
calculate_wiener(st)
 
calculate_mean_wiener(st)
 
calculate_radial_centric(st)
 
calculate_xu(st)
 
calculate_qindex(st)
 
calculate_lprs(st)
 
calculate_superpendentic(st)
 
calculate_mean_square_distance_balaban(st)
 
calculate_harary(st)
 
calculate_smt(st)
 
calculate_smt_valence_vertex_degree(st)
 
calculate_pogliani(st)
 
calculate_mean_distance_degree_deviation(st)
 
calculate_ramification(st)
 
calculate_gutman_molecular_topological(st)
 
calculate_gutman_mti_valence_vertex_degrees(st)
 
calculate_average_vertex_distance_degree(st)
 
calculate_unipolarity(st)
 
calculate_centralization(st)
 
calculate_variation(st)
 
_calculate_field_effect(st)
 
calculate_mev(st)
 
calculate_mepv(st)
 
calculate_menv(st)
 
calculate_eccentric_connectivity(st)
 
calculate_eccentricity(st)
 
calculate_average_eccentricity(st)
 
calculate_eccentric(st)
 
calculate_valence_connectivity_chi_0(st)
 
calculate_valence_connectivity_chi_1(st)
 
calculate_valence_connectivity_chi_2(st)
 
calculate_valence_connectivity_chi_3(st)
 
calculate_valence_connectivity_chi_4(st)
 
calculate_valence_connectivity_chi_5(st)
 
calculate_average_valence_connectivity_chi_0(st)
 
calculate_average_valence_connectivity_chi_1(st)
 
calculate_average_valence_connectivity_chi_2(st)
 
calculate_average_valence_connectivity_chi_3(st)
 
calculate_average_valence_connectivity_chi_4(st)
 
calculate_average_valence_connectivity_chi_5(st)
 
calculate_kier_benzene_likeliness(st)
 
calculate_quasi_wiener(st)
 
calculate_spanning_tree_number(st)
 
calculate_first_mohar(st)
 
calculate_second_mohar(st)
 
_calculate_charge_term_matrix(st)
 
calculate_topological_charge_index_order_n(st, distance)
 
calculate_topological_charge_index_order_1(st)
 
calculate_topological_charge_index_order_2(st)
 
calculate_topological_charge_index_order_3(st)
 
calculate_topological_charge_index_order_4(st)
 
calculate_topological_charge_index_order_5(st)
 
calculate_topological_charge_index_order_6(st)
 
calculate_topological_charge_index_order_7(st)
 
calculate_topological_charge_index_order_8(st)
 
calculate_topological_charge_index_order_9(st)
 
calculate_topological_charge_index_order_10(st)
 
calculate_mean_topological_charge_index_order_n(st, distance)
 
calculate_mean_topological_charge_index_order_1(st)
 
calculate_mean_topological_charge_index_order_2(st)
 
calculate_mean_topological_charge_index_order_3(st)
 
calculate_mean_topological_charge_index_order_4(st)
 
calculate_mean_topological_charge_index_order_5(st)
 
calculate_mean_topological_charge_index_order_6(st)
 
calculate_mean_topological_charge_index_order_7(st)
 
calculate_mean_topological_charge_index_order_8(st)
 
calculate_mean_topological_charge_index_order_9(st)
 
calculate_mean_topological_charge_index_order_10(st)
 
calculate_global_topological_charge(st)
 
calculate_hyper_distance_path(st)
 
calculate_reciprocal_hyper_distance_path(st)
 
calculate_square_reciprocal_distance_sum(st)
 
calculate_modified_randic_connectivity(st)
 
_get_principal_quantum_number(atomic_number)
 
calculate_kier_hall_electronegativity_index(st)
 
_calculate_balaban_and_looping_centic(st)
 
calculate_balaban_centric_index(st)
 
calculate_looping_centric_index(st)
 
_calculate_sum_of_topological_distances(st)
 
calculate_sum_of_topological_distances_between_N_and_N(st)
 
calculate_sum_of_topological_distances_between_N_and_O(st)
 
calculate_sum_of_topological_distances_between_N_and_S(st)
 
calculate_sum_of_topological_distances_between_N_and_P(st)
 
calculate_sum_of_topological_distances_between_N_and_F(st)
 
calculate_sum_of_topological_distances_between_N_and_Cl(st)
 
calculate_sum_of_topological_distances_between_N_and_Br(st)
 
calculate_sum_of_topological_distances_between_N_and_I(st)
 
calculate_sum_of_topological_distances_between_O_and_O(st)
 
calculate_sum_of_topological_distances_between_O_and_S(st)
 
calculate_sum_of_topological_distances_between_O_and_P(st)
 
calculate_sum_of_topological_distances_between_O_and_F(st)
 
calculate_sum_of_topological_distances_between_O_and_Cl(st)
 
calculate_sum_of_topological_distances_between_O_and_Br(st)
 
calculate_sum_of_topological_distances_between_O_and_I(st)
 
calculate_sum_of_topological_distances_between_S_and_S(st)
 
calculate_sum_of_topological_distances_between_S_and_P(st)
 
calculate_sum_of_topological_distances_between_S_and_F(st)
 
calculate_sum_of_topological_distances_between_S_and_Cl(st)
 
calculate_sum_of_topological_distances_between_S_and_Br(st)
 
calculate_sum_of_topological_distances_between_S_and_I(st)
 
calculate_sum_of_topological_distances_between_P_and_P(st)
 
calculate_sum_of_topological_distances_between_P_and_F(st)
 
calculate_sum_of_topological_distances_between_P_and_Cl(st)
 
calculate_sum_of_topological_distances_between_P_and_Br(st)
 
calculate_sum_of_topological_distances_between_P_and_I(st)
 
calculate_sum_of_topological_distances_between_F_and_F(st)
 
calculate_sum_of_topological_distances_between_F_and_Cl(st)
 
calculate_sum_of_topological_distances_between_F_and_Br(st)
 
calculate_sum_of_topological_distances_between_F_and_I(st)
 
calculate_sum_of_topological_distances_between_Cl_and_Cl(st)
 
calculate_sum_of_topological_distances_between_Cl_and_Br(st)
 
calculate_sum_of_topological_distances_between_Cl_and_I(st)
 
calculate_sum_of_topological_distances_between_Br_and_Br(st)
 
calculate_sum_of_topological_distances_between_Br_and_I(st)
 
calculate_sum_of_topological_distances_between_I_and_I(st)
 
_get_scientific_matrix(st)
 
calculate_wiener_z_matrix(st)
 
calculate_wiener_electronegativity_matrix(st)
 
calculate_wiener_mass_matrix(st)
 
calculate_wiener_van_der_waals_matrix(st)
 
calculate_wiener_polarizability_matrix(st)
 
calculate_balaban_distance_connectivity(st)
 
calculate_balaban_z_matrix(st)
 
calculate_balaban_electronegativity_matrix(st)
 
calculate_balaban_mass_matrix(st)
 
calculate_balaban_van_der_waals_matrix(st)
 
calculate_balaban_polarizability_matrix(st)
 
calculate_topological_diameter(st)
 
calculate_topological_radius(st)
 
calculate_petitjean_shape(st)
 
calculate_solvation_connectivity_indices_0(st)
 
calculate_solvation_connectivity_indices_1(st)
 
calculate_solvation_connectivity_indices_2(st)
 
calculate_solvation_connectivity_indices_3(st)
 
calculate_solvation_connectivity_indices_4(st)
 
calculate_solvation_connectivity_indices_5(st)
 
calculate_reciprocal_distance_randic(st)
 
calculate_reciprocal_distance_square_randic(st)
 
calculate_connectivity_chi_0(st)
 
calculate_randic_connectivity(st)
 
calculate_connectivity_chi_2(st)
 
calculate_connectivity_chi_3(st)
 
calculate_connectivity_chi_4(st)
 
calculate_connectivity_chi_5(st)
 
calculate_average_connectivity_chi_0(st)
 
calculate_average_connectivity_chi_1(st)
 
calculate_average_connectivity_chi_2(st)
 
calculate_average_connectivity_chi_3(st)
 
calculate_average_connectivity_chi_4(st)
 
calculate_average_connectivity_chi_5(st)
 
calculate_kier_alpha_modified_shape_1(st)
 
calculate_kier_alpha_modified_shape_2(st)
 
calculate_kier_alpha_modified_shape_3(st)
 
calculate_kier_flexbility(st)
 
calculate_path_walk_2(st)
 
calculate_path_walk_3(st)
 
calculate_path_walk_4(st)
 
calculate_path_walk_5(st)
 
calculate_e_state(st)
 
calculate_chiral_count(st)
Get number of chiral atoms in a structure.
 
calculate_ringcount(st, n)
 
calculate_ringcount3(st)
 
calculate_ringcount4(st)
 
calculate_ringcount5(st)
 
calculate_ringcount6(st)
 
calculate_ringcount7(st)
 
calculate_ringcount8(st)
 
calculate_ringcount9(st)
 
calculate_ringcount10(st)
 
calculate_ringcount11(st)
 
calculate_ringcount12(st)
 
calculate_ringcount13(st)
 
calculate_ringcount14(st)
 
calculate_ringcount15(st)
 
calculate_ringcount16(st)
 
calculate_ringcount17(st)
 
calculate_ringcount18(st)
 
calculate_ringcount19(st)
 
calculate_ringcount20(st)
 
calculate_atomcount(st)
 
calculate_bondcount(st)
 
calculate_atom_rings_count(st)
 
calculate_bond_rings_count(st)
 
calculate_cyclomatic(st)
 
calculate_num_ring_systems(st)
 
calculate_normalized_num_ring_systems(st)
 
calculate_total_ring_size(st)
 
calculate_ring_perimeter(st)
 
calculate_ring_bridge(st)
 
calculate_molecule_cyclized_degree(st)
 
calculate_ring_fusion_density(st)
 
calculate_ring_complexity_index(st)
 
calculate_ring_fusion_degree(st)
 
_check_canvas_license()
 
calculate_van_der_waals_surface_area(st)
Return van der waals surface area of a molecule vsa = sigma(vsa of each atom i)
 
_calculate_peoe(st, n)
Return atomic contribution based on Gasteiger charges.
 
calculate_peoe1(st)
 
calculate_peoe2(st)
 
calculate_peoe3(st)
 
calculate_peoe4(st)
 
calculate_peoe5(st)
 
calculate_peoe6(st)
 
calculate_peoe7(st)
 
calculate_peoe8(st)
 
calculate_peoe9(st)
 
calculate_peoe10(st)
 
calculate_peoe11(st)
 
calculate_peoe12(st)
 
calculate_peoe13(st)
 
calculate_peoe14(st)
 
_calculate_alogp(st, n)
Return atomic contributions based on Alpgp values.
 
calculate_alogp1(st)
 
calculate_alogp2(st)
 
calculate_alogp3(st)
 
calculate_alogp4(st)
 
calculate_alogp5(st)
 
calculate_alogp6(st)
 
calculate_alogp7(st)
 
calculate_alogp8(st)
 
calculate_alogp9(st)
 
calculate_alogp10(st)
 
_calculate_mr(st, n)
Return atomic contribution based on MR values.
 
calculate_mr1(st)
 
calculate_mr2(st)
 
calculate_mr3(st)
 
calculate_mr4(st)
 
calculate_mr5(st)
 
calculate_mr6(st)
 
calculate_mr7(st)
 
calculate_mr8(st)
 
init(st)
Initializes the structure:...
 
get_mopac_codes()
Returns the list of MOPAC codes.
 
_get_mopac_results(mopac_output, mopacCodes)
 
get_mopac_methods()
Returns the list of MOPAC methods.
 
_get_mopac_keyword(method)
 
get_qikprop_properties()
Returns the list of QikProp properties.
 
_get_command_output(cmd)
Run external command and return output
 
_read_yaml_file(file)
Read YAML config file and return list
 
_get_descriptors(options)
Return the list of various descriptors to be calculated.
 
_calculate_topo_desc(calcTopoDescList, st, nstructures, i)
Calculates the topological descriptors for the given structure 'st'
 
_calculate_mopac_desc(calcMopacDescList, mopac_input, mopac_tmp_file, st, nstructures, i)
Calculates the mopac descriptors for the given structure 'st'
 
_get_qikprop_cmd(options, structfile, qikprop_tmp_file)
 
_calculate_qikprop_desc(options, calcQikpropDescList, qikprop_cmd, qikprop_tmp_file, st, structfile, nstructures, i)
Calculates the qikprop descriptors for the given structure 'st'
 
_print_descriptors(options, calcTopoDescList, calcMopacDescList, calcQikpropDescList)
 
calculate_using_file(options, structfile)
Calculate molecular descriptors using structure file.
 
calculate_using_st(options, st)
Calculate molecular descriptors using given structure.
 
_do_cleanup()
Remove the temporary files created by mopac or qikprop
 
_get_maestro_type(value)
 
_export_to_mae(st, st_writer, do_topo, calcTopoDescList, descResults, skip_topo, do_mopac, calcMopacDescList, mopacResults, skip_mopac, do_qikprop, calcQikpropDescList, qikPropResults, skip_qikprop)
Exports calculated descriptors into Maestro format file
 
_export_to_csv(st, csv_writer, do_topo, calcTopoDescList, descResults, skip_topo, do_mopac, calcMopacDescList, mopacResults, skip_mopac, do_qikprop, calcQikpropDescList, qikPropResults, skip_qikprop)
Exports calculated descriptors into CSV format file
 
add_moldescriptors_options(parser, options=[0, 1, 4, 6, 7], group_options=True)
Adds common molecular descriptors options to a SingleDashOptionParser instance.
Variables [hide private]
  __doc__ = ...
  mopac_descriptors = True
  debug = False
  verbose = True
  VAN_DER_WAALS_VOLUME = {5: 17.875, 6: 22.449, 7: 15.599, 8: 11...
  ELECTRONEGATIVITY = {5: 2.275, 6: 2.746, 7: 3.194, 8: 3.654, 9...
  POLARIZABILITY = {5: 3.03, 6: 1.76, 7: 1.1, 8: 0.802, 9: 0.557...
  COVALENT_RADIUS = {5: 0.83, 6: 0.68, 7: 0.68, 8: 0.68, 9: 0.64...
  PEOE_INTERVAL = [-0.3, -0.25, -0.2, -0.15, -0.1, -0.05, 0, 0.0...
  ALOGP_INTERVAL = [-0.4, -0.2, 0, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4]
  MR_INTERVAL = [0.11, 0.26, 0.35, 0.39, 0.44, 0.485, 0.56]
  IS_CANVAS_LIC_CHECKED = False
  CANVAS_LIC = None
hash(x)
  descriptors = (('ZM1', 'First Zagreb', <function calculate_zag...
  valence_electrons = {}
  cleanup_files = []
  IN = 8
  LIST = 9
  METHOD = 2
  MOPAC = 1
  NOGEOPT = 3
  OCSV = 7
  OMAE = 6
  QIKPROP = 4
  REPLACECOMMA = 10
  SLOW = 5
  TOPO = 0
  __package__ = 'schrodinger.application.moldescriptors'
Function Details [hide private]

calculate_chiral_count(st)

 

Get number of chiral atoms in a structure. This will consider only "R" or "S" for chiral category as of now.

calculate_van_der_waals_surface_area(st)

 

Return van der waals surface area of a molecule
vsa = sigma(vsa of each atom i)

    where

  vsa of each atom i = 4*pi*ri*ri - pi*ri*
                     sigma((rj*rj-(ri-dij)*(ri-dij))/dij)
                     for j running for each bond of atom i
        ri, rj -> van der waals radius of respective atoms
        dij    -> min(max(|ri-rj|,bij),ri+rj)
        bij    -> ideal bond length, bij = sij - oij
        sij    -> bond length of atom i and j calculated using
                  MMFF94
        oij    -> correction in bond length
                  ( 0 for single, 0.1 for aromatic, 0.2 for double,
                    0.3 for triple )

_calculate_peoe(st, n)

 

Return atomic contribution based on Gasteiger charges. This is useful to capture direct electrostatic interactions.

_calculate_alogp(st, n)

 

Return atomic contributions based on Alpgp values. This is useful to capture hydrophobic and hydrophillic effect.

_calculate_mr(st, n)

 

Return atomic contribution based on MR values. This will help to capture polarizability.

init(st)

 

Initializes the structure:
 -> calculates adjacency matrix
 -> calculates distance matrix
 and other information

calculate_using_file(options, structfile)

 

Calculate molecular descriptors using structure file. Based on the options passed it calculates Topological, Mopac or Qikprop descriptors and allows user to export descriptors into structure file and into CSV file.

Parameters:
  • options (Object) - Containing values of all valid options.
  • structfile (String) - Input structure file name.

    @rtype : None @return : None

calculate_using_st(options, st)

 

Calculate molecular descriptors using given structure.
Based on the options passed it calculates Topological, Mopac or Qikprop
descriptors and returns the list of descriptors and their values.
Please note: In this function following options are not in use...
    options.list
    options.omae and
    options.ocsv

@type options: Object
@param options: Containing values of all valid options.

@type st: Structure object
@param st: Valid structure object

@rtype : List
@return : List of descriptors and their values.

add_moldescriptors_options(parser, options=[0, 1, 4, 6, 7], group_options=True)

 

Adds common molecular descriptors options to a SingleDashOptionParser
instance.

The options are specified as a list of module enums. Accepted values are
IN, TOPO, MOPAC, METHOD, NOGEOPT, QIKPROP, SLOW, LIST, OMAE, OCSV

@type parser: SingleDashOptionParser
@param parser:  Instance of SingleDashOptionParser.

@type options:  List
@param options:  List of module enums that indicate what options to
    add to the parser.

@type group_options:  Boolean
@param group_options:  If True then group the added options (via an
    optparse.OptionGroup) in the help message under the header 'Molecualr
    Descriptors Options'.

@rtype : None
@return : None


Variables Details [hide private]

__doc__

Value:
"""
A Python script that computes molecular indices for each input
structure in the input file.

The details of the descriptors implemented here is taken from
'Handbook of Molecular Descriptors by Mannhols, Kubinyi and Timmerman'\
.

...

VAN_DER_WAALS_VOLUME

Value:
{5: 17.875,
 6: 22.449,
 7: 15.599,
 8: 11.494,
 9: 9.203,
 13: 36.511,
 14: 31.976,
 15: 26.522,
...

ELECTRONEGATIVITY

Value:
{5: 2.275,
 6: 2.746,
 7: 3.194,
 8: 3.654,
 9: 4.0,
 13: 1.714,
 14: 2.138,
 15: 2.515,
...

POLARIZABILITY

Value:
{5: 3.03,
 6: 1.76,
 7: 1.1,
 8: 0.802,
 9: 0.557,
 13: 6.8,
 14: 5.38,
 15: 3.63,
...

COVALENT_RADIUS

Value:
{5: 0.83,
 6: 0.68,
 7: 0.68,
 8: 0.68,
 9: 0.64,
 13: 1.35,
 14: 1.2,
 15: 1.05,
...

PEOE_INTERVAL

Value:
[-0.3,
 -0.25,
 -0.2,
 -0.15,
 -0.1,
 -0.05,
 0,
 0.05,
...

descriptors

Value:
'ZM1', 'First Zagreb', calculate_zagreb_m1, ('ZM1V', 'First Zagreb ind\
ex by valence vertex degrees', calculate_zagreb_m1_valence_vertex_degr\
ee), ('ZM2', 'Second Zagreb', calculate_zagreb_m2), ('ZM2V', 'Second Z\
agreb index by valence vertex degrees', calculate_zagreb_m2_valence_ve\
rtex_degree), ('Pol', 'Polarity', calculate_polarity), ('NST', 'Narumi\
 Simple Topological', calculate_simple_topological), ('NHT', 'Narumi H\
armonic Topological', calculate_harmonic_topological), ('NGT', 'Narumi\
 Geometric Topological', calculate_geometric_topological), ('TSC', 'To\
...