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

Improve cell handling in PeriodicCollapser. #461

Open
andrewtarzia opened this issue Jul 1, 2022 · 0 comments
Open

Improve cell handling in PeriodicCollapser. #461

andrewtarzia opened this issue Jul 1, 2022 · 0 comments

Comments

@andrewtarzia
Copy link
Collaborator

From a discord thread, code like at the end of this issue is necessary to produce COFs with adequate bond lengths after using PeriodicCollapser during construction because, while the inter-building block bonds within the cell are handled well, the periodic bonds are not.

This requires improved re-definition of the unit cell after optimisation.

Example code:

def scale_unit_cell(
    periodic_info,
    vector_1_scale=1.,
    vector_2_scale=1.,
    vector_3_scale=1.,
):
    return stk.PeriodicInfo(
        vector_1=periodic_info.get_vector_1()*vector_1_scale,
        vector_2=periodic_info.get_vector_2()*vector_2_scale,
        vector_3=periodic_info.get_vector_3()*vector_3_scale,
    )

periodic_info = scale_unit_cell(
        periodic_info=construction_result.get_periodic_info(),
        vector_1_scale=0.85,
        vector_2_scale=0.85,
        vector_3_scale=1,
)
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