Print

Gromacs trjconv structures look odd ?

Written by Super User. Posted in Uncategorised

vmdscene

If converting from different formats, trjconv does not correctly format the coordinates. I noticed that one digit is too much. Here is a simple python script that will rewrite the files with the right number of digits.

import sys 

file=open(sys.argv[1],"r")
lines=file.readlines()
file2=open(("correct."+sys.argv[1]),"w")
file.close()
for i in range(len(lines)):
	splitl=lines[i].strip().split()
	print splitl 
	if (len(splitl) > 3 ) and ("Generated" not in lines[i]):
		firstpart=lines[i][0:20]
		secondpart=lines[i][20:].split()
		print secondpart 
		file2.write("%s%07.3f%07.3f%07.3f\n"%(firstpart,float(secondpart[0]),float(secondpart[1]),float(secondpart[2])))
	else:
		file2.write(lines[i])
Print

Manipulating residues on the protein surface - VMD

Written by Super User. Posted in Uncategorised

Currently, I am trying to determine the "correct" protonation state of a protein after ESI ionization. For that, I have to consider that protons are mobile on the protein's surface. In order to select (and write as  separate pdb file for example) residues with a solvent-accessible surface of bigger than 20 square-Angstrom I use the following tcl script:

set allsel [atomselect top all]
set residlist [lsort -unique -integer [$allsel get resid]]
puts residlist
set selectlist {}
foreach r $residlist {
set selres [atomselect top "resid $r" ]
set rSASA [measure sasa 2.0 $allsel -restrict $selres]  
if {$rSASA > 20} {
        lappend selectlist $r
        puts $r
}
}
mol representation "VDW"
mol color "Colorid 4"
mol selection resid $selectlist    
mol addrep 0

 

 

Print

Structure Alignment with VMD

Written by Super User. Posted in Uncategorised

In a current side-project, I need to align some structural models of an elongated monomer protein to the crystallographically solved dimer structure. The task is to align each fragment (and the additional residues) to a chain in the dimer. Loading the respective structures in VMD looks like this

1

To perform the alignment despite additional residues and atom ordering, it is important to inspect the pdb files and identify the regions of sequence identity. Then only Calpha carbons are used to determine the transformation matrix to best fit chain A or chain B. Finally the transformation is applied to the whole monomer. Coordinates are written as pdb files that are easily merged by hand to obtain the full pdb file.

In the example (PDB 1BG8) there are 615 atoms in each chain. In the elongated (homology modelling of the flexible Nterminal residues not solved in Xray) fragment the sequence identity with the chains of 1BG8 is found in the range of atoms 55 to 666. The selection and transformation can be easily done using the tcl interface of VMD:

i loaded 1 unit of 1BG8 and 2 fragments of the elongated monomer with ID's 0, 1 and 2

set sel0 [atomselect 0 {{serial 1 to 615} and name CA }]
set sel1 [atomselect 0 {{serial 616 to 1230} and name CA }]
set sel2 [atomselect 1 {{serial 55 to 666} and name CA }]
set M1 [measure fit $sel2 $sel0]
set M2 [measure fit $sel2 $sel1]
set sel3 [atomselect 1 all]
set sel4 [atomselect 2 all]
$sel3 move $M1
$sel4 move $M2

the result is -  as expected - aligned

2

Print

Compiling VMD without CUDA

Written by Super User. Posted in Uncategorised

Today I learnt a very important lesson. A) Always make very clean when you recompile things B) keep working compiling procedures even when you will remember for sure what you did and why.

Because I needed a VMD installation without CUDA (My laptop has simply o NVIDIA chip), i tried to recompile VMD using all the combinations of configure options possible. No sucess. The weird thing: There is no error message, just the main window does not pop up. Several Mailing-lists posts indicated problems with TCL and other things but no proposed workarounf helped. Then I noticed the fatal mistake: make clean removes only very little of the generated files. Half compatible things (I have no clue which) prevent the installation from working at all!!

The whole endeavour was sought to run VMD on an Ubuntu 14.04

Followig configure options work out

LINUXAMD64 OPENGL FLTK TCL

Next time I'll check my own Blog enty...

Print

Gaussian - How Restart What

Written by Super User. Posted in Uncategorised

Restarting failed Gaussian runs can be a pain. First of all: be sure that you use the same type of machine: The checkpoint files are NOT transferable. In case a change is neccesary: Try formchk and reverse operation unfchk. My personal experience: it does not work. Most probably because i am too unpatient, forget something and at some point mess up my chk files. MAKE BACKUPS

Here are at least two restarts that actually work well for me:

Unconverged SCF:

just add  SCF=(restart) to the input block

Add some states to a TDDFT calculation:

#P wB97XD Geom=AllCheck ChkBas Guess=(Read,Only) td(read,add=15)