schrodinger.application.matsci.msutils module

Utility functions and classes for MatSci workflows.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.matsci.msutils.remove_properties(struct, props=None, matches=None, atom_props=None, atom_matches=None)

Remove all the matching structure and atom properties. No error is thrown if the given properties do not actually exist on the structure.

Parameters:
  • props (list) – A list of structure properties to delete
  • matches (list) – Remove all structure properties whose name contains any of these strings
  • atom_props (list) – A list of atom properties to delete
  • atom_matches (list) – Remove all atom properties whose name contains any of these strings
schrodinger.application.matsci.msutils.remove_atom_property(struct, prop)

Delete atom property from all atoms in a structure (structure will be modified).

Parameters:
  • struct (structure.Structure) – Structure object to be modified
  • prop (str) – Atom property to be removed
schrodinger.application.matsci.msutils.roundup(inp)

Round away from zero (to +/-infinity).

Parameters:inp (float or numpy.array) – value to be rounded
Return type:float or numpy.array
Returns:Rounded value
schrodinger.application.matsci.msutils.getstr(ret)

Convert binary string (or other data) to str.

Parameters:ret (binary_type or any other type convertable to str) – Value to be converted to str
Return type:str
Returns:Value converted to str
schrodinger.application.matsci.msutils.sig_fig_round(value, significant_figure=5)
Parameters:
  • value (float) – change the significant figures of this value
  • significant_figure (int) – significant figure of the displayed value
Return type:

str

Returns:

str representation of a number with proper significant figures