Skip to content
Snippets Groups Projects
Select Git revision
  • d6ac7c97f0a54b9d1fc939d46a2df5fef807d1c1
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

__init__.py

Blame
  • Gabriel Studer's avatar
    Studer Gabriel authored
    Reason is that these modules add a dependency on scipy which should be
    optional.
    6529d141
    History
    __init__.py 1.99 KiB
    import os.path
    from ._ost_mol_alg import *
    from ost.mol.alg.superpose import *
    import ost.mol.alg.trajectory_analysis
    import ost.mol.alg.structure_analysis
    import ost.mol.alg.helix_kinks
    import ost.mol.alg.hbond
    
    # Fills a list of reference clashing distances from a file (requires a path to the file)
    def FillClashingDistancesFromFile(filename):
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillClashingDistances(lines)
    
    # Fills a list of bond stereo-chemical statistics from a file (requires a path to the file)
    def FillBondStereoChemicalParamsFromFile(filename):
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillBondStereoChemicalParams("Bond",lines)
    
    # Fills a list of angle stereo-chemical statistics from a file (requires a path to the file)
    def FillAngleStereoChemicalParamsFromFile(filename):
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillAngleStereoChemicalParams("Angle",lines)
    
    # Returns the default list of reference clashing distances (from the default OpenStructure parameter file)
    def DefaultClashingDistances():
      shared_path=ost.GetSharedDataPath()	
      filename=os.path.join(shared_path,'stereo_chemical_props.txt')
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillClashingDistances(lines)
    
    # Returns the default list of bond stereo-chemical statistics (from the default OpenStructure parameter file)
    def DefaultBondStereoChemicalParams():
      shared_path=ost.GetSharedDataPath()	
      filename=os.path.join(shared_path,'stereo_chemical_props.txt')
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillStereoChemicalParams("Bond",lines)
    
    # Returns the default list of angle stereo-chemical statistics (from the default OpenStructure parameter file)
    def DefaultAngleStereoChemicalParams():
      shared_path=ost.GetSharedDataPath()	
      filename=os.path.join(shared_path,'stereo_chemical_props.txt')
      fh=open(filename,'r')
      lines=fh.readlines()
      fh.close()
      return FillStereoChemicalParams("Angle",lines)