Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Chiron TestSystem class #30

Open
chrisiacovella opened this issue Feb 12, 2024 · 3 comments
Open

Create Chiron TestSystem class #30

chrisiacovella opened this issue Feb 12, 2024 · 3 comments

Comments

@chrisiacovella
Copy link
Member

We should implement a TestSystem class in chiron, rather than having to import and convert openmmtools TestSystems.

@chrisiacovella
Copy link
Member Author

Notes about structure of this class from a comment on PR #21 by @jchodera

Instead of a bunch of TestSystem.get_X_property() methods, what about a single TestSystem.get_analytical_properties() method that returns a dict of the available analytical properties? There, we just need to standardize the ontology of property definitions we use in that single method.

@chrisiacovella
Copy link
Member Author

Preliminary mockup of the TestSystem class:

class TestSystem # base class that defines the basic API
     .analytical_properties # read-only property that returns a `dict` of analytical properties with units attached
     .sampler_state # initial sampler state (with appropriate box vectors)
     .thermodynamic_state # includes the potential and Topology (can be overwritten)
     .description # human-readable description
     .keywords # keyword tags that allow us to select subset of tests (e.g. 'condensed-phase', 'ideal-gas', 'vacuum', 'unit-test', 'expensive'

The idea is to make the test self contained, so we only need a few lines of code to set up a test case.

Some test systems we are considering initially:

  class NoninteractingTestSystem # base class for things like ideal atomic and molecular gasses
     class IdealAtomicGas
     class IdealMolecularGas # e.g. N2, O2, CO2, H2O

  class HarmonicOscillatorTestSystem
  class HarmonicOscillatorArray

 class LennardJones
  class LennardJonesFluid
  class LennardJonesCluster
  class LennardJonesDimer


class VacuumMolecularSystem
      def __init__(self, SMILES, potential_type) # Create molecular system for the SMILES string
           SMILES : molecular species
           pretrained_model : 'SAKE', '...' # pretrained model

					 # logic for setting up the config and 
					 # initializing sampler state and the thermodynamic state

  class EthanolSAKEMolecularSystem(VacuumMolecularSystem)

  #could have different ways of setting up
  test_ethanol = EthanolSAKEMolecularSystem()

  testsystem = VacuumMolecularSystem('CCO', 'SAKE-0.1')

  testsystem.thermodynamic_state.temperature = 300*unit.kelvin
      

@chrisiacovella
Copy link
Member Author

This change will help to remove the dependency on openmm and openmmtools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant