<br><br><div><span class="gmail_quote">2007/5/5, Konrad Hinsen <<a href="mailto:firstname.lastname@example.org">email@example.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 04.05.2007, at 18:43, Ramon Crehuet wrote:<br><br>> Before trying that I experimented a little with AtomicVectorField<br>> and the Calpha model for which I have calculated the modes. I<br>> expected these two setConfiguration to correspond do the same but
<br>> they don't:<br>><br>> origin = uni.copyConfiguration()<br>> field = AtomicVectorField(uni, 0.1, mode)<br>> uni.setConfiguration(origin+field.particleValues()*delta/<br>> mode.frequency)<br>>
uni.setConfiguration(origin+mode*i*delta/mode.frequency)<br><br>A VectorField is defined on a regular grid. When the VectorField<br>object is created, its values at the grid points are calculated as a<br>weighted combination of the atomic vectors. When a value is requested
<br>at another point, it is calculated through linear interpolation. In<br>general this does not yield exactly the same values at the positions<br>of the atoms.</blockquote><div><br>Surely I understand this, but both operations give results quite different (the VMD images are quite different). Maybe the scale of mode and field is different?
<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> So how can I get the same desplacements that originate from the<br>> mode using the AtomicVectorField? (then I'll be able to apply it to
<br>> the all atom model)<br><br>I don't see any way to obtain exactly the same values and still get<br>reasonable values at other points. If you need to retrieve the exact<br>values for each input atom, then you should use an interpolation
<br>algorithm that is not grid based. You could for example assign to<br>each atom the average value of its three nearest C-alpha neighbours,<br>weighted by the distance from each C-alpha. This can be implemented<br>efficiently by using the nonbonded list object from the force field
<br>module, with a cutoff of about 5 Ang. This is a bit tricky to use;<br>see Tests/energy_tests.py for an example.</blockquote><div><br>I don't need an exact result, I was just comparing the results for my understanding of the operations. Anyway, reducing the grid space should make the field value tend to the mode value, isn't it?