plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
323 stars 269 forks source link

PDB functions not accepting negative residue numbers #1089

Open carlocamilloni opened 5 days ago

carlocamilloni commented 5 days ago

@gtribello @GiovanniBussi @maxbonomi @Iximiel we were doing some test using SAXS on PDB constructs and we found out that PLUMED PDB functions do not accept negative residue numbers becasue they all take unsigned in input. For example getResidueRange(unsigned start, unsigned end) ecc. I cannot remember if there was any reason for this. If not we would see if it is possible to modify this behavior. Do you expect this to break somethign else?

GiovanniBussi commented 5 days ago

For atom numbers I think we have to stick to positive (>=1).

For residue numbers I don't know any reason to limit to positive. However, we should check carefully all places where residues are entered. A possible tricky thing is what happens if we allow users to use ranges (1-10 is clear, what about -10--1? Maybe it works, but I am afraid it could not).