OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
__init__.py
Go to the documentation of this file.
1 import os.path
2 from _ost_mol_alg import *
3 from ost.mol.alg.superpose import *
7 
8 # Fills a list of reference clashing distances from a file (requires a path to the file)
9 def FillClashingDistancesFromFile(filename,default_clashing_distance,default_tolerance):
10  fh=open(filename,'r')
11  lines=fh.readlines()
12  fh.close()
13  return FillClashingDistances(lines,default_clashing_distance,default_tolerance)
14 
15 # Fills a list of bond stereo-chemical statistics from a file (requires a path to the file)
17  fh=open(filename,'r')
18  lines=fh.readlines()
19  fh.close()
20  return FillBondStereoChemicalParams("Bond",lines)
21 
22 # Fills a list of angle stereo-chemical statistics from a file (requires a path to the file)
24  fh=open(filename,'r')
25  lines=fh.readlines()
26  fh.close()
27  return FillAngleStereoChemicalParams("Angle",lines)
28 
29 # Returns the default list of reference clashing distances (from the default OpenStructure parameter file)
31  shared_path=ost.GetSharedDataPath()
32  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
33  fh=open(filename,'r')
34  lines=fh.readlines()
35  fh.close()
36  return FillClashingDistances(lines,1.5,0.0)
37 
38 # Returns the default list of bond stereo-chemical statistics (from the default OpenStructure parameter file)
40  shared_path=ost.GetSharedDataPath()
41  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
42  fh=open(filename,'r')
43  lines=fh.readlines()
44  fh.close()
45  return FillStereoChemicalParams("Bond",lines)
46 
47 # Returns the default list of angle stereo-chemical statistics (from the default OpenStructure parameter file)
49  shared_path=ost.GetSharedDataPath()
50  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
51  fh=open(filename,'r')
52  lines=fh.readlines()
53  fh.close()
54  return FillStereoChemicalParams("Angle",lines)
55