OpenStructure
__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 *
8 
9 # Fills a list of reference clashing distances from a file (requires a path to the file)
11  fh=open(filename,'r')
12  lines=fh.readlines()
13  fh.close()
14  return FillClashingDistances(lines)
15 
16 # Fills a list of bond stereo-chemical statistics from a file (requires a path to the file)
18  fh=open(filename,'r')
19  lines=fh.readlines()
20  fh.close()
21  return FillBondStereoChemicalParams("Bond",lines)
22 
23 # Fills a list of angle stereo-chemical statistics from a file (requires a path to the file)
25  fh=open(filename,'r')
26  lines=fh.readlines()
27  fh.close()
28  return FillAngleStereoChemicalParams("Angle",lines)
29 
30 # Returns the default list of reference clashing distances (from the default OpenStructure parameter file)
32  shared_path=ost.GetSharedDataPath()
33  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
34  fh=open(filename,'r')
35  lines=fh.readlines()
36  fh.close()
37  return FillClashingDistances(lines)
38 
39 # Returns the default list of bond stereo-chemical statistics (from the default OpenStructure parameter file)
41  shared_path=ost.GetSharedDataPath()
42  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
43  fh=open(filename,'r')
44  lines=fh.readlines()
45  fh.close()
46  return FillStereoChemicalParams("Bond",lines)
47 
48 # Returns the default list of angle stereo-chemical statistics (from the default OpenStructure parameter file)
50  shared_path=ost.GetSharedDataPath()
51  filename=os.path.join(shared_path,'stereo_chemical_props.txt')
52  fh=open(filename,'r')
53  lines=fh.readlines()
54  fh.close()
55  return FillStereoChemicalParams("Angle",lines)
56 
def FillClashingDistancesFromFile(filename)
Definition: __init__.py:10
ClashingDistances DLLEXPORT_OST_MOL_ALG FillClashingDistances(std::vector< String > &stereo_chemical_props_file, bool check=false)
Fills a list of reference clashing distances from the content of a parameter file.
def FillBondStereoChemicalParamsFromFile(filename)
Definition: __init__.py:17
StereoChemicalParams DLLEXPORT_OST_MOL_ALG FillStereoChemicalParams(const String &header, std::vector< String > &stereo_chemical_props_file, bool check=false)
Fills a list of stereo-chemical statistics from the content of a parameter file.
def DefaultAngleStereoChemicalParams()
Definition: __init__.py:49
def DefaultBondStereoChemicalParams()
Definition: __init__.py:40
def FillAngleStereoChemicalParamsFromFile(filename)
Definition: __init__.py:24
def DefaultClashingDistances()
Definition: __init__.py:31
String DLLEXPORT_OST_BASE GetSharedDataPath()