• Multiwfn forum

    Multiwfn official website: http://www.shanxitv.org/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn. E-mail of admin: sobereva[at]sina.com

    You are not logged in.

    #1 Re: Multiwfn and wavefunction analysis Tcl script in VMD 2021-06-10 10:02:08

    1. In the first loop, the pdb file is molecule 0 and the cub file is molecule 1. As "top" represents the top molecule, in this loop it is 1, so first, in the first loop you need to change all "top" to "0" to use information in pdb file.

    2. In the second loop, although you deleted the first two molecules before, the counter will continue, and so this time the pdb file is molecule 2 and the cub file is molecule 3, and so for other loops.

    3. "mol scaleminmax" has a different syntax as other common commands, as the molecule id need to be in front of representation id, and hence it should be "mol scaleminmax top 0" instead of "mol scaleminmax 0 top".

    4. Simply there are two solutions: the first is to set a variable as the index of the current loop, and use expression based on this variable to set molecule indices in each loop, and the second is load the cub file INTO the pdb file, and hence there is always one molecule from the beginning to the end, so you can always use "top" to indicate the current molecule. I would change the script to:



    set nsystem [llength [glob -nocomplain atmdg_*.pdb]]

    set isovaldginter 0.01
    set colordginter 7

    set colorlow -5.0
    set colorhigh 5.0

    display projection Orthographic
    display rendermode GLSL
    display depthcue off
    light 2 on
    light 3 on

    color Display Background white
    axes location Off

    color scale method BWR
    mol default style CPK

    for {set i 1} {$i<=$nsystem} {incr i} {
    set name SP[format %04d $i]
    puts "Processing atmdg_$name.pdb and dg_inter_$name.cub..."

    mol new atmdg_$name.pdb
    mol addfile dg_inter_$name.cub

    animate delete beg 1 end 1 top
    animate goto end

    mol modstyle 0 top CPK 1.0 0.3 18.0 16.0
    mol modcolor 0 top Beta
    mol modmaterial 0 top EdgyShiny
    mol scaleminmax top 0 $colorlow $colorhigh

    mol addrep top
    mol modstyle 1 top Isosurface $isovaldginter 0 0 0 1 1
    mol modcolor 1 top ColorID $colordginter
    mol modmaterial 1 top EdgyGlass

    render snapshot $name.bmp

    mol delete top

    }



    Those color Display, axes, color scale ... commands can be moved outside of the loop since they are only needed to be executed once.

    p.s.

    1. How did you define the fragments? I guess the separation of carbon and oxygen and regard them as "two molecules" is sort of meaningless.

    2. Why draw it with such thick bonds (0.8)? Generally 0.2 to 0.3 is most commonly used.

    Board footer

    Powered by FluxBB

    久久精品国产99久久香蕉