1414##############################################################################
1515
1616"""
17- anyeye view structure file in atomeye
17+ Anyeye view structure file in atomeye.
1818
19- Usage: anyeye [options] strufile
19+ Usage: `` anyeye [options] strufile``
2020
21- Anyeye understands more structure formats than atomeye. It converts strufile
22- to a temporary XCFG file which is opened in atomeye. Supported file formats:
23- inputFormats
21+ Anyeye understands more `Structure` formats than atomeye. It converts ` strufile`
22+ to a temporary XCFG file which is opened in atomeye. See supported file formats:
23+ `` inputFormats``
2424
2525Options:
2626 -f, --formula
27- Override chemical formula in strufile. The formula defines
28- elements in the same order as in strufile, e.g., Na4Cl4.
27+ Override chemical formula in ` strufile` . The formula defines
28+ elements in the same order as in ` strufile` , e.g., `` Na4Cl4`` .
2929
3030 -w, --watch
3131 Watch input file for changes.
3636
3737 --formats=FORMATS
3838 Comma-separated list of file formats that are understood
39- by the VIEWER, by default "xcfg,pdb". Files of other
39+ by the VIEWER, by default `` "xcfg,pdb"`` . Files of other
4040 formats will be converted to the first listed format.
4141
4242 -h, --help
6565
6666
6767def usage (style = None ):
68- """show usage info, for style=="brief" show only first 2 lines"""
68+ """Show usage info, for `` style=="brief"`` show only first 2 lines. """
6969 import os .path
7070
7171 myname = os .path .basename (sys .argv [0 ])
@@ -91,7 +91,17 @@ def version():
9191def loadStructureFile (filename , format = "auto" ):
9292 """Load structure from specified file.
9393
94- Return a tuple of (Structure, fileformat).
94+ Parameters
95+ ----------
96+ filename : str
97+ Path to the structure file.
98+ format : str, Optional
99+ File format, by default "auto".
100+
101+ Returns
102+ -------
103+ tuple
104+ A tuple of (Structure, fileformat).
95105 """
96106 from diffpy .structure import Structure
97107
@@ -165,7 +175,7 @@ def cleanUp(pd):
165175
166176
167177def parseFormula (formula ):
168- """parse chemical formula and return a list of elements"""
178+ """Parse chemical formula and return a list of elements"""
169179 # remove all blanks
170180 formula = re .sub (r"\s" , "" , formula )
171181 if not re .match ("^[A-Z]" , formula ):
0 commit comments