Skip to content

Computational Forcefield

ComputationalForcefield

Bases: UUIDBaseNode

Definition

A Computational Forcefield Subobject is a mathematical model that describes the forces between atoms and molecules. It is used in computational chemistry and molecular dynamics simulations to predict the behavior of materials. Forcefields are typically based on experimental data or quantum mechanical calculations, and they are often used to study the properties of materials such as their structure, dynamics, and reactivity.

Attributes
attribute type example description required vocab
key str CHARMM27 type of forcefield True True
building_block str atom type of building block True True
coarse_grained_mapping str SC3 beads in MARTINI forcefield atom to beads mapping
implicit_solvent str water Name of implicit solvent
source str package in GROMACS source of forcefield
description str OPLS forcefield with partial charges calculated via the LBCC algorithm description of the forcefield and any modifications that have been added
data Data details of mapping schema and forcefield parameters
citation list[Citation] reference to a book, paper, or scholarly work
Can be Added To Primary Node:
  • Material node
JSON Representation
{
    "node": ["ComputationalForcefield"],
    "key": "opls_aa",
    "building_block": "atom",
    "coarse_grained_mapping": "atom -> atom",
    "implicit_solvent": "no implicit solvent",
    "source": "local LigParGen installation",
    "description": "this is a test forcefield",
    "data": {
        "node":["Data"],
        "name":"my data name",
        "type":"afm_amp",
        "file":[
            {
                "node":["File"],
                "type":"calibration",
                "source":"https://criptapp.org",
                "extension":".csv",
                "data_dictionary":"my file's data dictionary"
            }
        ]
    },
    "citation": {
        "node": ["Citation"],
        "type": "reference"
        "reference": {
            "node": ["Reference"],
            "type": "journal_article",
            "title": "Multi-architecture Monte-Carlo (MC) simulation of soft coarse-grained polymeric materials: SOft coarse grained Monte-Carlo Acceleration (SOMA)",
            "author": ["Ludwig Schneider", "Marcus Müller"],
            "journal": "Computer Physics Communications",
            "publisher": "Elsevier",
            "year": 2019,
            "pages": [463, 476],
            "doi": "10.1016/j.cpc.2018.08.011",
            "issn": "0010-4655",
            "website": "https://www.sciencedirect.com/science/article/pii/S0010465518303072",
        }
}
Source code in src/cript/nodes/subobjects/computational_forcefield.py
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
class ComputationalForcefield(UUIDBaseNode):
    """
    ## Definition
    A [Computational Forcefield Subobject](https://pubs.acs.org/doi/suppl/10.1021/acscentsci.3c00011/suppl_file/oc3c00011_si_001.pdf#page=23)
    is a mathematical model that describes the forces between atoms and molecules.
    It is used in computational chemistry and molecular dynamics simulations to predict the behavior of materials.
    Forcefields are typically based on experimental data or quantum mechanical calculations,
    and they are often used to study the properties of materials such as their structure, dynamics, and reactivity.

    ## Attributes
    | attribute              | type           | example                                                                | description                                                              | required | vocab |
    |------------------------|----------------|------------------------------------------------------------------------|--------------------------------------------------------------------------|----------|-------|
    | key                    | str            | CHARMM27                                                               | type of forcefield                                                       | True     | True  |
    | building_block         | str            | atom                                                                   | type of building block                                                   | True     | True  |
    | coarse_grained_mapping | str            | SC3 beads in MARTINI forcefield                                        | atom to beads mapping                                                    |          |       |
    | implicit_solvent       | str            | water                                                                  | Name of implicit solvent                                                 |          |       |
    | source                 | str            | package in GROMACS                                                     | source of forcefield                                                     |          |       |
    | description            | str            | OPLS forcefield with partial charges calculated via the LBCC algorithm | description of the forcefield and any modifications that have been added |          |       |
    | data                   | Data           |                                                                        | details of mapping schema and forcefield parameters                      |          |       |
    | citation               | list[Citation] |                                                                        | reference to a book, paper, or scholarly work                            |          |       |


    ## Can be Added To Primary Node:
    * Material node

    ## JSON Representation
    ```json
    {
        "node": ["ComputationalForcefield"],
        "key": "opls_aa",
        "building_block": "atom",
        "coarse_grained_mapping": "atom -> atom",
        "implicit_solvent": "no implicit solvent",
        "source": "local LigParGen installation",
        "description": "this is a test forcefield",
        "data": {
            "node":["Data"],
            "name":"my data name",
            "type":"afm_amp",
            "file":[
                {
                    "node":["File"],
                    "type":"calibration",
                    "source":"https://criptapp.org",
                    "extension":".csv",
                    "data_dictionary":"my file's data dictionary"
                }
            ]
        },
        "citation": {
            "node": ["Citation"],
            "type": "reference"
            "reference": {
                "node": ["Reference"],
                "type": "journal_article",
                "title": "Multi-architecture Monte-Carlo (MC) simulation of soft coarse-grained polymeric materials: SOft coarse grained Monte-Carlo Acceleration (SOMA)",
                "author": ["Ludwig Schneider", "Marcus Müller"],
                "journal": "Computer Physics Communications",
                "publisher": "Elsevier",
                "year": 2019,
                "pages": [463, 476],
                "doi": "10.1016/j.cpc.2018.08.011",
                "issn": "0010-4655",
                "website": "https://www.sciencedirect.com/science/article/pii/S0010465518303072",
            }
    }


    ```

    """

    @dataclass(frozen=True)
    class JsonAttributes(UUIDBaseNode.JsonAttributes):
        key: str = ""
        building_block: str = ""
        coarse_grained_mapping: str = ""
        implicit_solvent: str = ""
        source: str = ""
        description: str = ""
        data: List[Union[Data, UIDProxy]] = field(default_factory=list)
        citation: List[Union[Citation, UIDProxy]] = field(default_factory=list)

    _json_attrs: JsonAttributes = JsonAttributes()

    @beartype
    def __init__(
        self,
        key: str,
        building_block: str,
        coarse_grained_mapping: str = "",
        implicit_solvent: str = "",
        source: str = "",
        description: str = "",
        data: Optional[List[Union[Data, UIDProxy]]] = None,
        citation: Optional[List[Union[Citation, UIDProxy]]] = None,
        **kwargs
    ):
        """
        instantiate a computational_forcefield subobject

        Parameters
        ----------
        key : str
            type of forcefield key must come from
            [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/computational_forcefield_key)
        building_block : str
            type of computational_forcefield building_block must come from
            [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/building_block)
        coarse_grained_mapping : str, optional
            atom to beads mapping, by default ""
        implicit_solvent : str, optional
            Name of implicit solvent, by default ""
        source : str, optional
            source of forcefield, by default ""
        description : str, optional
            description of the forcefield and any modifications that have been added, by default ""
        data : List[Data], optional
            details of mapping schema and forcefield parameters, by default None
        citation : Union[List[Citation], None], optional
            reference to a book, paper, or scholarly work, by default None


        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )

        Returns
        -------
        None
            Instantiate a computational_forcefield subobject
        """
        if citation is None:
            citation = []
        super().__init__(**kwargs)

        if data is None:
            data = []

        new_json_attrs = replace(
            self._json_attrs,
            key=key,
            building_block=building_block,
            coarse_grained_mapping=coarse_grained_mapping,
            implicit_solvent=implicit_solvent,
            source=source,
            description=description,
            data=data,
            citation=citation,
        )
        self._update_json_attrs_if_valid(new_json_attrs)

    @property
    @beartype
    def key(self) -> str:
        """
        type of forcefield

        Computational_Forcefield key must come from
        [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/computational_forcefield_key)

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.key = "amber"

        Returns
        -------
        str
            type of forcefield
        """
        return self._json_attrs.key

    @key.setter
    @beartype
    def key(self, new_key: str) -> None:
        """
        set key for this computational_forcefield

        Parameters
        ----------
        new_key : str
            computational_forcefield key

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, key=new_key)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def building_block(self) -> str:
        """
        type of building block

        Computational_Forcefield building_block must come from
        [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/building_block)

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.building_block = "non_atomistic"

        Returns
        -------
        str
            type of building block
        """
        return self._json_attrs.building_block

    @building_block.setter
    @beartype
    def building_block(self, new_building_block: str) -> None:
        """
        type of building block

        Parameters
        ----------
        new_building_block : str
            new type of building block

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, building_block=new_building_block)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def coarse_grained_mapping(self) -> str:
        """
        atom to beads mapping

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.coarse_grained_mapping = "SC3 beads in MARTINI forcefield"

        Returns
        -------
        str
            coarse_grained_mapping
        """
        return self._json_attrs.coarse_grained_mapping

    @coarse_grained_mapping.setter
    @beartype
    def coarse_grained_mapping(self, new_coarse_grained_mapping: str) -> None:
        """
        atom to beads mapping

        Parameters
        ----------
        new_coarse_grained_mapping : str
            new coarse_grained_mapping

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, coarse_grained_mapping=new_coarse_grained_mapping)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def implicit_solvent(self) -> str:
        """
        Name of implicit solvent

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.implicit_solvent = "water"

        Returns
        -------
        str
            _description_
        """
        return self._json_attrs.implicit_solvent

    @implicit_solvent.setter
    @beartype
    def implicit_solvent(self, new_implicit_solvent: str) -> None:
        """
        set the implicit_solvent

        Parameters
        ----------
        new_implicit_solvent : str
            new implicit_solvent
        """
        new_attrs = replace(self._json_attrs, implicit_solvent=new_implicit_solvent)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def source(self) -> str:
        """
        source of forcefield

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.source = "package in GROMACS"

        Returns
        -------
        str
            source of forcefield
        """
        return self._json_attrs.source

    @source.setter
    @beartype
    def source(self, new_source: str) -> None:
        """
        set the computational_forcefield

        Parameters
        ----------
        new_source : str
            new source of forcefield
        """
        new_attrs = replace(self._json_attrs, source=new_source)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def description(self) -> str:
        """
        description of the forcefield and any modifications that have been added

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_computational_forcefield.description = "OPLS forcefield with partial charges calculated via the LBCC algorithm"

        Returns
        -------
        str
            description of the forcefield and any modifications that have been added
        """
        return self._json_attrs.description

    @description.setter
    @beartype
    def description(self, new_description: str) -> None:
        """
        set this computational_forcefields description

        Parameters
        ----------
        new_description : str
            new computational_forcefields description

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, description=new_description)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def data(self) -> List[Union[Data, UIDProxy]]:
        """
        details of mapping schema and forcefield parameters

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> my_file = cript.File(
        ...     name="my file node name",
        ...     source="https://pubs.acs.org/doi/suppl/10.1021/acscentsci.3c00011/suppl_file/oc3c00011_si_001.pdf",
        ...     type="calibration",
        ...     extension=".pdf",
        ... )
        >>> my_data = cript.Data(
        ...     name="my data node name",
        ...     type="afm_amp",
        ...     file=[my_file],
        ... )
        >>> my_computational_forcefield.data = [my_data]

        Returns
        -------
        List[Data]
            list of data nodes for this computational_forcefield subobject
        """
        return self._json_attrs.data.copy()

    @data.setter
    @beartype
    def data(self, new_data: List[Union[Data, UIDProxy]]) -> None:
        """
        set the data attribute of this computational_forcefield node

        Parameters
        ----------
        new_data : List[Data]
            new list of data nodes

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, data=new_data)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def citation(self) -> List[Union[Citation, UIDProxy]]:
        """
        reference to a book, paper, or scholarly work

        Examples
        --------
        >>> import cript
        >>> my_computational_forcefield = cript.ComputationalForcefield(
        ...     key="opls_aa",
        ...     building_block="atom",
        ... )
        >>> title = (
        ...     "Multi-architecture Monte-Carlo (MC) simulation of soft coarse-grained polymeric materials: "
        ...     "SOft coarse grained Monte-Carlo Acceleration (SOMA)"
        ... )
        >>> my_reference = cript.Reference(
        ...     "journal_article",
        ...     title=title,
        ...     author=["Ludwig Schneider", "Marcus Müller"],
        ...     journal="Computer Physics Communications",
        ...     publisher="Elsevier",
        ...     year=2019,
        ...     pages=[463, 476],
        ...     doi="10.1016/j.cpc.2018.08.011",
        ...     issn="0010-4655",
        ...     website="https://www.sciencedirect.com/science/article/pii/S0010465518303072",
        ... )
        >>> my_citation = cript.Citation(type="reference", reference=my_reference)
        >>> my_computational_forcefield.citation = [my_citation]

        Returns
        -------
        List[Citation]
            computational_forcefield list of citations
        """
        return self._json_attrs.citation.copy()

    @citation.setter
    @beartype
    def citation(self, new_citation: List[Union[Citation, UIDProxy]]) -> None:
        """
        set the citation subobject of the computational_forcefield subobject

        Parameters
        ----------
        new_citation : List[Citation]
            new citation subobject
        """
        new_attrs = replace(self._json_attrs, citation=new_citation)
        self._update_json_attrs_if_valid(new_attrs)

__init__(key, building_block, coarse_grained_mapping='', implicit_solvent='', source='', description='', data=None, citation=None, **kwargs)

instantiate a computational_forcefield subobject

Parameters:

Name Type Description Default
key str

type of forcefield key must come from CRIPT Controlled Vocabulary

required
building_block str

type of computational_forcefield building_block must come from CRIPT Controlled Vocabulary

required
coarse_grained_mapping str

atom to beads mapping, by default ""

''
implicit_solvent str

Name of implicit solvent, by default ""

''
source str

source of forcefield, by default ""

''
description str

description of the forcefield and any modifications that have been added, by default ""

''
data List[Data]

details of mapping schema and forcefield parameters, by default None

None
citation Union[List[Citation], None]

reference to a book, paper, or scholarly work, by default None

None

Examples:

>>> import cript
>>> my_computational_forcefield = cript.ComputationalForcefield(
...     key="opls_aa",
...     building_block="atom",
... )

Returns:

Type Description
None

Instantiate a computational_forcefield subobject

Source code in src/cript/nodes/subobjects/computational_forcefield.py
@beartype
def __init__(
    self,
    key: str,
    building_block: str,
    coarse_grained_mapping: str = "",
    implicit_solvent: str = "",
    source: str = "",
    description: str = "",
    data: Optional[List[Union[Data, UIDProxy]]] = None,
    citation: Optional[List[Union[Citation, UIDProxy]]] = None,
    **kwargs
):
    """
    instantiate a computational_forcefield subobject

    Parameters
    ----------
    key : str
        type of forcefield key must come from
        [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/computational_forcefield_key)
    building_block : str
        type of computational_forcefield building_block must come from
        [CRIPT Controlled Vocabulary](https://app.criptapp.org/vocab/building_block)
    coarse_grained_mapping : str, optional
        atom to beads mapping, by default ""
    implicit_solvent : str, optional
        Name of implicit solvent, by default ""
    source : str, optional
        source of forcefield, by default ""
    description : str, optional
        description of the forcefield and any modifications that have been added, by default ""
    data : List[Data], optional
        details of mapping schema and forcefield parameters, by default None
    citation : Union[List[Citation], None], optional
        reference to a book, paper, or scholarly work, by default None


    Examples
    --------
    >>> import cript
    >>> my_computational_forcefield = cript.ComputationalForcefield(
    ...     key="opls_aa",
    ...     building_block="atom",
    ... )

    Returns
    -------
    None
        Instantiate a computational_forcefield subobject
    """
    if citation is None:
        citation = []
    super().__init__(**kwargs)

    if data is None:
        data = []

    new_json_attrs = replace(
        self._json_attrs,
        key=key,
        building_block=building_block,
        coarse_grained_mapping=coarse_grained_mapping,
        implicit_solvent=implicit_solvent,
        source=source,
        description=description,
        data=data,
        citation=citation,
    )
    self._update_json_attrs_if_valid(new_json_attrs)

building_block(new_building_block)

type of building block

Parameters:

Name Type Description Default
new_building_block str

new type of building block

required

Returns:

Type Description
None
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@building_block.setter
@beartype
def building_block(self, new_building_block: str) -> None:
    """
    type of building block

    Parameters
    ----------
    new_building_block : str
        new type of building block

    Returns
    -------
    None
    """
    new_attrs = replace(self._json_attrs, building_block=new_building_block)
    self._update_json_attrs_if_valid(new_attrs)

citation(new_citation)

set the citation subobject of the computational_forcefield subobject

Parameters:

Name Type Description Default
new_citation List[Citation]

new citation subobject

required
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@citation.setter
@beartype
def citation(self, new_citation: List[Union[Citation, UIDProxy]]) -> None:
    """
    set the citation subobject of the computational_forcefield subobject

    Parameters
    ----------
    new_citation : List[Citation]
        new citation subobject
    """
    new_attrs = replace(self._json_attrs, citation=new_citation)
    self._update_json_attrs_if_valid(new_attrs)

coarse_grained_mapping(new_coarse_grained_mapping)

atom to beads mapping

Parameters:

Name Type Description Default
new_coarse_grained_mapping str

new coarse_grained_mapping

required

Returns:

Type Description
None
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@coarse_grained_mapping.setter
@beartype
def coarse_grained_mapping(self, new_coarse_grained_mapping: str) -> None:
    """
    atom to beads mapping

    Parameters
    ----------
    new_coarse_grained_mapping : str
        new coarse_grained_mapping

    Returns
    -------
    None
    """
    new_attrs = replace(self._json_attrs, coarse_grained_mapping=new_coarse_grained_mapping)
    self._update_json_attrs_if_valid(new_attrs)

data(new_data)

set the data attribute of this computational_forcefield node

Parameters:

Name Type Description Default
new_data List[Data]

new list of data nodes

required

Returns:

Type Description
None
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@data.setter
@beartype
def data(self, new_data: List[Union[Data, UIDProxy]]) -> None:
    """
    set the data attribute of this computational_forcefield node

    Parameters
    ----------
    new_data : List[Data]
        new list of data nodes

    Returns
    -------
    None
    """
    new_attrs = replace(self._json_attrs, data=new_data)
    self._update_json_attrs_if_valid(new_attrs)

description(new_description)

set this computational_forcefields description

Parameters:

Name Type Description Default
new_description str

new computational_forcefields description

required

Returns:

Type Description
None
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@description.setter
@beartype
def description(self, new_description: str) -> None:
    """
    set this computational_forcefields description

    Parameters
    ----------
    new_description : str
        new computational_forcefields description

    Returns
    -------
    None
    """
    new_attrs = replace(self._json_attrs, description=new_description)
    self._update_json_attrs_if_valid(new_attrs)

implicit_solvent(new_implicit_solvent)

set the implicit_solvent

Parameters:

Name Type Description Default
new_implicit_solvent str

new implicit_solvent

required
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@implicit_solvent.setter
@beartype
def implicit_solvent(self, new_implicit_solvent: str) -> None:
    """
    set the implicit_solvent

    Parameters
    ----------
    new_implicit_solvent : str
        new implicit_solvent
    """
    new_attrs = replace(self._json_attrs, implicit_solvent=new_implicit_solvent)
    self._update_json_attrs_if_valid(new_attrs)

key(new_key)

set key for this computational_forcefield

Parameters:

Name Type Description Default
new_key str

computational_forcefield key

required

Returns:

Type Description
None
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@key.setter
@beartype
def key(self, new_key: str) -> None:
    """
    set key for this computational_forcefield

    Parameters
    ----------
    new_key : str
        computational_forcefield key

    Returns
    -------
    None
    """
    new_attrs = replace(self._json_attrs, key=new_key)
    self._update_json_attrs_if_valid(new_attrs)

source(new_source)

set the computational_forcefield

Parameters:

Name Type Description Default
new_source str

new source of forcefield

required
Source code in src/cript/nodes/subobjects/computational_forcefield.py
@source.setter
@beartype
def source(self, new_source: str) -> None:
    """
    set the computational_forcefield

    Parameters
    ----------
    new_source : str
        new source of forcefield
    """
    new_attrs = replace(self._json_attrs, source=new_source)
    self._update_json_attrs_if_valid(new_attrs)