Changeset c012a1
- Timestamp:
- Sep 13, 2025, 3:00:43 PM (6 weeks ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 15678e
- Parents:
- 26cfa51
- File:
-
- 1 edited
-
utils/Python/boxmaker.py.in (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
utils/Python/boxmaker.py.in
r26cfa51 rc012a1 45 45 exec('self.%s = "%s"' % (name, value)) 46 46 else: 47 print 'Warning: Unknown option:', name47 print('Warning: Unknown option:', name) 48 48 49 49 … … 53 53 opt.basename = sys.argv[1] 54 54 else: 55 print 'Usage: boxmaker.py <basename> [options]'55 print('Usage: boxmaker.py <basename> [options]') 56 56 exit() 57 57 … … 64 64 opt.update(L.strip(), R.strip()) 65 65 except IOError: 66 print 'Warning: Configuration file not readable, CLI only'66 print('Warning: Configuration file not readable, CLI only') 67 67 68 68 # Parse parameters … … 168 168 value = boolmap[value] 169 169 else: 170 print 'Not a boolean value:', value170 print('Not a boolean value:', value) 171 171 exit() 172 172 … … 214 214 if opt.automass: 215 215 opt.molarmass = GetSourceMolareMass(opt, units) 216 print '======== MOLAR MASS:', opt.molarmass216 print('======== MOLAR MASS:', opt.molarmass) 217 217 218 218 … … 222 222 223 223 if newnumber != opt.number: 224 print 'Warning: Number changed to %d.' % newnumber224 print('Warning: Number changed to %d.' % newnumber) 225 225 226 226 return [newroot] * 3 … … 254 254 # Even distribution of current biggest prime to each vector -> similar sizes 255 255 if len(factors) < 3: 256 print 'Warning: Not enough prime factors - falling back to cubic placement'256 print('Warning: Not enough prime factors - falling back to cubic placement') 257 257 return FindBestCube(opt) 258 258 … … 269 269 result = [0]*3 270 270 271 print '======== CUBOID USED:',271 print('======== CUBOID USED:') 272 272 273 273 for i in range(3): 274 274 result[i] = int( reduce(operator.mul, distri[i]) ) 275 275 276 print result276 print(result) 277 277 return result 278 278 … … 324 324 try: 325 325 bb = GetSourceBBabs(opt) 326 print '======== BBOX:', bb326 print('======== BBOX:', bb) 327 327 # Scaling factor - the molecules bounding box is scaled to fit the volume suiting the density 328 328 s = (VolumePerMolecule / (bb[0]*bb[1]*bb[2])) ** (1./3) 329 329 330 330 if s < 1: 331 print 'Warning: Molecular cells will overlap.'331 print('Warning: Molecular cells will overlap.') 332 332 333 333 for i in range(3): 334 334 cell[i] = bb[i]*s 335 335 except ZeroDivisionError: 336 print 'Warning: Singularity in bounding box, falling back to cubic cell.'337 338 339 print '======== CELL: ', cell336 print('Warning: Singularity in bounding box, falling back to cubic cell.') 337 338 339 print('======== CELL: ', cell) 340 340 341 341 mol.CommandVerbose('0') … … 351 351 domain[i] = cell[i]*nbox[i] 352 352 353 print '======== DOMAIN: ', domain353 print('======== DOMAIN: ', domain) 354 354 355 355 # Postprocessing
Note:
See TracChangeset
for help on using the changeset viewer.
