Giter VIP home page Giter VIP logo

Comments (5)

lohedges avatar lohedges commented on June 24, 2024

Hi there,

This is a known behaviour due to the way our parsers work. Apologies that this wasn't clearer. It's tricky because of the way that dihedrals are represented in different engines and how they are treated when interconverting between one format and another. In practice, both are dihedrals, and for AMBER, the current parser collects both propers and impropers together (as you see).

I'll have a think if there's an easy way to make things consistent. However, I think it would require quite a bit of reworking to several parsers.

Thanks for catching the typo in the GROMACS log file extractor. I'll update that when I get a chance.

from biosimspace.

lohedges avatar lohedges commented on June 24, 2024

Going forward I need to think of a way of flagging which get... methods are interoperable. Some are always present regardless of the engine, e.g. getSystem, but others are engine/protocol dependent, and might give different results depending on how the engine behaves.

from biosimspace.

fjclark avatar fjclark commented on June 24, 2024

OK, thank you for the clarification.

No problem.

from biosimspace.

fjclark avatar fjclark commented on June 24, 2024

This is a known behaviour due to the way our parsers work. Apologies that this wasn't clearer. It's tricky because of the way that dihedrals are represented in different engines and how they are treated when interconverting between one format and another. In practice, both are dihedrals, and for AMBER, the current parser collects both propers and impropers together (as you see).

Apologies if I'm missing something, but it's still not clear to me why getDihedralEnergy() can't return the total dihedral energy, given that AMBER, GROMACS, and NAMD all support either finding the total dihedral energy, or both its proper and improper components. As in, why can't this line:

return self.getRecord("PROPERDIH", time_series, _Units.Energy.kj_per_mol, block)

Be changed to

return self.getRecord("PROPERDIH", time_series, _Units.Energy.kj_per_mol, block) + self.getRecord("IMPROPERDIH", time_series, _Units.Energy.kj_per_mol, block) 

and similarly for NAMD? This would prevent confusing behavior where changing the engine results in different output from getDihedralEnergy() (e.g. I'm assuming the discrepancy between dihedral angle energies you show here is because the improper energy isn't included for GROMACS #289 (comment)). Why couldn't the function getProperEnergy could then be implemented only for GROMACS and NAMD, as is getImproperEnergy?

Thanks very much!

from biosimspace.

lohedges avatar lohedges commented on June 24, 2024

No problem, that makes sense. I guess I would need to remove the getImproperEnergy methods, since they wouldn't always return the same result following interconversion, e.g. if you round-tripped. The total should be consistent, though.

return self.getRecord("PROPERDIH", time_series, _Units.Energy.kj_per_mol, block) + self.getRecord("IMPROPERDIH", time_series, _Units.Energy.kj_per_mol, block) 

Something like this should work, but the logic would need to be changed since records return None if not present, not 0, which could be a valid energy (in appropriate units).

I'll add a note to implement this when I get a moment.

Cheers.

from biosimspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.