File size: 1,404 Bytes
2106752
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

"""
Data models for the Molecular Designer Env Environment.

The molecular_Designer_Env environment is a simple test environment that echoes back messages.
"""

from openenv.core.env_server.types import Action, Observation
from pydantic import Field


class MolecularDesignerEnvAction(Action):
    """Action for the Molecular Designer Environment - a SMILES string representing the molecule."""

    smiles: str = Field(..., description="SMILES string to evaluate")


class MolecularDesignerEnvObservation(Observation):
    """Observation from the Molecular Designer environment - feedback on chemical properties."""

    is_valid: bool = Field(default=False, description="Whether the generated SMILES is chemically valid")
    mw: float = Field(default=0.0, description="Molecular Weight of the molecule")
    logp: float = Field(default=0.0, description="Partition coefficient (LogP) of the molecule")
    qed: float = Field(default=0.0, description="Quantitative Estimate of Drug-likeness (QED)")
    sas: float = Field(default=0.0, description="Synthetic Accessibility Score (SAS) estimate")
    feedback: str = Field(default="", description="Textual feedback about the generated molecule")