Closed Saleh-OM4R closed 12 months ago
v = Molecule('structure.pdb')
sel = v.atomselect('not segid P1 P3')
v.read('../output.vel', type='coor')
v.filter(sel)
v.write('x_out_test.vel', type='coor')
Try this, it might work. Doing an atomselection after loading the vel file will do rubbish because the velocities are loaded into the coords
field of the object and as you see in the error it tries to guess bonds from atom coordinates (which are velocities here).
This is bad design from my side that we load the velocities into the coordinates field but handling the vel
files were such an edge case that I didn't bother creating a new class attribute to store them.
Thank you @stefdoerr I've tried your code and it worked now,and thank you also for the explanation.
Dear support team,
Is there a way to edit output.vel files to remove a ligand for example? I tried to load the pdb file then read the output.vel so I could edit it but it did not work and I got the following error. p.s. I ran the simulation using CHARMM36m forcefield,acemd3 MDengine, and htmd version 2.2.0. I would really appreciate your help on this issue.