Hello Jakob--

> 
> I wish to include an extraTerm in the fixupCovalentGeom procedure. As
> far as I can see one needs to add the extra potentials as tuples of
> (term, tolerance) as in the below:
> 
> protocol.fixupCovalentGeom(maxIters=100,useVDW=1,maxViols=10,bondTol=0.025,angleTol=4.0,extraTerms=[(harmpot,100.0)])
> 
> However, this causes a crash as later it appears the items are only
> the term and not the tol:
> 
>   File "/home/jtn/xplor-nih-2.33-b/python/regularize.py", line 460, in
> fixupCovalentGeom
>     fixupLoop_xplor(ivm,2*maxIters,verbose-1,0,minState)
>   File "/home/jtn/xplor-nih-2.33-b/python/regularize.py", line 317, in
> fixupLoop_xplor
>     viols=covalentViols(lSim.fastCommand)
>   File "/home/jtn/xplor-nih-2.33-b/python/regularize.py", line 154, in
> covalentViols
>     ret.append( term.violations() )
> AttributeError: 'tuple' object has no attribute 'violations'
> 
> If I skip the tuple and try only with term I get another error:
> 
> protocol.fixupCovalentGeom(maxIters=100,useVDW=1,maxViols=10,bondTol=0.025,angleTol=4.0,extraTerms=[harmpot])
>   File "/home/jtn/xplor-nih-2.33-b/python/regularize.py", line 460, in
> fixupCovalentGeom
>     fixupLoop_xplor(ivm,2*maxIters,verbose-1,0,minState)
>   File "/home/jtn/xplor-nih-2.33-b/python/regularize.py", line 342, in
> fixupLoop_xplor
>     lXplorCommand("flags exclude * include %s end" % join(pots))
>   File
> "/home/jtn/xplor-nih-2.33-b/python/bin.Linux_x86_64/lib/python2.7/string.py",
> line 318, in join
>     return sep.join(words)
> TypeError: sequence item 3: expected string, PotProxy(XplorPot) found
> 
> Am I doing something wrong, it appears to me there is a bug somewhere
> related to the extraTerms. My extra term is a harmonic potential
> restraining some of the coordinates. I am using version 2.33
> 

Yes, use of extraTerms in fixupCovalentGeom is broken. Perhaps
hopelessly so. Please try regularize.fixupCovalentGeomIVM instead. You
are correct that the documentation for extraTerms is incorrect. It
should be:

    Additional terms to satify may be specified with the extraTerms
    argument. This should be a list of <m pot>.Pot terms.

To fixup covalent geometry without large-scale atomic rearrangement,
you might also try regularize.covalentMinimize. All the same, using
fixupCovalentGeom/IVM with NCS-style restraints is an important use
case which I would like to get working. Please let me know how things
go.

best regards--
Charles
_______________________________________________
Xplor-nih mailing list
[email protected]
https://dcb.cit.nih.gov/mailman/listinfo/xplor-nih

Reply via email to