Action_Thermostats
        Add_AtomRandomPerturbation
        Add_FitFragmentPartialChargesAction
        Add_RotateAroundBondAction
        Add_SelectAtomByNameAction
        Added_ParseSaveFragmentResults
        AddingActions_SaveParseParticleParameters
        Adding_Graph_to_ChangeBondActions
        Adding_MD_integration_tests
        Adding_ParticleName_to_Atom
        Adding_StructOpt_integration_tests
        AtomFragments
        Automaking_mpqc_open
        AutomationFragmentation_failures
        Candidate_v1.5.4
        Candidate_v1.6.0
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChangeBugEmailaddress
        ChangingTestPorts
        ChemicalSpaceEvaluator
        CombiningParticlePotentialParsing
        Combining_Subpackages
        Debian_Package_split
        Debian_package_split_molecuildergui_only
        Disabling_MemDebug
        Docu_Python_wait
        EmpiricalPotential_contain_HomologyGraph
        EmpiricalPotential_contain_HomologyGraph_documentation
        Enable_parallel_make_install
        Enhance_userguide
        Enhanced_StructuralOptimization
        Enhanced_StructuralOptimization_continued
        Example_ManyWaysToTranslateAtom
        Exclude_Hydrogens_annealWithBondGraph
        FitPartialCharges_GlobalError
        Fix_BoundInBox_CenterInBox_MoleculeActions
        Fix_ChargeSampling_PBC
        Fix_ChronosMutex
        Fix_FitPartialCharges
        Fix_FitPotential_needs_atomicnumbers
        Fix_ForceAnnealing
        Fix_IndependentFragmentGrids
        Fix_ParseParticles
        Fix_ParseParticles_split_forward_backward_Actions
        Fix_PopActions
        Fix_QtFragmentList_sorted_selection
        Fix_Restrictedkeyset_FragmentMolecule
        Fix_StatusMsg
        Fix_StepWorldTime_single_argument
        Fix_Verbose_Codepatterns
        Fix_fitting_potentials
        Fixes
        ForceAnnealing_goodresults
        ForceAnnealing_oldresults
        ForceAnnealing_tocheck
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_continued
        ForceAnnealing_with_BondGraph_continued_betteresults
        ForceAnnealing_with_BondGraph_contraction-expansion
        FragmentAction_writes_AtomFragments
        FragmentMolecule_checks_bonddegrees
        GeometryObjects
        Gui_Fixes
        Gui_displays_atomic_force_velocity
        ImplicitCharges
        IndependentFragmentGrids
        IndependentFragmentGrids_IndividualZeroInstances
        IndependentFragmentGrids_IntegrationTest
        IndependentFragmentGrids_Sole_NN_Calculation
        JobMarket_RobustOnKillsSegFaults
        JobMarket_StableWorkerPool
        JobMarket_unresolvable_hostname_fix
        MoreRobust_FragmentAutomation
        ODR_violation_mpqc_open
        PartialCharges_OrthogonalSummation
        PdbParser_setsAtomName
        PythonUI_with_named_parameters
        QtGui_reactivate_TimeChanged_changes
        Recreated_GuiChecks
        Rewrite_FitPartialCharges
        RotateToPrincipalAxisSystem_UndoRedo
        SaturateAtoms_findBestMatching
        SaturateAtoms_singleDegree
        StoppableMakroAction
        Subpackage_CodePatterns
        Subpackage_JobMarket
        Subpackage_LinearAlgebra
        Subpackage_levmar
        Subpackage_mpqc_open
        Subpackage_vmg
        Switchable_LogView
        ThirdParty_MPQC_rebuilt_buildsystem
        TrajectoryDependenant_MaxOrder
        TremoloParser_IncreasedPrecision
        TremoloParser_MultipleTimesteps
        TremoloParser_setsAtomName
        Ubuntu_1604_changes
        stable
      
      
        
          | 
            Last change
 on this file since e7341e was             991c35, checked in by Frederik Heber <heber@…>, 11 years ago           | 
        
        
          | 
             
Added tcl scripts for viewing and debugging convexized surfaces. 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.8 KB
           | 
        
      
      
| Rev | Line |   | 
|---|
| [991c35] | 1 | #!/usr/bin/tclsh
 | 
|---|
 | 2 | #
 | 
|---|
 | 3 | # This scripts parses a series of tecplot style files of triangles and displays them via VMD's graphics interface
 | 
|---|
 | 4 | 
 | 
|---|
 | 5 | # fname is the filename prefix of the tecplot .dat files, e.g. "convex" for "convex-0.dat"
 | 
|---|
 | 6 | proc convexizing { fname steps} {
 | 
|---|
 | 7 |         global framesteps
 | 
|---|
 | 8 |         global fileprefix
 | 
|---|
 | 9 |         set framesteps $steps
 | 
|---|
 | 10 |         set fileprefix $fname
 | 
|---|
 | 11 | 
 | 
|---|
 | 12 |         # avoid some 'animate dup' bug
 | 
|---|
 | 13 |         set molid [molinfo top]
 | 
|---|
 | 14 |         if {$steps < 2} {
 | 
|---|
 | 15 |                 error "steps should be greater than 2."
 | 
|---|
 | 16 |         }
 | 
|---|
 | 17 |         # make tcount-1 copies of current frame
 | 
|---|
 | 18 |         for {set i 0} {$i <$steps} {incr i} {
 | 
|---|
 | 19 |                 animate dup frame 0 $molid
 | 
|---|
 | 20 |         }
 | 
|---|
 | 21 |         animate goto 0
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 |         global vmd_frame
 | 
|---|
 | 24 |         trace variable vmd_frame([molinfo top]) w update_current_surface
 | 
|---|
 | 25 |         display update
 | 
|---|
 | 26 |         return
 | 
|---|
 | 27 | }       
 | 
|---|
 | 28 | 
 | 
|---|
 | 29 | proc update_current_surface {name index op} { 
 | 
|---|
 | 30 |         global fileprefix
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 |         draw delete all
 | 
|---|
 | 33 |         set frame [molinfo $index get frame]
 | 
|---|
 | 34 |         # open file
 | 
|---|
 | 35 |         set fname "$fileprefix-$frame.dat"
 | 
|---|
 | 36 |         #puts "Opening new file $fname."
 | 
|---|
 | 37 |         set file [open $fname r]
 | 
|---|
 | 38 |         gets $file title
 | 
|---|
 | 39 |         gets $file variables
 | 
|---|
 | 40 |         gets $file zone
 | 
|---|
 | 41 |         # parse nodes
 | 
|---|
 | 42 |         set ncount 1
 | 
|---|
 | 43 |         gets $file line
 | 
|---|
 | 44 |         while { $line != {} } {
 | 
|---|
 | 45 |                 set nodes($ncount) $line
 | 
|---|
 | 46 |                 incr ncount
 | 
|---|
 | 47 |                 gets $file line
 | 
|---|
 | 48 |         }
 | 
|---|
 | 49 |         set ncount [ expr $ncount -1 ]
 | 
|---|
 | 50 |         # there's a blank line in between
 | 
|---|
 | 51 |         # parse triangles
 | 
|---|
 | 52 |         set tcount 0
 | 
|---|
 | 53 |         gets $file line
 | 
|---|
 | 54 |         while { $line != {} } {
 | 
|---|
 | 55 |                 set triangles [ split $line " "]
 | 
|---|
 | 56 |                 set first [ lrange $nodes([ lindex $triangles 0 ]) 0 2 ]
 | 
|---|
 | 57 |                 set second [ lrange $nodes([ lindex $triangles 1 ]) 0 2 ]
 | 
|---|
 | 58 |                 set third [ lrange $nodes([ lindex $triangles 2 ]) 0 2 ]
 | 
|---|
 | 59 |                 draw color blue
 | 
|---|
 | 60 |                 draw material Transparent
 | 
|---|
 | 61 |                 draw triangle $first $second $third
 | 
|---|
 | 62 |                 incr tcount
 | 
|---|
 | 63 |                 gets $file line
 | 
|---|
 | 64 |         }
 | 
|---|
 | 65 |         close $file
 | 
|---|
 | 66 |         #puts "There are $tcount triangles."
 | 
|---|
 | 67 |         
 | 
|---|
 | 68 |         return
 | 
|---|
 | 69 | }
 | 
|---|
 | 70 | 
 | 
|---|
 | 71 | proc convexizing_off {} {
 | 
|---|
 | 72 |         global vmd_frame
 | 
|---|
 | 73 |         global framesteps
 | 
|---|
 | 74 |         trace vdelete vmd_frame([molinfo top]) w update_current_surface
 | 
|---|
 | 75 |         draw delete all
 | 
|---|
 | 76 |         animate delete beg 1 end $framesteps skip 0 [molinfo top]
 | 
|---|
 | 77 |         return
 | 
|---|
 | 78 | }
 | 
|---|
 | 79 | 
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.