Changeset 4400 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Apr 13, 2020 5:06:27 PM (19 months ago)
Author:
vondreele
Message:

add rigid body save to make new pdb file with properly named atoms - needed for fullrmc
implement use of pdbparser (part of fullrmc) to prepare amorphous big box models from isolated molecules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r4397 r4400  
    25392539    return fname
    25402540   
    2541 def MakepdparserPDB(Name,Phase,RMCPdict):
    2542     import pdbparser as pdp
    2543     fname = Name+'.pdb'
     2541def MakePdparse(RMCPdict):
     2542    fname = 'make_pdb.py'
     2543    outName = RMCPdict['moleculePdb'].split('.')
     2544    outName[0] += 'bb'
     2545    outName = '.'.join(outName)
    25442546    fl = open(fname,'w')
    2545     fl.write('REMARK    this file to be generated using pdbparser\n')
    2546     fl.close()
     2547    fl.write('from pdbparser.pdbparser import pdbparser\n')
     2548    fl.write('from pdbparser.Utilities.Construct import AmorphousSystem\n')
     2549    fl.write("pdb = pdbparser('%s')\n"%RMCPdict['moleculePdb'])
     2550    boxstr= 'boxsize=%s'%str(RMCPdict['Box'])
     2551    recstr = 'recursionLimit=%d'%RMCPdict['maxRecursion']
     2552    denstr = 'density=%.3f'%RMCPdict['targetDensity']
     2553    fl.write('pdb = AmorphousSystem(pdb,%s,%s,%s,\n'%(boxstr,recstr,denstr))
     2554    fl.write('    priorities={"boxSize":True, "insertionNumber":False, "density":True}).construct().get_pdb()\n')
     2555    fl.write('pdb.export_pdb("%s")\n'%outName)
     2556    fl.close
    25472557    return fname
    25482558
Note: See TracChangeset for help on using the changeset viewer.