From: Germain Salvato Vallverdu (germain.vallverdu_at_univ-pau.fr)
Date: Thu Jan 27 2011 - 15:10:57 CST

Salut :)

Really thanks, I create the psf file of the structure. Then, as you said
of course, loading vmd with

vmd struc.psf coord.xyz

load the structure with right bonds !

With this and some tinkering with the state file, I think I will be able
to write a small python script which will do what I want !

Germain

-------- Message initial --------
De: Axel Kohlmeyer <akohlmey_at_gmail.com>
À: Germain Salvato Vallverdu <germain.vallverdu_at_univ-pau.fr>
Cc: M.Raviprasad <M.Raviprasad_at_my.ndsu.edu>, vmd-l <vmd-l_at_ks.uiuc.edu>
Sujet: RE: vmd-l: How can I add bonds ?
Date: Thu, 27 Jan 2011 15:49:19 -0500

On Thu, 2011-01-27 at 21:31 +0100, Germain Salvato Vallverdu wrote:
> Hi

hi germain,

> I did what you said about topo plugins. It works perfectly. I opened the
> tk console and type topo addbond num1 num2 ect ... . I understand that
> step. After that in the main window I saved the state, but topology
> information are not in that file.

that is correct. the state saved is only "visualization state".
modifications to the molecule "data" needs to be written to
an new "molecular" file.

> Actually, I thought that I could have do a specific view, then save the
> state of that view in a .vmd file and then modified a little bit that
> file with a script in order to get, each time I open vmd, the same view
> with right bonds. Is it a way to do that ?

there are ways to have certain actions happen automatically
after loading a new file, but in this case a different strategy
might be better.

> In previous mail you speak about a .psf file which contains topology
> information. I look at the .psf files in the protein folder which comes
> with vmd. It seems to be easy to write a .pdf or .xyz file and a .psf
> file for my system and to load both of them in vmd with a right command.
> Do you think that doing this may be a solution ?

yes. psf is one file format that contains topology information like
bonds, angles, dihedrals and thus you can use it to override the
automatic guess that VMD uses in case of file formats that do not
contain bonding information.

if you type on the vmd command prompt:

animate write psf myfile.psf

you'll generate such a file with the updated information.
the nice thing about a .psf file is that it does not
contain any coordinate data, so you only need to create
it once for the same system and can use it in combination
with many different coordinate files of the same system.

next time you can launch vmd with:

vmd myfile.psf myfile.pdb

and you should see the recorded bonds.

if you also want to record the "view" and
visualizations, you can use a vmd "state"
in combination with this after to have
created the visualization and used "save state".

salut,
    axel.

>
> Thanks again
>
> Germain

-- 
Maître de Conférence
Université de Pau et des pays de l'Adour
Institut Pluridisciplinaire de Recherche sur l'Environnement et les Matériaux
Équipe de Chimie Physique
email  : germain.vallverdu_at_univ-pau.fr
Tel    : 05 59 40 78 51
page   : http://gvallver.perso.univ-pau.fr